Ditched short form options for --static and --template-dir

The -t clashes with the package --tag option
This commit is contained in:
Simon Willison 2017-12-08 19:47:50 -08:00 committed by GitHub
commit 2cc14a236c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -227,8 +227,8 @@ class StaticMount(click.ParamType):
) )
@click.option('--inspect-file', help='Path to JSON file created using "datasette inspect"') @click.option('--inspect-file', help='Path to JSON file created using "datasette inspect"')
@click.option('-m', '--metadata', type=click.File(mode='r'), help='Path to JSON file containing license/source metadata') @click.option('-m', '--metadata', type=click.File(mode='r'), help='Path to JSON file containing license/source metadata')
@click.option('-t', '--template-dir', type=click.Path(exists=True, file_okay=False, dir_okay=True), help='Path to directory containing custom templates') @click.option('--template-dir', type=click.Path(exists=True, file_okay=False, dir_okay=True), help='Path to directory containing custom templates')
@click.option('-s', '--static', type=StaticMount(), help='mountpoint:path-to-directory for serving static files', multiple=True) @click.option('--static', type=StaticMount(), help='mountpoint:path-to-directory for serving static files', multiple=True)
def serve(files, host, port, debug, reload, cors, page_size, max_returned_rows, sql_time_limit_ms, sqlite_extensions, inspect_file, metadata, template_dir, static): def serve(files, host, port, debug, reload, cors, page_size, max_returned_rows, sql_time_limit_ms, sqlite_extensions, inspect_file, metadata, template_dir, static):
"""Serve up specified SQLite database files with a web UI""" """Serve up specified SQLite database files with a web UI"""
if reload: if reload: