POD2PANDOC(1p)

πŸ’– POD2PANDOC(1p) πŸ’–

okay so bestie, this is pod2pandoc β€” a little icon from the User Contributed Perl Documentation corner of the universe, and she converts Pod to the Pandoc document model. no cap. let's get into it 🫢


✨ NAME ✨

pod2pandoc β€” convert Pod to Pandoc document model πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

pod2pandoc [OPTIONS] {INPUT} [ [ -- ] PANDOC_ARGUMENTS ]

pod2pandoc Module.pm -o Module.pdf
pod2pandoc script.pl -t markdown
pod2pandoc Module::Name -o Module-Name.html
pod2pandoc lib/ wiki/ --ext .md --wiki --index Home -t markdown_github
pod2pandoc lib/ docs/ --standalone

🌸 DESCRIPTION 🌸

so pod2pandoc takes "Plain Old Documentation" format (aka Pod, see perlpod, iykyk) and flips it into the Pandoc document model β€” the one from <http://pandoc.org/> β€” so it can get processed even further into literally any other document format you want: HTML, Markdown, LaTeX, PDF, EPUB, docx, ODT, man… the whole girlies lineup. it's giving versatility πŸ‘‘

by default β€” or if you pass input - β€” a document gets read from STDIN. if you hand her multiple input files, they get combined into one document and listed in the document metadata field file. the result gets printed in JSON format, OR it gets passed straight to Pandoc if you give extra options like -t or -o. slay.

and to process a whole directory of .pm and/or .pod files? just specify an input directory as the first input, and an optional output directory as the second. main character energy fr fr 🌈


πŸ’… OPTIONS πŸ’…

  • --help, -h, -? β€” prints out usage information and dips. exit, periodt. ✨
  • --parse FORMATS β€” parse and include data sections. use "*" for all of them.
  • --podurl URL β€” base URL to Perl modules. default is "https://metacpan.org/pod/". a false value such as 0 or "" will disable linking to external modules. lowkey handy.
  • --ext EXT β€” output file extension when processing a directory. default is "html".
  • --index NAME β€” index file name (like "index.html") when processing a directory. can be disabled with 0.
  • --name β€” include the NAME section, which is removed by default. (rude of the default honestly, but okay πŸ™ˆ)
  • --wiki β€” create wikilinks when processing a directory.
  • --update β€” only process when the input file is newer than the output file. efficiency queen ⭐
  • --default-meta FILE β€” read default metadata from the given file.
  • --quiet β€” don't emit warnings and status information. shhh 🀫
  • ... β€” any additional options get passed through to the pandoc executable. it's giving teamwork 🫢

πŸŽ€ SEE ALSO πŸŽ€

this script is part of Pod::Pandoc and implemented in App::pod2pandoc. together with the Pandoc document converter, it can be used as a customizable replacement for all those specialized Pod converter scripts, like:

  • pod2html
  • pod2projdocs
  • pod2man
  • pod2readme
  • pod2usage
  • pod2latex
  • pod2markdown
  • pod2text
  • pod2projdocs

(yes pod2projdocs is in there twice, she's just that iconic πŸ’€βœ¨)


vibe check complete: every flag, every default, every path β€” all present and accounted for. no details were harmed in the making of this manpage πŸ’–

perl v5.32.1 Β· 2022-01-20 β€” that's the version and date bestie, and honestly? she ate. go convert something gorgeous πŸŒˆπŸ‘‘πŸ’