mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-26 03:14:19 +00:00
22 lines
550 B
Python
22 lines
550 B
Python
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)
|