diff options
| author | Akshay Nair <phenax5@gmail.com> | 2026-06-02 22:24:49 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2026-06-02 22:24:49 +0530 |
| commit | 8c62edb87433bd0ac93fdef4585582990513236b (patch) | |
| tree | 4b48ceb0f0def6ec7ce356d7b83b4e1eb3dd86e0 /justfile | |
| parent | 49bc31720ab6206980cda95a0a30a44e7f882fcc (diff) | |
| download | sqlite-creative-coding-8c62edb87433bd0ac93fdef4585582990513236b.tar.gz sqlite-creative-coding-8c62edb87433bd0ac93fdef4585582990513236b.zip | |
Add gradient example
Diffstat (limited to '')
| -rw-r--r-- | justfile | 28 |
1 files changed, 19 insertions, 9 deletions
@@ -1,14 +1,24 @@ -setup: setup-db +DB := "fun.db" -run file *args: setup-db - sqlite3 fun.db {{args}} < {{file}} +setup: reset-db -image image_id: - ./image.sh {{image_id}} | magick display -resize 500% - +run file *args: + sqlite3 "{{DB}}" {{args}} < "{{file}}" + +image file *args: + #!/usr/bin/env sh + set -eu + image_id=$(just run "{{file}}" {{args}}) + just show-image "$image_id" + +show-image image_id: + #!/usr/bin/env sh + echo "Displaying $image_id" 1>&2 + ./image.sh {{image_id}} | magick display - repl *args: - rlwrap sqlite3 fun.db {{args}} + rlwrap sqlite3 "{{DB}}" {{args}} -setup-db: - rm fun.db - sqlite3 fun.db < setup.sql +reset-db: + rm "{{DB}}" + sqlite3 "{{DB}}" < setup.sql |
