Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (27 sloc) 826 Bytes
\setuplayout
[footer=0cm,
header=0cm,
width=middle,
height=middle]
\setuppagenumbering[location=]
\starttext
\registerctxluafile{haiku}{0.1}
\def\parsehaiku #1{\ctxlua{haiku.parse("#1")}}
\def\authorname #1{\ctxlua{haiku.author("#1")}}
\startxmlsetups xml:atom:base
\xmlsetsetup{atom}{feed}{xml:atom:feed}
\stopxmlsetups
\startxmlsetups xml:atom:feed
\xmlcommand{#1}{/entry}{xml:atom:entry}
\stopxmlsetups
\startxmlsetups xml:atom:entry
\def\AUTHOR{\xmlfirst{#1}{/author/name}}
\def\HAIKU{\xmlfirst{#1}{/title}}
\startframedtext[align=middle,frame=none,background=none,width=\textwidth]
\parsehaiku{\HAIKU}\par
---\authorname{\AUTHOR}\par
\stopframedtext
\stopxmlsetups
\xmlregisterdocumentsetup{atom}{xml:atom:base}
\xmlprocessfile{atom}{data/haiku.atom}{}
\stoptext
Something went wrong with that request. Please try again.