Skip to content

Commit

Permalink
--help summary for 'datasette inspect', closes #1597
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jan 14, 2022
1 parent 3658e57 commit 88bc2ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions datasette/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ def cli():
@click.option("--inspect-file", default="-")
@sqlite_extensions
def inspect(files, inspect_file, sqlite_extensions):
"""
Generate JSON summary of provided database files
This can then be passed to "datasette --inspect-file" to speed up count
operations against immutable database files.
"""
app = Datasette([], immutables=files, sqlite_extensions=sqlite_extensions)
loop = asyncio.get_event_loop()
inspect_data = loop.run_until_complete(inspect_(files, sqlite_extensions))
Expand Down
7 changes: 6 additions & 1 deletion docs/cli-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ datasette --help

Commands:
serve* Serve up specified SQLite database files with a web UI
inspect
inspect Generate JSON summary of provided database files
install Install Python packages - e.g.
package Package specified SQLite files into a new datasette Docker...
plugins List currently available plugins
Expand Down Expand Up @@ -317,6 +317,11 @@ datasette inspect --help

Usage: datasette inspect [OPTIONS] [FILES]...

Generate JSON summary of provided database files

This can then be passed to "datasette --inspect-file" to speed up count
operations against immutable database files.

Options:
--inspect-file TEXT
--load-extension TEXT Path to a SQLite extension to load
Expand Down

0 comments on commit 88bc2ce

Please sign in to comment.