oh man, I used https://github.com/weavejester/progrock for the first time and it's amazing how nice it is to have a progress bar in my scripts (script is binning picture files into directories by year/month):
$ bin-pics
inspecting 253 files...
253/253 100% [==================================================] ETA: 00:00
copying 221 images...
221/221 100% [==================================================] ETA: 00:00
Hey, I’m trying to build a toy static site generator with bb and hooking up selmer with deps/add-deps but got error “couldn’t resolve symbol thread-bound?” Is there any workaround?
@romantsopin Not all libraries are compatible with babashka. I think your best bet in using selmer is via bootleg as a pod: https://github.com/retrogradeorbit/bootleg#babashka-pod-usage
Please do report incompatibilities with clojure, such as the one you have encountered and they may get fixed in the new release
Yea, I thought it’s quite common, so there should be a simple way :) thank you!
A peek of what is coming in 0.2.6: https://book.babashka.org/master.html#_pod_registry This should work with babashka master (available on #babashka_circleci_builds)
Btw, comb is a templating library that does work with bb: https://github.com/borkdude/babashka/blob/master/doc/projects.md#comb
(require '[babashka.deps :as deps])
(deps/add-deps '{:deps {comb/comb {:mvn/version "0.1.1"}}})
(require '[comb.template :as template])
(template/eval "<% (dotimes [x 3] %>foo<% ) %>")
^ @romantsopinThat’s what I’m looking for!
This is great, and the example is also one of the most featured request haha
Also another question, maybe there is a common way to watch directory and run a command on change? Something similar to hawk (which seems like incompatible)
@romantsopin This is also supported via a pod. https://github.com/babashka/pod-babashka-filewatcher
I'm using it to preview the babashka documentation while writing: https://github.com/babashka/book/blob/master/script/watch.clj
Great, will try it out
We are working on making pods installable from a central pod registry from within bb itself, it will take a few days. For now install via brew if you're on linux or macos or download manually