Fork me on GitHub
#babashka
<
2021-09-20
>
Jakub Holý (HolyJak)12:09:30

is there something for transforming markdown to html from bb scripts? Perhaps only https://github.com/retrogradeorbit/bootleg ?

borkdude12:09:06

yeah, bootleg

👍 2
borkdude12:09:11

Another option using #nbb :

borkdude12:09:19

$ npm install showdown
$ nbb -e '(ns foo (:require ["showdown$default" :refer [Converter]]))
(def converter (new Converter))
(def text "# hello, Markdown!")
(.makeHtml converter text)
'
"<h1 id=\"hellomarkdown\">hello, Markdown!</h1>"

Jakub Holý (HolyJak)19:09:22

Why would

(ns html2dash
  (:require 
   [babashka.pods :as pods]))

(pods/load-pod "bootleg")
fail with java.io.IOException: error=2, No such file or directory html2dash /my/cwd/html2dash.bb:1:1 ?

borkdude19:09:09

I think it tries to load bootleg from your system path but you haven't got it installed probably

2
borkdude19:09:46

and the bootleg documentation should probably reflect this

borkdude19:09:03

pod registry = kind of a package manager idea for pods

Jakub Holý (HolyJak)19:09:44

I know I just always forget the difference between how loading local vs. registry pod looks like 🙂

👍 2
mmer20:09:53

Hi, I was wondering if there is a way to copy file recursively . I am running on windows.

borkdude20:09:44

@mmer you mean a directory?

mmer20:09:17

when running the clojure sh I get a process error

borkdude20:09:56

the names of those -tree functions are inspired by Window's deltree etc which I used as a kid ;P

mmer20:09:00

Thanks - I culd not see it for the trees - I had looked in there

mmer20:09:20

Will that only work in babashka?

borkdude20:09:33

@mmer babashka.fs is also available as a JVM library

mmer20:09:37

Thanks that worked.