Compare commits
2 Commits
3313298fa2
...
feb00df8c5
Author | SHA1 | Date |
---|---|---|
gabriel becker | feb00df8c5 | 11 months ago |
gabriel becker | 5611f134e3 | 1 year ago |
9 changed files with 64 additions and 32 deletions
@ -0,0 +1,6 @@ |
|||||||
|
from . import ( |
||||||
|
load_exercises, |
||||||
|
map_yaml_to_database, |
||||||
|
create_open_workout_database, |
||||||
|
exercise_config |
||||||
|
) |
@ -0,0 +1,27 @@ |
|||||||
|
import click |
||||||
|
|
||||||
|
from open_workout_coach.load_exercises import load_file_and_media_links |
||||||
|
from open_workout_coach.map_yaml_to_database import process_config_into_workout_file |
||||||
|
|
||||||
|
|
||||||
|
@click.group("cli") |
||||||
|
def cli(): |
||||||
|
pass |
||||||
|
|
||||||
|
|
||||||
|
@cli.command() |
||||||
|
@click.argument('input_path', type=click.Path(exists=True)) |
||||||
|
@click.argument('output_destination', type=click.Path(exists=True)) |
||||||
|
def create_plan(input_path, output_destination): |
||||||
|
""" |
||||||
|
Creates a openworkout plan from the input yaml file. |
||||||
|
""" |
||||||
|
config = load_file_and_media_links(file_path=input_path) |
||||||
|
process_config_into_workout_file(config=config, output_destination=output_destination) |
||||||
|
|
||||||
|
|
||||||
|
FILE = 'data/input/samples/exercises.yaml' |
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__': |
||||||
|
cli() |
Loading…
Reference in new issue