summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAsko Nõmm <asko@nmm.ee>2025-10-19 15:50:54 +0300
committerAsko Nõmm <asko@nmm.ee>2025-10-19 15:50:54 +0300
commit091952f47bbb34894c143a5ce6d504c26a1ce0ff (patch)
treeb409820c6c5f08b3e858c45f72d2856e4e7ced9c /README.md
parentaf50c1c03b4a4812de868fd74941801152e85bbf (diff)
Update README
Diffstat (limited to 'README.md')
-rw-r--r--README.md21
1 files changed, 20 insertions, 1 deletions
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