cs_man2pdf(8)

πŸ“¦ version 3.1.3, in opensuse-leap 16.0

πŸ’… cs_man2pdf(8) β€” the ClusterTools2 glow-up

okay so bestie, welcome to cs_man2pdf, section 8 of the ClusterTools2 manual. yes she's a system tool, yes she's iconic, let's get into it 🫢


✨ NAME ✨

cs_man2pdf β€” literally makes a PDF file out of a manual page. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

cs_man2pdf --help | --version
cs_man2pdf --dir <directory>
cs_man2pdf --rpm <installed_RPM>
cs_man2pdf <man_page> <section>

like, pick your lane. that's it, that's the shape of it ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so what she does is: cs_man2pdf creates a PDF file from an manual page. yes the original grammar said "an manual page", we're keeping her exactly as she is, no edits, she's perfect πŸ˜­πŸ’–

basically (and this is the actual mechanism, no cap) the command

man -Tps ... | ps2pdf - >...

is what's used under the hood.

and then? the resulting PDFs could be read with any PDF viewer on eBook devices, smartphones, or gaming consoles. gaming consoles bestie. your manpage is now on your console. main character energy πŸ‘‘βœ¨


πŸ’… OPTIONS πŸ’…

  • --help β€” show help. she tells you about herself πŸ’β€β™€οΈ
  • --version β€” show version. the ~lore~ drop πŸ“œ
  • --dir <directory> β€” convert man pages from directory. whole folder? converted. slay πŸ“
  • --rpm <rpm> β€” convert man pages from installed RPM. pulling them straight out of an installed package, we love a shortcut πŸ“

πŸ”₯ EXAMPLES πŸ”₯

ok these are the good part, let's go πŸƒβ€β™€οΈ

  • create PDF for manual page stonith_sbd(7) and write the output into a file in the current working directory.
# cs_man2pdf stonith_sbd 7
  • create PDF files for manual pages of OCF resource agents.
# apropos ocf_ | awk '$2~/7/ {print $1,"7"}' |\
  while read; do cs_man2pdf $REPLY; done
  • create PDF files for manual pages from directory ./mankind/.
# cs_man2pdf -d ./mankind/
  • create PDF files for manual pages from installed RPM ClusterTools2.
# cs_man2pdf -r ClusterTools2

(and yes, -d and -r are the short cuties for --dir and --rpm, the examples said so, so we said so 🫢)


⭐ EXIT STATUS ⭐

  • 0 β€” successful program execution. she ate. πŸ’–
  • >0 β€” usage, syntax or execution errors. something went sideways, bestie 😭

πŸŽ€ FILES πŸŽ€

  • /usr/sbin/cs_man2pdf β€” the program itself. the queen in her castle πŸ‘‘
  • $PWD/<man_page>.<n>.pdf β€” the output file. this is where your little PDF lands πŸ¦‹

πŸ™ˆ BUGS πŸ™ˆ

ngl, there are some limitations and we're being honest about them:

  • This script can only handle manual pages with up to two dots in the filename. two dots and she's doing her best, more than that and it's giving chaos.
  • Manual pages with double colons currently are not handled.
  • "I am sorry for Perl." β€” direct quote, we do not explain, we simply nod πŸ’€
  • When using --directory, a .gz suffix will make it to the PDF's filename. yep. it's gonna be in the name. that's just how it is bestie.

Feedback is welcome, please mail to feedback@suse.com β€” like genuinely, they want to hear from you πŸ’Œ


🌈 SEE ALSO 🌈

man(1), apropos(1), whatis(1), mandb(8), ps2pdf(1), roff2html(1) β€” the whole friend group, go say hi 🧚


(c) 2016-2019 B.Jin, L.Pinne, Germany.

cs_man2pdf comes with ABSOLUTELY NO WARRANTY. all caps, all seriousness, no take-backs πŸ’€

For details see the GNU General Public License at http://www.gnu.org/licenses/gpl.html


and that's the whole page!! πŸŽ‰ this little number dropped 01 Nov 2019 straight out of ClusterTools2, and honestly? she's still serving. go make some PDFs bestie, you've got this πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from