PunDoc
Beschreibung
PunDoc (Yes, pun intended :) ist ein Präprozessor (aka 'static site generator') für pandoc. Prinzipiell wandelt PunDoc nur ganze Ordner mit Markdown-Textdateien in HTML um (bzw. beliebige einstellbare Ein/Ausgabe-Formate). Dazu kommt ein einfacher Variablen und Include-Mechanismus.
- Include:
$include(file=file.tmpl argument=value)$ - Variable:
${argument}(mit Inhaltvalue) - Art von Wiki-Links: aus
[Link-Test]$(test.txt)wird[Link-Test](test.html)(FROM_SUFFIX wird in TO_SUFFIX geändert und TO_BASE ergänzt)
Genaue Beschreibung und Veröffentlichung folgt noch.
Beispiel
pundoc.ini[main]
FROM_SUFFIX=.txt
FROM_FORMAT=markdown
;FROM_DIR=${CWD}\src
FROM_DIR=${CWD}\dst
;TO_BASE=http://www.foobar.local/
TO_SUFFIX=.html
TO_FORMAT=html5
TO_DIR=${CWD}\dst
EXEC_BIN=pandoc.exe
EXEC_CMD=${EXEC_BIN} -f ${FROM_FORMAT} -t ${TO_FORMAT} -H "${CWD}\header.txt" -B "${CWD}\menu.txt" -A "${CWD}\footer.txt" -o "${TO_FILE}" "${FROM_FILE}"
;KEEP_TEMPS=1
;DEBUG=1
DEBUG_PREFIX=""
test.txt
$include(file=template.tmpl title="Title but non existing opt-file!"
opt=opt-NO-SUCH-file )$
$include(file=template.tmpl title="Hello World!" opt=opt-file )$
template.tmpl
## ${title}
$include(file="${opt}.tmpl")$
opt-file.tmpl
'${title}' worked!
Zwischenergebnis wird pandoc gefüttert
test.txt## Title but non existing opt-file!
## Hello World!
'Hello World!' worked!
Ergebnis
test.html
Future
Portierung auf Python
| Oberfläche | CLI, Conf |
| Sprache | Englisch |
| System Anforderungen | >=Windows XP |
| Getestet auf | Windows 7 |
| Quellcode | AutoIt3 |
| Lizenz | Donateware |
Download
Wenn Ihr Fehler findet oder Features wünscht, meldet Euch!
| Datei | Größe | md5 | |
|---|---|---|---|
| Download | - | 0 KB | - |
Ich freue mich über Ihre Spende!

Änderungen
Tags: web, html, pandoc, markdown, static site generator
