This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-18
Channels
- # announcements (4)
- # babashka (13)
- # beginners (8)
- # chlorine-clover (1)
- # cider (5)
- # clj-http (12)
- # clojure (157)
- # clojure-dev (14)
- # clojure-europe (26)
- # clojure-nl (2)
- # clojure-norway (68)
- # clojure-uk (6)
- # clojuredesign-podcast (21)
- # clojurescript (7)
- # core-async (4)
- # datomic (170)
- # editors (1)
- # hyperfiddle (45)
- # java (7)
- # joyride (1)
- # leiningen (43)
- # lsp (7)
- # malli (24)
- # music (1)
- # off-topic (22)
- # pathom (16)
- # portal (31)
- # re-frame (1)
- # releases (1)
- # shadow-cljs (36)
- # squint (4)
Q: I want to parse html i.e. not well formed xml. is there something like jsoup that works with bb?
probably bootleg is your best best: https://github.com/babashka/pod-registry/blob/master/examples/bootleg.clj else I'd go for #nbb + any of the Node.js html libs
ok. bootleg works but it needs the html on a single line i.e. can’t handle newlines. with a single line it returns hiccup which I can walk
perhaps @U1QQJJK89 can add his knowledge about bootleg, I'm 💤 now
I have a solution by concat’ing the line-seq so I don’t need more help. providing feedback in case it’s useful for anyone in future
I am developing a babashka script which will run under Linux. I would like to let it check if it is running as superuser and alter its behavior accordingly. Is there an elegant way to do it in babashka besides
(= (-> (clojure.java.shell/sh "whoami")
(:out)
(clojure.string/trim))
"root")