Generate a static HTML/CSS/JS page that allows users to walk through a decision tree.
Assuming bbin is installed:
bbin install io.github.bzg/treesYou can try it against the config-example.yml file provided in this repository:
~$ trees config-example.yml
This generates index.html. You can pass another output file name as
a second argument:
~$ trees config-example.yml output.html
Display the installed version with trees -v (or --version).
See config-example.yml for a complete, commented example. Main
top-level options:
| Option | Description |
|---|---|
locale | UI language: en (default), fr, de or sv |
framework | CSS framework (see below) |
css-theme | CSS theme (see below) |
header | Page header: title and subtitle |
footer | Page footer: text and contact |
mail-to | Email address for sending results |
display-summary | Show the summary of answers on final pages |
display-score | Show the score result on final pages |
display-score-details | Show raw score values |
display-unconditionally | Extra text always shown along with the score |
score-variables | Score variables and their initial values |
conditional-score-output | Score-dependent messages on final pages |
ui-strings | Override built-in UI strings (e.g. redo, mail-subject) |
tree | The list of decision tree nodes |
Set framework in your config file. The default is pico.
| Framework | Value |
|---|---|
| Pico 2 | pico |
| Pure CSS | pure |
| Bulma | bulma |
When using Pico, you can set a theme with css-theme:
css-theme: "doric"The css-theme option accepts:
- A pico-themes name (e.g.
ashes,doric,swh) - An
http(s)://URL to a remote CSS file - A
file:///URL to a local CSS file - A local
.cssfile path
Available themes from pico-themes: swh, org, doric, lincoln, teletype, ashes.
For backward compatibility, theme-url and theme are still supported.
trees is written as a Clojure Babashka script and we recommend
installing it with bbin. Install everything:
brew install babashka/brew/bbinFor detailed installation instructions:
- Send a bug report with
[BUG] trees: <SHORT EXPLICIT BUG DESCRIPTION> - Send a patch with
[PATCH] trees: <COMMIT SUMMARY> - Send a feature request with
[FR] trees: <FEATURE REQUEST> - Share any other question or idea
You can also send me an email and support my work on liberapay.
This project uses Intentional Versioning, here are the three audiences:
Users: end users who use treesIntegrators: external packagersMaintainers: maintainers of the codebase
If you like Clojure(script), you can support the ecosystem by making a donation to clojuriststogether.org.
The code in this repository is licensed under EPL-2.0.