gabriel becker
1 year ago
8 changed files with 38 additions and 12 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_path', type=click.Path(exists=False)) |
||||
def create_plan(input_path, output_path): |
||||
""" |
||||
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_file=output_path) |
||||
|
||||
|
||||
FILE = 'data/input/samples/exercises.yaml' |
||||
|
||||
|
||||
if __name__ == '__main__': |
||||
cli() |
Loading…
Reference in new issue