Files
markdown_timesheet/app/cli.py
2019-09-05 09:02:20 +02:00

12 lines
268 B
Python

import click
from app.add import add_up_timesheet
@click.command()
@click.argument("filename", type=click.Path(exists=True))
def cli(filename):
with open(filename) as fin:
timesheet_string = fin.read()
click.echo(add_up_timesheet(timesheet_string))