Go to file
2026-10-12 19:37:42 +02:00
lib/plankton [upd] plankton 2024-05-03 11:00:02 +02:00
misc [mod] auf ivaldi umgestellt 2026-10-12 19:37:42 +02:00
source [fix] output:markdown:table 2026-10-09 10:15:19 +02:00
tools [mod] auf ivaldi umgestellt 2026-10-12 19:37:42 +02:00
.gitignore [add] lib:plankton [mod] impl 2024-02-08 10:41:17 +01:00
ivaldi.json [mod] auf ivaldi umgestellt 2026-10-12 19:37:42 +02:00
readme.md [mod] auf ivaldi umgestellt 2026-10-12 19:37:42 +02:00

docdef

zum Erzeugen von Dokumenten anhand von JSON-Daten

Erstellung

  • tools/ivaldi build ausführen

Nutzung

Am beigefügten Beispiel polyhedra:

misc/conv misc/examples/polyhedra/transform-default.js misc/examples/polyhedra/data.json | build/sd -o markdown > /tmp/polyhedra-default.md

Der erste Teil (vor der Pipe) transformiert die rohen Daten in ein ein JSON-Dokument im sd-Dialekt. build/sd -o markdown liest dieses Dokument von der Standard-Eingabe und erzeugt die Ausgabe im Markdown-Format.

Folgende Abwandlungen sind möglich:

# Markdown-Tabelle
cat misc/examples/polyhedra/data.json | misc/conv misc/examples/polyhedra/transform-table.js | build/sd -o markdown > /tmp/polyhedra-table.md

# HTML-Liste
cat misc/examples/polyhedra/data.json | misc/conv misc/examples/polyhedra/transform-default.js | build/sd -o html > /tmp/polyhedra-default.html

# HTML-Tabelle
cat misc/examples/polyhedra/data.json | misc/conv misc/examples/polyhedra/transform-table.js | build/sd -o html > /tmp/polyhedra-table.html