Handbook
Glossary
code>toc-html ( dir name files -- html )
Vocabulary
codebook
Inputs
dir
an
object
name
an
object
files
an
object
Outputs
html
an
object
Definition
USING:
calendar
calendar.format
io
io.directories
io.pathnames
xml.data
xml.syntax.private
;
IN:
codebook
::
code>toc-html
( dir name files -- html )
"Generating HTML table of contents"
print
flush
now
timestamp>rfc822
:>
timestamp dir
absolute-path
:>
source dir
[
files
toc-list
:>
toc
H{
{
"timestamp"
timestamp
}
{
"toc"
toc
}
{
"name"
name
}
{
"source"
source
}
}
T{
xml
{
prolog
T{
prolog
{
version
"1.0"
}
{
encoding
"UTF-8"
}
}
}
{
before
V{
T{
doctype-decl
{
name
"html"
}
}
" "
}
}
{
body
T{
tag
{
name ~name~
}
{
children ~vector~
}
}
}
{
after
V{
""
}
}
}
interpolate-xml
]
with-directory
;