This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-25
Channels
- # announcements (14)
- # aws (1)
- # babashka (23)
- # beginners (442)
- # calva (50)
- # chlorine-clover (1)
- # cider (32)
- # clojure (124)
- # clojure-europe (35)
- # clojure-france (5)
- # clojure-gamedev (5)
- # clojure-nl (2)
- # clojure-portugal (3)
- # clojure-uk (4)
- # clojurescript (56)
- # conjure (5)
- # cursive (24)
- # datalevin (1)
- # datomic (57)
- # fulcro (35)
- # helix (15)
- # holy-lambda (8)
- # introduce-yourself (1)
- # jobs (5)
- # kaocha (1)
- # lsp (99)
- # malli (10)
- # music (1)
- # off-topic (22)
- # pathom (38)
- # podcasts-discuss (10)
- # polylith (10)
- # reitit (1)
- # releases (1)
- # remote-jobs (4)
- # shadow-cljs (18)
- # spacemacs (6)
- # tools-build (22)
- # vim (66)
- # xtdb (22)
What can bb do with excel? I have an office 365 sheet to which I want to append some extra CSV file i will render myself. Ideally without saving the office cloud sheet locally
There isn't a babashka excel library or pod as far as I know of, but for this use case you could try #nbb, which is a similar tool like babashka, but for Node.js: https://github.com/babashka/nbb/blob/main/examples/exceljs/example.cljs
Hi babashka users! What is the preferred way to parse date time strings in the tool? I've just got an error:
----- Error --------------------------------------------------------------------
Type: java.lang.Exception
Message: Could not find namespace: clojure.instant.
Location: /Users/walkiewk/code/clojure/bb/./gcp_assets.clj:6:3
@UF2E3JR51 Use java.time
how does io/resource
work differently with bb? I have a bb server running and there are files in /resources/foo.edn
but io/resource
doesn't find them
@benjamin.schwerdtner you have to add resources
to the classpath
Thanks! --classpath worked and bb.edn not. Now I released that my bb-server script overrode the classpath. I think I took that from some the book or somewhere
#!/usr/bin/env bb
(import [ ServerSocket]
[ File]
[java.lang ProcessBuilder$Redirect])
(require '[babashka.wait :as wait])
(let [nrepl-port (with-open [sock (ServerSocket. 0)] (.getLocalPort sock))
cp (str/join File/pathSeparatorChar ["src" "test"])
pb (doto (ProcessBuilder. (into ["bb" "--nrepl-server" (str nrepl-port)
"--classpath" cp]
*command-line-args*))
(.redirectOutput ProcessBuilder$Redirect/INHERIT))
proc (.start pb)]
(wait/wait-for-port "localhost" nrepl-port)
(spit ".nrepl-port" nrepl-port)
(.deleteOnExit (File. ".nrepl-port"))
(.waitFor proc))
I will change my version so it uses the bb.edn path, if thereyes, this was in the book before but I changed this example since there are better options now
The book now has this:
{:tasks
{:requires ([babashka.fs :as fs]
[babashka.process :as p :refer [process]]
[babashka.wait :as wait])
nrepl (let [port (with-open [sock (java.net.ServerSocket. 0)] (.getLocalPort sock))
proc (process (str "bb nrepl-server " port) {:inherit true})]
(wait/wait-for-port "localhost" port)
(spit ".nrepl-port" port)
(fs/delete-on-exit ".nrepl-port")
(deref proc))}}