Pod::Pandoc(3pm)
π Pod::Pandoc π
okay so bestie, we're talking about Pod::Pandoc here β the Perl module, living in the User Contributed Perl Documentation section of your friendly neighbourhood man pages. Pull up a chair (or a beanbag, no judgement) and let's get into it π«Ά
β¨ NAME β¨
Pod::Pandoc β process Plain Old Documentation format with Pandoc. that's the whole vibe. no cap π
πΈ DESCRIPTION πΈ
okay so. Plain Old Documentation format (aka Pod) is a markup language used to document Perl code β if you want the full lore, go read perlpod for reference. and there are, like, several Perl modules out there that exist to process and convert Pod into other formats. a whole little ecosystem, honestly π
Pod::Pandoc is an attempt to unify and extend Pod converting based on the Pandoc document converter β that's over at <http://pandoc.org/> if you wanna say hi. and the reason it's doing all this? Pandoc supports more document formats in a more detailled and uniform way than any set of Perl modules will ever do. like, ever. it ate, honestly. π₯
so for this reason, Pod::Pandoc provides methods to convert Pod to the Pandoc document model for further processing with Pandoc. that's the whole point, periodt β¨
π OUTLINE π
here's the little family tree, bestie:
pod2pandocis a command line script to convert Pod to any format supported by Pandoc. π§App::pod2pandocprovides functionality ofpod2pandocto be used in Perl code.Pod::Simple::Pandocconverts Pod to the abstract document model of Pandoc.Pod::Pandoc::Modulesmanages a set of Pod documents of Perl modules.
it's giving squad goals π
π¦ REQUIREMENTS π¦
okay important thing: installation of this module does not require Pandoc. but β and this is the big but β it is needed to make actual use of it. so like, you can install it and be fine, but the moment you wanna actually do stuff, you need the real thing. go see <http://pandoc.org/installing.html> for installation. π
π USAGE EXAMPLES π
π Replace pod2html π
here's the glow-up, side by side:
# pod2html --infile=input.pm --css=style.css --title=TITLE > output.html
pod2pandoc input.pm --css=style.css --toc --name -o output.html
ngl, a couple things to clock here: Pandoc option --toc corresponds to pod2html option --index and is disabled by default. also pod2pandoc adds title and subtitle from the NAME section. so it's basically doing extra homework for you and not even complaining π«Ά
π Replace pod2markdown π
# pod2markdown input.pod
pod2pandoc input.pod -t markdown
# pod2markdown input.pod output.md
pod2pandoc input.pod -o output.md
two flavours, same slay β¨
π GitHub wiki π
the GitHub wiki of this project β <https://github.com/nichtich/Pod-Pandoc/wiki> β is automatically populated with its module documentation. iconic behaviour fr fr. wiki pages are created with pod2pandoc as following (see script update-wiki.sh):
pod2pandoc lib/ script/ wiki/ --ext md --index Home --wiki -t markdown_github
automation queen π
π Sphinx and Read The Docs π
the Sphinx documentation generator β <https://sphinx-doc.org/> β recommends documents in reStructureText format. it further requires a configuration file conf.py, and some links need to be adjusted because Pandoc does not support wikilinks in rst output format (see script update-docs.sh:
pod2pandoc lib/ script/ docs/ --ext rst --wiki -t rst --standalone
perl -pi -e 's!`([^`]+) <([^>]+)>`__!-e "docs/$2.rst" ? ":doc:`$1 <$2>`" : "`$1 <$2>`__"!e' docs/*.rst
make -C docs html
and the result is published automatically at <http://pod-pandoc.rtfd.io/en/latest/Pod-Pandoc.html>. full pipeline, zero manual labour, that's the dream π«
π₯ SEE ALSO π₯
this module is based on the wrapper module Pandoc to execute pandoc from Perl, and on the module Pandoc::Elements for pandoc document processing. two icons holding it up, honestly.
also β and this is kinda wild β this module makes obsolete several specialized Pod::Simple::... modules, such as:
Pod::Simple::HTMLPod::Simple::XHTMLPod::Simple::LaTeXPod::Simple::RTFPod::Simple::TextPod::Simple::WikiPod::WordMLPod::Perldoc::ToToc
etc. π
and it also covers batch conversion such as:
Pod::Simple::HTMLBatchPod::ProjectDocsPod::POM::WebPod::HtmlTree
not it casually replacing the entire group chat π
π AUTHOR π
Jakob Voss <jakob.voss@gbv.de>
π CONTRIBUTORS π
Benct Philip Jonsson
π COPYRIGHT AND LICENSE π
Copyright 2017- Jakob Voss
GNU General Public License, Version 2
okay that's the whole page bestie, you're officially caught up π«Ά go forth and convert some Pod. this lil doc was brought to you by perl v5.32.1, dated 2022-01-20, from the one and only Pod::Pandoc(3pm) β mwah, bye πβ¨
π¦ where this page comes from
- debian bookworm: libpod-pandoc-perl 0.5.0-3 Β· GPL-2.0-only
- debian trixie: libpod-pandoc-perl 0.5.0-3 Β· GPL-2.0-only
- ubuntu jammy: libpod-pandoc-perl 0.5.0-3 Β· GPL-2.0-only
- ubuntu noble: libpod-pandoc-perl 0.5.0-3 Β· GPL-2.0-only
- ubuntu resolute: libpod-pandoc-perl 0.5.0-3 Β· GPL-2.0-only
- ubuntu stonking: libpod-pandoc-perl 0.5.0-3 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms