From 8c62edb87433bd0ac93fdef4585582990513236b Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 2 Jun 2026 22:24:49 +0530 Subject: Add gradient example --- justfile | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'justfile') diff --git a/justfile b/justfile index 11043e7..b67c6f8 100644 --- a/justfile +++ b/justfile @@ -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 -- cgit v1.3.1