woof-CE icon indicating copy to clipboard operation
woof-CE copied to clipboard

Man page reading

Open sc0ttj opened this issue 4 years ago • 2 comments

Puppy doesn't make it very easy to read man pages.. The problem is pman:

  1. If running X, as far as I can tell, it forces you to view the desired man in a browser.
  2. It also makes you give the section in order to get straight to the man page (so ffmpeg.1, not just ffmpeg)
  3. It searches only a handful of sites
  4. It often returns outdated manpages, not for the actual packages versions you have installed
  5. It doesn't save the man pages you've already viewed (by default, at least)
  6. does pman even work without X? I'm not sure it would..

I have written w3m-man (https://github.com/sc0ttj/w3m-man), which has the following features:

  • uses w3m to download man pages from various online sources as plain text
  • opens them in terminal by default, or in browser if given -H option
  • can read (and will prefer) regular man pages, but requires groff
  • searching for man ffmpeg will return man ffmpeg.1 (and other "guessed" sections are [mostly] correct, too)
  • saves plain text man pages to ~/.w3-manpages/
  • only downloads them if needed, else reads from ~/.w3-manpages/
  • if using an Ubuntu or Debian pup: downloads man page from correct Ubuntu/Debian man page site, with riht program version
  • falls back to a decent list of websites to get man pages
  • but... only does english man pages ... easy fix though

I mention all this cos I have finally got a nice man page reader in the terminal, that can show me man pages of things, even if not installed, and always shows the right man page for the version of any program I do have installed.

Sooo.. I went and added a pkg man <pkgname> command:

  • it will download the given package
  • it will search package contents for man pages
  • it will open each man page found, in turn, using the man command
  • it doesn't care what man does once called

Admittedly, the pkg man <pkgname> command is a bit useless without w3m-man, it would open the man pages in a browser (using pman) and take you away form the terminal, where you're using pkg...

However, if you do have a nice terminal reader of man pages (w3m-man or anything else), then the pkg man <pkgname> command is really nice... It helps you find the man pages for the command and their rc files too (often in Section 5, or elsewhere, with weird names)..

...So all that being said:

I'm not proposing we put w3m-man in Puppy, but I do think we should have a man page reader which returns the right man pages for the packages you actually have installed, and lets you easily read man pages in the terminal (if wanted).

sc0ttj avatar Nov 11 '20 21:11 sc0ttj

Back in the day, Puppy went to great lengths to have the release iso file < 100MiB. One way of helping to do this was to not install any man pages, and get the 'man' command to display them from the Internet, hence the 'man' script that is still part of Puppy. All 'man' pages are equally available, (not just those of installed packages), and virtually no space used.

gyrog avatar Nov 12 '20 13:11 gyrog

I know all this... I'm not proposing we add actual man pages into the puppy SFS ... I'm proposing we make the man command better at finding the right man pages, and better at showing them in a terminal.

..so pman could be updated? ...but I wanna check the "issues" I have with it are indeed correct (and I'm not using it wrong or something)

sc0ttj avatar Nov 13 '20 18:11 sc0ttj