-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
datasette extract
CLI command
#13
Labels
enhancement
New feature or request
Comments
I'm deleting the prototype code for this for the moment: @click.command()
@click.argument(
"database",
type=click.Path(file_okay=True, dir_okay=False, allow_dash=False),
required=True,
)
@click.argument("table", required=True)
def extract(database, table):
click.echo("Will extract to {} in {}".format(table, database))
@hookimpl
def register_commands(cli):
cli.add_command(extract, name="extract") And from datasette.cli import cli
from click.testing import CliRunner
def test_extract_command():
runner = CliRunner()
result = runner.invoke(cli, ["extract", "database", "table"])
assert result.exit_code == 0
assert result.output == "Will extract to table in database\n" |
simonw
added a commit
that referenced
this issue
Mar 7, 2024
simonw
added a commit
that referenced
this issue
Mar 7, 2024
When this enhancement exists, it will fix the issue I'm seeing. I'm parsing through the General Exam Ham Radio Question Pool. ChatGPT keeps stopping for a variety of reasons. Then,
With the CLI, I could turn 1 - 3 into a loop and crank along :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So you can run extract on the CLI in addition to through the web UI.
The text was updated successfully, but these errors were encountered: