PODTREE2HTML(1p)

πŸ“¦
version 1.31 Β· 2 versions
  • 1.31 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.31 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ‘‘ 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 πŸ’…

  • --base url β€” translates L<> sequences into HTML links relative to url. ✨
  • --css url β€” 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. 🧚
  • --hr level β€” 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 =head1 and =head2

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. πŸ–€
  • --variables values.pl β€” execute the file values.pl with a do call 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 (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