From 3b02353138b48e34d3f24a4636e9ec7420fc3903 Mon Sep 17 00:00:00 2001 From: eltrac Date: Tue, 3 Nov 2026 01:08:53 +0800 Subject: [chore] replace justfile with bb.edn --- bb.edn | 14 ++++++++++---- justfile | 38 -------------------------------------- 2 files changed, 10 insertions(+), 42 deletions(-) delete mode 100644 justfile diff --git a/bb.edn b/bb.edn index abb38cd3..2de8139a 100644 --- a/bb.edn +++ b/bb.edn @@ -1,7 +1,13 @@ {:tasks {serve (shell "hugo" "server" "-D") - deploy (shell "openrsync --rsync-path=openrsync -av ./public/ qwilfish:/var/www/html/geedeapro") - build (shell "bb" "./build.clj") - pub {:depends [build deploy] + deploy (shell "openrsync --rsync-path=openrsync -av ./public/ qwilfish:/var/www/html/geedeapro") + build (shell "bb" "./build.clj") + pub {:depends [build deploy] :task (println "Published!")} - make (shell "open https://invidious.nerdvpn.de/watch?v=YjXfjdCmfD4")}} + write (let [[slug] *command-line-args*] + (shell "hugo" "new" "content" (str slug ".md")) + (shell "nvim" (str "content/" slug ".md"))) + book (let [[title] *command-line-args*] + (def year (.getYear (java.time.LocalDateTime/now))) + (shell "bb" "write" (str "library/" year "/" title))) + make (shell "open https://invidious.nerdvpn.de/watch?v=YjXfjdCmfD4")}} diff --git a/justfile b/justfile deleted file mode 100644 index d360de9d..00000000 --- a/justfile +++ /dev/null @@ -1,38 +0,0 @@ -serve: - hugo server -D - -deploy: - openrsync --rsync-path=openrsync -av ./public/ qwilfish:/var/www/html/geedeapro -build: - bb ./build.clj - -pub: build deploy - -write section name: - hugo new content {{section}}/{{name}}.md - nvim ./content/{{section}}/{{name}}.md - -article name: (write "article" name) - -weekly name: (write "weekly" name) - -fiction name: (write "fiction" name) - -library name: - #!/usr/bin/env bb - (require '[babashka.tasks :refer [shell]]) - (import 'java.time.format.DateTimeFormatter - 'java.time.LocalDateTime) - (def date (LocalDateTime/now)) - (def formatter (DateTimeFormatter/ofPattern "yyyy")) - (def year (.format date formatter)) - (shell "just" "write" (str "library/" year) "{{name}}") - -make: - open https://invidious.nerdvpn.de/watch?v=YjXfjdCmfD4 - -ring: - @printf '\a' - -me: - @echo "Hey, kids. Spelling is fun!" -- cgit v1.2.3