Default command now executes queries, --csv or --json

I replaced the following commands:

    sqlite-utils json db.db "select * from table"
    sqlite-utils csv db.db "select * from table"

With a unified 'query' command, which is now set as the default:

    sqlite-utils db.db "select * from table"
    sqlite-utils db.db "select * from table" --csv
This commit is contained in:
Simon Willison 2019-02-22 17:40:21 -08:00
commit f2ca48c0da
5 changed files with 76 additions and 60 deletions

View file

@ -22,7 +22,7 @@ setup(
version=VERSION,
license="Apache License, Version 2.0",
packages=find_packages(),
install_requires=["click"],
install_requires=["click", "click-default-group"],
setup_requires=["pytest-runner"],
extras_require={"test": ["pytest", "black"]},
entry_points="""