PODTREE2HTML(1p)
π PODTREE2HTML β the podtree2html page, but make it cute π
okay so bestie, you found the manual page for podtree2html, from the User Contributed Perl Documentation section (that's the 1p part, iykyk). she's a Perl script, she's iconic, and she turns POD into HTML. let's get into it π¦
β¨ NAME β¨
podtree2html β translate a POD to HTML π
πΈ SYNOPSIS πΈ
"podtree2html" ["--base" url] ["--css" url] ["--"["no"]"toc"] ["--hr"
level] ["--bgcolor" #rrggbb] ["--text" #rrggbb] ["--variables"
values.pl] source dest [template] [variable=value ...]]
π DESCRIPTION π
so here's the tea: podtree2html reads the POD sitting in the file source, translates the whole thing to HTML, and writes it out to the file dest. and dest? it gets created world-readable. no secrets here, she's an open book fr fr π«Ά
if you hand her a template file, then template gets filled in by the Text::Template module and the result is written to dest. here's a minimal template that shows off every variable podtree2html sets, no cap:
<html>
<head>
<base href="{$base}">
<link href="{$css}" rel="stylesheet" type="text/css">
<title>{$title}</title>
</head>
<body bgcolor="{$bgcolor}" text="{$text}">
{$toc}
{$body}
</body>
</html>
now, if you pass the --variables option, then the file values.pl gets executed with a do call before the template is filled in. and values.pl can contain arbitrary Perl code, like, anything. the program fragments in the template get evaluated in the Pod::Tree::HTML package, so any variables that values.pl sets in that package are available to the template. slay π
you can also set additional scalar variables right on the command line with the variable=value syntax. do not prefix variable with a $ sigil, bestie, just don't. and heads up: variables set on the command line override variables set in values.pl. main character energy, honestly π
π OPTIONS π
--baseurl β translatesL<>sequences into HTML links relative to url. β¨--cssurl β specifies a Cascading Style Sheet for the generated HTML page. here are example rules for all the different HTML elements that may show up in a POD:
a:link { background: #ff8080 }
body { background: #f0f0f0 }
code { background: #c0ffc0 }
dd { background: #ffffe0 }
dl { background: #fffff0 }
dt { background: #ffffc0 }
h1 { background: #ffc0c0 }
h2 { background: #ffe0e0 }
hr { background: #ff0000; height: 5px }
i { background: #ffc0c0 }
li { background: #e0e0e0 }
ol { background: #fff0ff }
p { background: #f0f0ff }
pre { background: #f0fff0 }
ul { background: #f0ffff }
--["no"]tocβ includes or omits the table of contents. default is to include the TOC. π§--hrlevel β controls the profusion of horizontal lines in the output, like so:- level
0β no horizontal lines - level
1β horizontal lines between TOC and body - level
2β horizontal lines after each=head1 - level
3β horizontal lines after each=head1and=head2
- level
default is level 1. π
--bgcolor#rrggbb β set the background color to#rrggbb. default is white. π€--text#rrggbb β set the text color to#rrggbb. default is black. π€--variablesvalues.pl β execute the file values.pl with adocall before filling in template. values.pl may contain arbitrary Perl code. π
π₯ REQUIRES π₯
Pod::Tree::HTML
π¦ SEE ALSO π¦
pods2html, Pod::Tree::HTML
π AUTHOR π
Steven McDougall, <swmcd@world.std.com>
πΈ COPYRIGHT πΈ
Copyright (c) 1999-2007 by Steven McDougall. This program is free software; you can redistribute it and/or modify it under the same terms as Perl.
ok that's the whole page bestie, every last flag and caveat, nothing skipped, periodt π
and a lil sign-off for the girlies: this one's from perl v5.36.0, dated 2022-11-19 β vintage but still eating πβ¨π
π¦ where this page comes from
- debian bookworm: libpod-tree-perl 1.31-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libpod-tree-perl 1.31-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libpod-tree-perl 1.31-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpod-tree-perl 1.31-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpod-tree-perl 1.31-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms