DOCBOOK2MAN-SPEC.PL(1)
π
DOCBOOK2MAN-SPEC.PL(1) β the docbook2man-spec.pl page, bestie edition π
okay so you opened docbook2man-spec.pl(1) and you're like "what is this little Perl gremlin" β don't worry, I got you. everything below is the whole page, nothing skipped, no cap. π«Ά
β¨ NAME β¨
docbook2man-spec.pl β it converts DocBook RefEntries into man pages. that's the whole job, and honestly? iconic. π
πΈ SYNOPSIS πΈ
sgmlspl docbook2man-spec.pl
nsgmls [ sgml document ]| sgmlspl docbook2man-spec.pl
two ways to run it, pick your fighter π
π¦ DESCRIPTION π¦
so like, docbook2man is a sgmlspl spec file that produced man pages (using the -man macros) from DocBook RefEntry markup. it's giving "glow-up pipeline" fr fr. β¨
the program reads ESIS produced by nsgmls (or other SGML parsers) from standard input. any markup that isn't found in RefEntry? discarded. bye bestie, not relevant to the vibe check π
its output β the converted man pages β gets written to the current directory. but if RefMeta information is not specified in a RefEntry, then the man page will be written to standard output instead. little switch-up, keep it in mind π«Ά
the file manpage.links also gets created, and it contains any aliases of the manpages generated. this file is in the format:
<man page> <alias
manpage>
and then there's manpage.refs, which keeps track of XRef references. and here's the thing β note that if the input document has any forward references, then docbook2man may have to be invoked twice (the first time updating manpage.refs) to resolve them. two passes, like a sequel, we love a sequel π₯
π REQUIREMENTS π
- the
SGMLSpmpackage from CPAN β and yes, this package includes thesgmlsplscript that is also needed, so you get two for one, slay π
π LIMITATIONS π
- trying
docbook2manon non-DocBook or non-conformant SGML results in undefined behavior. :-) yes the smiley is part of it, it's a warning dressed cute π - this program is a slow, dodgy Perl script. self-aware king π
- this program does not come close to supporting all the possible markup in DocBook, and may produce wrong output in some cases with supported markup. so likeβ¦ check your output, bestie π
β TO DO β
obvious stuff, bestie, the roadmap:
- fix
docbook2manbreakages found in the test documents, especiallyweird.sgml. weird.sgml is the main character of the bug list ngl π - add new element handling and fix existing handling. be robust. πͺ
- produce cleanest, readable man output as possible (unlike some other converters). follow Linux
man(7)convention. as conversion to man pages is usually not done very often, it is better to be slower/more complicated than to produce wrong output. also if someone wants to give up using DocBook for whatever reason, the last-converted man pages can then be maintained manually. lowkey a very thoughtful design philosophy π₯Ί - make it faster. i think most of the speed problems so far is with parsing ESIS. rewrite
SGMLS.pmwith C and/or get input directly from SP. performance era incoming π₯ - support other (human) languages. but what to do with non-ASCII charsets?
SGMLSpmdoesn't report them androffdoes not grok them. and here's the raw note:[Comment: text after enclosed lists (and SS blocks) will break docbook2man]β keep that in mind, it's a whole vibe warning. if we do this, more people can use DocBook. accessibility queen ππ
π COPYRIGHT π
Copyright (C) 1998-1999 Steve Cheng <steve@ggi-project.org>
this program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
you should have received a copy of the GNU General Public License along with this program; see the file COPYING. if not, please write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
π and that's the whole page, bestie β no details dropped, no options invented, we ate and left no crumbs.
okay bye, this page is dated 05 December 2025 and it's the DOCBOOK2MAN-SPEC.PL(1) manual, so go forth and convert those RefEntries π¦π
β¨
π¦ where this page comes from
- arch rolling: docbook-utils 0.6.15-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms