nopaque/app/cli/converter.py

22 lines
550 B
Python
Raw Normal View History

2023-05-11 14:33:21 +00:00
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)