Commit d8c782f1 authored by Wit, Allard de's avatar Wit, Allard de
Browse files

Added a commandline to csv2db

parent cbecf7f4
.idea/
csvtools/__pycache__/
import click
from .csv2db import process_csv
@click.group(help="With csvtools you can operate on CSV files")
def cli():
pass
@click.command("csv2db")
@click.argument("csv_fname", type=click.Path(exists=True))
@click.argument("sqlite_fname", type=click.Path())
def cmd_csv2db(csv_fname, sqlite_fname):
process_csv(csv_fname, sqlite_fname)
def main():
cli.add_command(cmd_csv2db)
cli()
if __name__ == "__main__":
main()
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment