import click def init_app(app): @app.cli.group('converter') def converter(): ''' Converter commands. ''' pass @converter.group('sandpaper') def sandpaper_converter(): ''' Sandpaper converter commands. ''' pass @sandpaper_converter.command('run') @click.argument('json_db') @click.argument('data_dir') def run_sandpaper_converter(json_db, data_dir): ''' Run the sandpaper converter. ''' from app.converters.sandpaper import convert convert(json_db, data_dir)