home / code

lines

9,454 rows

View and edit SQL

Suggested facets: file_id

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()
30 setup.py 2 1 from setuptools import setup, find_packages
31 setup.py 2 2 import os
32 setup.py 2 3
33 setup.py 2 4 import versioneer
34 setup.py 2 5
35 setup.py 2 6
36 setup.py 2 7 def get_long_description():
37 setup.py 2 8 with open(os.path.join(
38 setup.py 2 9 os.path.dirname(os.path.abspath(__file__)), 'README.md'
39 setup.py 2 10 ), encoding='utf8') as fp:
40 setup.py 2 11 return fp.read()
41 setup.py 2 12
42 setup.py 2 13
43 setup.py 2 14 def get_version():
44 setup.py 2 15 path = os.path.join(
45 setup.py 2 16 os.path.dirname(os.path.abspath(__file__)), 'datasette', 'version.py'
46 setup.py 2 17 )
47 setup.py 2 18 g = {}
48 setup.py 2 19 exec(open(path).read(), g)
49 setup.py 2 20 return g['__version__']
50 setup.py 2 21
51 setup.py 2 22
52 setup.py 2 23 setup(
53 setup.py 2 24 name='datasette',
54 setup.py 2 25 version=versioneer.get_version(),
55 setup.py 2 26 cmdclass=versioneer.get_cmdclass(),
56 setup.py 2 27 description='An instant JSON API for your SQLite databases',
57 setup.py 2 28 long_description=get_long_description(),
58 setup.py 2 29 long_description_content_type='text/markdown',
59 setup.py 2 30 author='Simon Willison',
60 setup.py 2 31 license='Apache License, Version 2.0',
61 setup.py 2 32 url='https://github.com/simonw/datasette',
62 setup.py 2 33 packages=find_packages(),
63 setup.py 2 34 package_data={'datasette': ['templates/*.html']},
64 setup.py 2 35 include_package_data=True,
65 setup.py 2 36 install_requires=[
66 setup.py 2 37 'click==6.7',
67 setup.py 2 38 'click-default-group==1.2',
68 setup.py 2 39 'Sanic==0.7.0',
69 setup.py 2 40 'Jinja2==2.10',
70 setup.py 2 41 'hupper==1.0',
71 setup.py 2 42 'pint==0.8.1',
72 setup.py 2 43 'pluggy>=0.7.1',
73 setup.py 2 44 ],
74 setup.py 2 45 entry_points='''
75 setup.py 2 46 [console_scripts]
76 setup.py 2 47 datasette=datasette.cli:cli
77 setup.py 2 48 ''',
78 setup.py 2 49 setup_requires=['pytest-runner'],
79 setup.py 2 50 extras_require={
80 setup.py 2 51 'test': [
81 setup.py 2 52 'pytest==3.7.1',
82 setup.py 2 53 'aiohttp==3.3.2',
83 setup.py 2 54 'beautifulsoup4==4.6.1',
84 setup.py 2 55 ]
85 setup.py 2 56 },
86 setup.py 2 57 tests_require=[
87 setup.py 2 58 'datasette[test]',
88 setup.py 2 59 ],
89 setup.py 2 60 classifiers=[
90 setup.py 2 61 'Development Status :: 4 - Beta',
91 setup.py 2 62 'Intended Audience :: Developers',
92 setup.py 2 63 'Intended Audience :: Science/Research',
93 setup.py 2 64 'Intended Audience :: End Users/Desktop',
94 setup.py 2 65 'Topic :: Database',
95 setup.py 2 66 'License :: OSI Approved :: Apache Software License',
96 setup.py 2 67 'Programming Language :: Python :: 3.6',
97 setup.py 2 68 'Programming Language :: Python :: 3.5',
98 setup.py 2 69 ],
99 setup.py 2 70 )
100 versioneer.py 3 1

Next page

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.672ms