28 lines
697 B
Python
28 lines
697 B
Python
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()
|