-
-
Save asimjalis/8ea6121fa652001546c6d6cbd713e301 to your computer and use it in GitHub Desktop.
Try `clojure -Sdeps '{:deps {hello-clojure {:git/url "https://gist.github.com/asimjalis/8ea6121fa652001546c6d6cbd713e301" :sha "1c9a05106171f97f9b8e8ac8f58c7bd8dbe021f9"}}}' -m hello-clojure` on your terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:paths ["."] | |
:deps {clansi {:mvn/version "1.0.0"}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns hello-clojure | |
(:require clansi | |
[clojure.java.io :as io])) | |
(def styles | |
{\b :bg-blue | |
\g :bg-green | |
\w :bg-white}) | |
(defn colorize-line [line] | |
(->> line | |
(map #(clansi/style " " (get styles % :bg-default))) | |
(apply str))) | |
(defn -main [] | |
(with-open [r (io/reader (io/resource "logo.dat"))] | |
(run! #(println (colorize-line %)) (line-seq r)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----------wwwwwwwwww----------- | |
---------wwwwwbbbbwwwww--------- | |
-------wwwbbbbbbbbbbbwwww------- | |
------wwbbbbbbbbbbbbbbbwww------ | |
-----wwbbbbbbbbbbbbbbbbbbww----- | |
----wwbbbbbbbbbbbbbbbbbbbbww---- | |
---wwwwwwwwbbbbbbbbbbbbbbbbww--- | |
--wwwwwwwwwwwwwwwwwbbbbbbbbbww-- | |
--wwwwgggwwwwwbbbbwwwbbbbbbbww-- | |
-wwwwggggwwgwwbbbbbbwwbbbbbbbww- | |
-wwwgggggwwggwwbbbbbbwwbbbbbbww- | |
wwwgggggwwgggwwbbbbbbbwwbbbbbbw- | |
wwgggggwwgggggwwbbbbbbbwbbbbbbww | |
wwgggggwwgggggwwbbbbbbbwwbbbbbww | |
wggggggwgggggggwbbbbbbbwwbbbbbww | |
wggggggwgggggggwbbbbbbbbwbbbbbww | |
wggggggwggggggwwwbbbbbbbwbbbbbww | |
wggggggwgggggwwgwbbbbbbwwbbbbbww | |
wwgggggwwggggwggwwbbbbbwwbbbbbww | |
wwggggggwgggwwggwwbbbbbwbbbbbbw- | |
-wggggggwwggwggggwwbbbwwbbbbbww- | |
-wgggggggwwgwggggwwbbwwbbbbbwww- | |
-wwgggggggwwwgggggwwwwbbbbwwww-- | |
--wwgggggggwwwwggwwwwwwwwwwwww-- | |
--wwgggggggggwwwwwwgggwwwwggw--- | |
---wwggggggggggggggggggggggww--- | |
----wwggggggggggggggggggggww---- | |
-----wwggggggggggggggggggww----- | |
------wwwggggggggggggggwww------ | |
--------wwwggggggggggwww-------- | |
----------wwwwwwwwwwww---------- | |
-------------wwwwww------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment