💾 Archived View for idiomdrottning.org › tldr-to-man captured on 2024-03-21 at 16:20:31. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

Converting TLDR to man pages

tldr pages are community-edited shorter summaries of man pages with practical examples.

You can get all the files with git clone https://github.com/tldr-pages/tldr.git, make your own branch, make edits, add pages and submit it to them.

There are plenty of viewers for these files, but here is a shell script that uses pandoc to convert tldr pages to regular man pages.

For each tldr file in the current directory when you call (code tldr_to_man.sh), it checks if you have that program installed (using which).

As command line options, add any files that you want installed even if you don’t have the matching program installed.

If you do, it formats it into a man page and places it in /tmp/tldrmanpages that you can later move to your systems man page directory, for example /usr/local/share/man/man5/, as root. Use cp

-n when copying them so you don’t clobber any real man pages.

This program does not follow the tldr pages spec with their own system next to man.

You can also clone the repo for this conversion script:

git clone https://idiomdrottning.org/tldr-to-man

tldr pages

(code tldr_to_man.sh)