29 lines
987 B
Markdown
29 lines
987 B
Markdown
# docdef
|
|
|
|
zum Erzeugen von Dokumenten anhand von JSON-Daten
|
|
|
|
|
|
## Nutzung
|
|
|
|
Am beigefügten Beispiel `polyhedra`:
|
|
|
|
```sh
|
|
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:
|
|
|
|
```sh
|
|
# Markdown-Tabelle
|
|
misc/conv misc/examples/polyhedra/transform-table.js misc/examples/polyhedra/data.json | build/sd -o markdown > /tmp/polyhedra-table.md
|
|
|
|
# HTML-Liste
|
|
misc/conv misc/examples/polyhedra/transform-default.js misc/examples/polyhedra/data.json | build/sd -o html > /tmp/polyhedra-default.html
|
|
|
|
# HTML-Tabelle
|
|
misc/conv misc/examples/polyhedra/transform-table.js misc/examples/polyhedra/data.json | build/sd -o html > /tmp/polyhedra-table.html
|
|
```
|
|
|