Giter VIP home page Giter VIP logo

bike-workout-dsl's People

Contributors

codelenny avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

originalmre

bike-workout-dsl's Issues

Use lexer

Simplify the compiler by using a lexer instead of using grammar roles for everything.

Support variables

Variables should be defined in:

  • Provided configuration (key-value)
  • Global plan (could also define the possible configurations passed in)
  • As entry, in workout or inside loop
  • As loop iteration variable ($i)

And variables should be usable as raw values or as math (${i - 1}) in:

  • Strength
  • Duration
  • Names

Create getting started guide

Produce step-by-step guides for writing a new workout plan.

Basics

  • Define an activity (5m at 50% FTP)
  • Add attributes (name, description, messages)
  • Define loop
  • Add metadata?

Programming

  • Use variables (loop variable from 100 - 150 to set FTP interval)
  • Define free-standing variable
  • Use scopes for variable scoping
  • Define macro/function
  • Declare variables for user input

Support loops

Allow looping sections, such as intervals

"Intervals" 5 times {
  "Activity 1" ...
}

"Intervals" $i 0 to 5 {
  "Activity 1" ...
}

"Intervals" $i 1 to 10 by 2 {
  "Activity 1" ...
}

Support date offset

It would be good for workout files to be (optionally) named with a date template such as $YYYY-$MM-$DD_Workout_1.

  • Support metadata specifying a time offset between activities
  • Add CLI option --start-date to specify the first workout date
  • Add CLI option --date-prefix to prefix output files
  • Update Workout#getFileName to optionally prefix dates

Support concatting .fit files?

The FIT specification allows multiple FIT files to be concatted into a single file.

  1. Would this accomplish what the Plan class does (bundling workouts)?
  2. Would the bundled file actually be useful to users, with devices currently on the market?

If so, add a compilation config/flag/variable, and concat workouts after compiling fit files (potentially tweaking the compilation for each workout to support the concat)

(See section 3.3.4 Chained FIT files in D00001275 Flexible & Interoperable Data Transfer (FIT) Protocol Rev 2.3, included in ANT's FIT SDK)

Output commentary

Write the text section of the output files to supply commentary with timestamps.

Write bin entrypoint

  • Compile and output files
  • Add option for FTP
  • Add documentation for running CLI in README
  • Add entrypoint to package.json

Package and Publish on NPM

  • Add package script and ensure correct files are included (including TS)
  • Run package and deploy locally to test (and reserve powergful)
  • Add CI script to package

Support metadata

  • Output filename
  • Global/per-workout variables
  • Short description

See Workout#getFileName for example.

Support bare dialog entries

Allow users to leave dialog entries, either for between activities or at specific times, as raw entries, instead of inside activities.

Add documentation

  • Create landing page
  • Build docs in CI
  • Add API documentation
  • Add grammar documentation (with railroad diagrams)
  • Add tutorial to walk-through creating a workout file
  • Publish docs for dev
  • Publish docs for production (on master)

Update tests to only use a single compiled source

Instead of creating lots of compiled grammars, just compile the grammar once, and change the grammar's "start":

const ActivityName = nearley.Grammar.fromCompiled(Activity);
ActivityName.start = "ActivityName";

(Syntax has been tested)

This will:

  • Improve compile time
  • Reduce the complexity of the Jakefile
  • Fix coverage being split
  • Allow better coverage as any method can be called

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.