Fork me on GitHub
#beginners
<
2019-11-03
>
stardiviner09:11:16

How to handle directory path contains space? Like "/path/to the/file.jpg", I'm using .

stardiviner09:11:44

Clojure reports error:

stardiviner09:11:49

Unhandled java.io.FileNotFoundException
   test jj/kk.jpg (No such file or directory)

stardiviner09:11:11

Here is my code:

stardiviner09:11:16

clojure
(io/copy (io/input-stream "")
         (io/output-stream (str "test jj" "/" "kk.jpg")))

Amanu09:11:46

It is because the directory doesn't exist. Please try without the directory, or create the directory first

stardiviner09:11:42

Is there a way to automatically create directory which does not exist?

indy12:11:59

Hi all, I'm trying to emulate the or macro but I'm getting the following error

indy12:11:35

Here is my code

indy13:11:14

Solved it!

Amanu13:11:24

Anyone know a library that can generate images from HTML string in clojure?

Lennart Buit15:11:40

in what sense? Like a headless browser?

Lennart Buit15:11:49

you can control a regular browser and make screenshots using something like etaoin: https://github.com/igrishaev/etaoin

tdantas18:11:54

hey guys, I’m trying to make my code more testable/functional and I wrote the gist (https://gist.github.com/tdantas/1daa70b780d80e51e86416eb7dcf95ac) to understand how would you guys transform the js imperative code into clojure functional code

tdantas18:11:27

my first approach was only using functions, my second one will be using protocols for ‘statefull’ components

👍 4