diff options
| author | kaa <kaa@disroot.org> | 2025-07-13 05:33:52 -0700 | 
|---|---|---|
| committer | kaa <kaa@disroot.org> | 2025-07-13 05:33:52 -0700 | 
| commit | f4d85fb2e02387f2a774855a35250fdeffcb6fd6 (patch) | |
| tree | e527e540bda0f1e8568e1775afecd65b435faeb4 /lib | |
| parent | 8f4bb7e9ebc39418d9ef341a9e913d63eff0535d (diff) | |
Retstructure translation, so that output formats are iterable.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/translate/translate.go | 1 | ||||
| -rw-r--r-- | lib/translate/troff/header | 83 | 
2 files changed, 84 insertions, 0 deletions
diff --git a/lib/translate/translate.go b/lib/translate/translate.go new file mode 100644 index 0000000..c2cb5d5 --- /dev/null +++ b/lib/translate/translate.go @@ -0,0 +1 @@ +package translate diff --git a/lib/translate/troff/header b/lib/translate/troff/header new file mode 100644 index 0000000..31ef0a5 --- /dev/null +++ b/lib/translate/troff/header @@ -0,0 +1,83 @@ +.ad pb +.pmll 20 999999 +.ss 12 0 +.ssh 15 +.kn 1 +.hlm 2 +.ds margin 1.25i +.po \*[margin] +.de header +'	sp \*[margin] +.. +.de footer +'	bp +.. +.wh 0 header +.wh -\*[margin] footer +.ds measure 6i +.ll \*[measure] +.ds body_size 11 +.ds body_spacing 14 +.ps \*[body_size] +.vs \*[body_spacing] +.\" Extra parsing needed: a -> {post.url, post.mark}. +.de reset +.	ps \*[body_size] +.	vs \*[body_spacing] +.. +.de p +.	ti +1m +.. +.de /p +.. +.de i +.. +.de /i +.. +.de div +.	sp +.. +.de /div +.	sp +.. +.\" As the file is traversed, record .sy to a temporary file. +.\" Format using sed, source using .so. Idea taken from utmac. +.\" Then, at the document's end, write the TOC from the recording. +.de a +.. +.de /a +.. +.de strong +.	ft B +.. +.de /strong +.	ft +.. +.de span +.. +.de /span +.. +.de h1 +.	ft \*[FONT_DISPLAY] +.	ps 60 +.	vs 80 +.. +.de /h1 +.	reset +.. +.de h2 +.	ft \*[FONT_SUBHEAD] +.	ps 40 +.	vs 60 +.. +.de /h2 +.	reset +.. +.de h3 +.	h2 +.	ps 30 +.	vs 20 +.. +.de /h3 +.	/h2 +..  | 
