mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
--help summary for 'datasette inspect', closes #1597
This commit is contained in:
parent
3658e57ac2
commit
88bc2ceae1
2 changed files with 12 additions and 1 deletions
|
|
@ -136,6 +136,12 @@ def cli():
|
||||||
@click.option("--inspect-file", default="-")
|
@click.option("--inspect-file", default="-")
|
||||||
@sqlite_extensions
|
@sqlite_extensions
|
||||||
def inspect(files, inspect_file, 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)
|
app = Datasette([], immutables=files, sqlite_extensions=sqlite_extensions)
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
inspect_data = loop.run_until_complete(inspect_(files, sqlite_extensions))
|
inspect_data = loop.run_until_complete(inspect_(files, sqlite_extensions))
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ datasette --help
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
serve* Serve up specified SQLite database files with a web UI
|
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.
|
install Install Python packages - e.g.
|
||||||
package Package specified SQLite files into a new datasette Docker...
|
package Package specified SQLite files into a new datasette Docker...
|
||||||
plugins List currently available plugins
|
plugins List currently available plugins
|
||||||
|
|
@ -317,6 +317,11 @@ datasette inspect --help
|
||||||
|
|
||||||
Usage: datasette inspect [OPTIONS] [FILES]...
|
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:
|
Options:
|
||||||
--inspect-file TEXT
|
--inspect-file TEXT
|
||||||
--load-extension TEXT Path to a SQLite extension to load
|
--load-extension TEXT Path to a SQLite extension to load
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue