This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-09
Channels
- # announcements (23)
- # asami (25)
- # babashka (38)
- # beginners (53)
- # calva (17)
- # clara (5)
- # clj-commons (1)
- # clj-kondo (18)
- # clojure (11)
- # clojure-europe (17)
- # clojure-france (1)
- # clojure-germany (5)
- # clojure-nl (2)
- # clojure-sg (4)
- # conjure (3)
- # deps-new (6)
- # fulcro (16)
- # off-topic (46)
- # pedestal (11)
- # react (2)
- # reagent (5)
- # reclojure (7)
- # rewrite-clj (1)
- # sci (18)
- # shadow-cljs (75)
- # sql (3)
- # xtdb (12)
hey, I'm making some progress on the babashka pod to wrap archiver (https://github.com/mholt/archiver)
first pre-release binaries are here: https://github.com/justone/pod-babashka-archiver/releases/tag/v0.0.1-pre1
cool! meanwhile @U051N6TTC is looking at adding docstring support for pods :)
feel free to make a PR to the registry when you think it's ready. I'll play around with it
the functions provided map to their equivalents in https://pkg.go.dev/github.com/mholt/archiver#pkg-functions
Argh! Please don’t commit me to anything until I’ve got into it! I’m actually editing 2 different projects at the same time right now!
cool, glad that the docstring support is coming. That makes me think about other things, like arglists, would those be useful to specify and publish?
@U051N6TTC oh no pressure! you can quit any time and then I'll just take it over. you asked for something to do, but there are of course no strings attached :) and there is no deadline
@U051N6TTC I can remove my messages with your name and then you can retract yours if you wish :)
@U0510902N What would, from e.g. https://github.com/justone/pod-babashka-archiver/blob/95bccbf07e2fc11dfb077fc955a26d51b0d2bada/main.go#L20, be a good format for adding metadata under the meta
key? An EDN string, JSON (since you're using that as the payload format) ?
Say you wanted to add {:doc "foobar" :private true}
, you could just write this literally as EDN, wrap it in a string and then be done. but would there be a reason to generate this programmatically from a pod, where you don't always have an EDN library?
I really like the fidelity of using edn. I can't think of a reason to need to dynamically generate edn, but there are libs in most languages for it. https://github.com/edn-format/edn/wiki/Implementations#recommended-implementations
Well let’s settle on an EDN string then. When people want to pass the payload format such as JSON we could make another option for this, like meta-format or so.
@U0510902N a small note: the pod-<your-id>-<name-of-pod> convention is intended to use a unique name for your-id, the babashka
is reserved for pods created within the bb org, so pod-justone-archiver
would be a good name I think instead
the name of your github repo doesn't really matter but this convention exists to prevent having binary name clashes in case you installed the pod using brew or so
Ok, renamed and another prerelease published: https://github.com/justone/pod-justone-archiver/releases/tag/v0.0.1-pre2
anyone have a chance to try it out? here's some sample code:
#!/usr/bin/env bb
(require '[babashka.pods :as pods])
(pods/load-pod "./pod-justone-archiver")
(require '[pod.archiver :as archiver])
(archiver/archive ["."] "../archive.tgz")
(archiver/unarchive "../archive.tgz" "test-dir")
(archiver/compress-file "main.go" "main.go.gz")
(archiver/decompress-file "main.go.gz" "main.go.new")
(archiver/extract "../archive.tgz" "main.go" "test-dir-2")
Haha, I was trying it from my Downloads directory and didn't notice it archived the entire dir :)
@U0510902N quoll (and now I can finally mention her name since she has done the work!) made metadata support: https://github.com/babashka/pods#metadata I bumped babashka master using this. You can grab it from #babashka-circleci-builds or build yourself and test with your pod (or test directly with the pods repo)