Additives
Addtivies is a collection of useful extensions to Liquid that are too specialized to be in the core code.
It is an ongoing project where maturity of the extensiens might differ. Use what you find useful.
Interact with documents using blob
and create mindmaps from indented lists.
given โฎ
when โผ bdd โฎ
then โฏ โ โญ mindmap โฌ mindmap
โ extension โฎ โ โฐ mindmap-to-indent
clojure โฎ โ โฐ highlight โฎ โ
markdown โด other โฏ โ โ โญ blob
โ โญโโโโโโโโโโโโฎ โ โ eval-blob
โโโค Additives โโโผ blob โผ delete-blob
โ โฐโโโโโโโโโโโโฏ โ โ insert-blob
mindmap โฎ โ โ โฐ replace-blob
blob โค โ โ
browserapp โผ require โ .liq โฏ โฐ browserapp โ requires โ lynx
clojuremdbddhl โฏ
Blob
Blob is a function to read parts of the current document and probably perform calulations on it.
To use it add Additives to the classpath when starting Liquid and add
[dk.salza.additives.blob :refer :all]
to the :require
section in .liq
.
To get the content between :data
and :data
acall (blob :data)
.
In the code snippet below if you evaluate the replace-blob...
function Liquid will read what is inside :data
and the replace what is inside :output
with the mindmap genereated from :data
. Feel free to experiment.
(replace-blob :output (str "\n" (mindmap (blob :data) :indent 6) "\n"))
:data
Center
Topic1
Subtopic11
Subtopic12
Topic2
:data
:output
โญโโโโโโโโโฎ โญ Topic1 โฌ Subtopic11
Topic2 โโโค Center โโโฏ โฐ Subtopic12
โฐโโโโโโโโโฏ
:output
Mindmap
Mindmap has a function for turning a nested list and an indented list (2 spaces) into a mindmap. Also the reverse functions is available for turning a mindmap into an indented list.
To use it add Additives to the classpath when starting Liquid and add
[dk.salza.additives.mindmap :refer [mindmap mindmap-to-indent]]
to the :require
section in .liq
.
Evaluating
(mindmap '(Center (Topic1 Subtopic1 Subtopic2) Topic2))
Will output:
โญโโโโโโโโโฎ โญ Topic1 โฌ Subtopic1
Topic2 โโโค Center โโโฏ โฐ Subtopic2
โฐโโโโโโโโโฏ
Highlight
Highlight added for Behaviordriven development (Given, When, Then) and mindmaps.
To use it add Additives to the classpath when starting Liquid and add
[dk.salza.additives.clojuremdbddhl :as clojuremdbddhl]
to the :require
section in .liq
and put
(editor/set-default-highlighter clojuremdbddhl/next-face)
into the .liq
as well.
Browser
Experimental browser using Lynx as engine. Requires Lynx to be installed.
License
Copyright ยฉ 2018 Mogens Brรธdsgaard Lund
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.