home / code

lines

29 rows where file_id = 1

View and edit SQL

Suggested facets: line

id file_id line_no line
1 update-docs-help.py 1 1 from click.testing import CliRunner
2 update-docs-help.py 1 2 from datasette.cli import cli
3 update-docs-help.py 1 3 from pathlib import Path
4 update-docs-help.py 1 4
5 update-docs-help.py 1 5 docs_path = Path(__file__).parent / "docs"
6 update-docs-help.py 1 6
7 update-docs-help.py 1 7 includes = (
8 update-docs-help.py 1 8 ("serve", "datasette-serve-help.txt"),
9 update-docs-help.py 1 9 ("package", "datasette-package-help.txt"),
10 update-docs-help.py 1 10 ("publish now", "datasette-publish-now-help.txt"),
11 update-docs-help.py 1 11 ("publish heroku", "datasette-publish-heroku-help.txt"),
12 update-docs-help.py 1 12 )
13 update-docs-help.py 1 13
14 update-docs-help.py 1 14
15 update-docs-help.py 1 15 def update_help_includes():
16 update-docs-help.py 1 16 for name, filename in includes:
17 update-docs-help.py 1 17 runner = CliRunner()
18 update-docs-help.py 1 18 result = runner.invoke(
19 update-docs-help.py 1 19 cli, name.split() + ["--help"], terminal_width=88
20 update-docs-help.py 1 20 )
21 update-docs-help.py 1 21 actual = "$ datasette {} --help\n\n{}".format(
22 update-docs-help.py 1 22 name, result.output
23 update-docs-help.py 1 23 )
24 update-docs-help.py 1 24 actual = actual.replace('Usage: cli ', 'Usage: datasette ')
25 update-docs-help.py 1 25 open(docs_path / filename, "w").write(actual)
26 update-docs-help.py 1 26
27 update-docs-help.py 1 27
28 update-docs-help.py 1 28 if __name__ == "__main__":
29 update-docs-help.py 1 29 update_help_includes()

Advanced export

JSON shape: default, array, object

CSV options:

CREATE TABLE [lines] (
               [id] INTEGER  PRIMARY KEY ,
   [file_id] INTEGER   REFERENCES [files]([id]),
   [line_no] INTEGER  ,
   [line] TEXT  
        )
Powered by Datasette · Query took 9.766ms