Scenarios with Clojure

I tried to do some simple scripting with Clojure. For example, I would download json, which contains the map from the file, delete the given key and save it back to the file. With leiningen, it seems, I will need to create an application, add data.json or something depending, then I could start replacing the lane to do the real work. Think about the same thing as Python. This should be done with 3 lines of code in Python. Is there an easy way to do this with leiningen?

+6
source share
2 answers

You can try the lein-oneoff plugin that was created for such situations (I am the author). It allows you to make dependencies and write code in a single file, avoiding the need to create a proper leiningen project.

+12
source

You can use lein-exec .

To add a little more information, I wrote some notes on stand-alone scripts with Clojure .

+7
source

Source: https://habr.com/ru/post/945966/


All Articles