Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit cce6adc6 authored by Freezed's avatar Freezed
Browse files

:construction: WIP: update creat from file command

parent 162792a1
Branches wip-3
No related tags found
No related merge requests found
......@@ -81,13 +81,14 @@ def _as_table(upload_result):
"errors": format_error,
}
basic_data = [{"key": format_property(k), "value": v} for k, v in apply_formatters(upload_result, formatters).items()]
basic_data = [
{"key": format_property(k), "value": v}
for k, v in apply_formatters(upload_result, formatters).items()
]
return [*basic_data]
"""
@click.option("-a", "--activity_type", type=str, help="Type of activity",)
@click.option("-c", "--commute", type=int, default="0", help="Set to 1 to mark as commute",)
@click.option("-d", "--desc", type=str, default=DEFAULT_DESC, help="Description of the activity",)
......@@ -98,11 +99,12 @@ def _as_table(upload_result):
# @click.option("-t", "--time", type=int, required=True, help="In seconds",)
@click.option("-T", "--trainer", type=int, default="0", help="Set to 1 to mark as a trainer activity",)
@output_option()
"""
@click.argument('gpx_filename', type=click.Path(exists=True))
@click.argument("gpx_filename", type=click.Path(exists=True))
@click.command("fcreate")
@login_required
def post_create_file(gpx_filename):
def post_create_file(**kwargs):
"""Create an manual activity from a GPX file."""
click.echo(f"Processing: {click.format_filename(gpx_filename)}")
click.echo(f"Summary: {gpx.run([gpx_filename])}")
click.echo(f"Processing: {click.format_filename(kwargs['gpx_filename'])}")
click.echo(gpx.run([kwargs.pop("gpx_filename")]))
post_create_manu(**kwargs)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment