From a0b956057045fa8c952ab59458e98229d90afacf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 15 May 2023 13:56:10 -0600 Subject: [PATCH] v0.0.8 (#55) * Bumps version to 0.0.8 * chore: update README --------- Co-authored-by: tconbeer --- CHANGELOG.md | 6 +++++- README.md | 43 ++++++++++++++++++++++++++----------------- pyproject.toml | 2 +- 3 files changed, 32 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29608caa..de54bb31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +## [0.0.8] - 2023-05-15 + - Cut, copy, paste in text editor with `ctrl+x`, `ctrl+c`, `ctrl+u/ctrl+v` - Quit with `ctrl+q`, instead of `ctrl+c` - `tab` indents selected text or inserts four-ish spaces in text editor; `shift+tab` dedents selected text @@ -51,7 +53,9 @@ All notable changes to this project will be documented in this file. - Use the DuckDB CLI. -[Unreleased]: https://github.com/tconbeer/harlequin/compare/0.0.7...HEAD +[Unreleased]: https://github.com/tconbeer/harlequin/compare/0.0.8...HEAD + +[0.0.8]: https://github.com/tconbeer/harlequin/compare/0.0.7...0.0.8 [0.0.7]: https://github.com/tconbeer/harlequin/compare/0.0.6...0.0.7 diff --git a/README.md b/README.md index 64bc9212..59a8eae7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A Terminal-based SQL IDE for DuckDB. ## Installing Harlequin -Use `pip` or `pipx`: +After installing Python 3.8 or above, install Harlequin using `pip` or `pipx` with: ```bash pipx install harlequin @@ -21,9 +21,24 @@ pipx install harlequin > - `pipx run harlequin --help` > - `pipx run harlequin ./my.duckdb` + +## Running Harlequin in a Container + +Without a database file: + +```bash +docker run ghcr.io/tconbeer/harlequin:latest +``` + +Mounting a database file `./foo.db` into the container's working directory, `/data`: + +```bash +docker run -v $(pwd)/foo.db:/data/bar.db ghcr.io/tconbeer/harlequin:latest harlequin bar.db +``` + ## Using Harlequin -To open a DuckDB database file: +From any shell, to open a DuckDB database file: ```bash harlequin "path/to/duck.db" @@ -35,26 +50,20 @@ To open an in-memory DuckDB session, run Harlequin with no arguments: harlequin ``` -When Harlequin is open, you can view the schema of your DuckDB database in the left sidebar. +### Viewing the Schema of your Database -To run a query, enter your code in the main textarea, then press Ctrl+Enter. You should see the data appear in the pane below. +When Harlequin is open, you can view the schema of your DuckDB database in the left sidebar. You can use your mouse or the arrow keys + enter to navigate the tree. The tree shows schemas, tables/views and their types, and columns and their types. -You can press Tab or use your mouse to change the focus between the panes. +### Editing a Query -When the focus is on the data pane, you can use your arrow keys or mouse to select different cells. +The main query editor is a full-featured text editor, with features including syntax highlighting, auto-formatting with ``ctrl + ` ``, text selection, copy/paste, and more. -Press Ctrl+c to quit and return to your shell. +You can save the query currently in the editor with `ctrl + s`. You can open a query in any text or .sql file with `ctrl + o`. -### Running Harlequin in a Container +### Running a Query and Viewing Results -Without a database file: +To run a query, press `ctrl + enter`. Up to 50k records will be loaded into the results pane below the query editor. When the focus is on the data pane, you can use your arrow keys or mouse to select different cells. -```bash -docker run ghcr.io/tconbeer/harlequin:latest -``` +### Exiting Harlequin -Mounting a database file `./foo.db` into the container's working directory, `/data`: - -```bash -docker run -v $(pwd)/foo.db:/data/bar.db ghcr.io/tconbeer/harlequin:latest harlequin bar.db -``` +Press `ctrl + q` to quit and return to your shell. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index eb39740b..c54d3799 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "harlequin" -version = "0.0.7" +version = "0.0.8" description = "A Text User Interface for DuckDB" authors = ["Ted Conbeer "] license = "MIT"