From 091952f47bbb34894c143a5ce6d504c26a1ce0ff Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Sun, 19 Oct 2025 15:50:54 +0300 Subject: Update README --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a4dafe..2125eb3 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,16 @@ Dompa is continuesly tested to run in the following Clojure runtimes: - ClojureScript - Babashka +## Installation + +You can fetch it straight from GitHub by adding this to your `deps.edn`: + +```clojure +{:deps {askonomm/dompa {:git/url "https://github.com/askonomm/dompa" + :git/tag "v1.0.0" + :git/sha "af50c1c03b4a4812de868fd74941801152e85bbf"}}} +``` + ## Usage ### Parsing HTML @@ -143,4 +153,13 @@ And of course making lists and such works the same as you'd imagine: (hello-page) ``` -Do note that when using the `defhtml` macro in ClojureScript, you have to use `:refer-macros` instead of `:refer`, due to the differences in how ClojureScript deals with macros. \ No newline at end of file +Do note that when using the `defhtml` macro in ClojureScript, you have to use `:refer-macros` instead of `:refer`, due to the differences in how ClojureScript deals with macros. + +### Other + +While the above covers the most common use cases of Dompa, such as turning HTML into a tree of nodes and vice versa, you can actually make use of the underlying lower-level stuff that makes it all work separately as well: + +- `dompa.coordinates/compose` - create coordinates (range positions) of HTML nodes from a HTML string +- `dompa.coordinates/unify` - unify coordinates (merges the same block nodes together) +- `dompa.coordinates/->nodes` - transform coordinates into a tree of nodes +- `dompa.html/->coordinates` - transform HTML into coordinates \ No newline at end of file -- cgit v1.2.3