Needless man files?
Technosaurus,
I just downloaded, converted to a tar.gz, and extracted your offering in a working directory.
Upon opening a terminal to get a command line in that directory and trying it, I have found that it indeed does fine the limited man files.
But it also fails at finding .htm or .html help files. It was never designed to do that or to try to look online for help.
So therein is the reason the man script came to be.
The script works with minor modification and that modification also lets it find and display nicely formatted local man pages as well as still being able to handle the htm and html help files and then go online to try to find help for a command or program.
So the man script file was to be an improvement on the man command.
So as to me, I am going to use the script version of man with that one line modification.
I will keep your efforts around though.
Thank you for making it available to those that want it.
I just downloaded, converted to a tar.gz, and extracted your offering in a working directory.
Upon opening a terminal to get a command line in that directory and trying it, I have found that it indeed does fine the limited man files.
But it also fails at finding .htm or .html help files. It was never designed to do that or to try to look online for help.
So therein is the reason the man script came to be.
The script works with minor modification and that modification also lets it find and display nicely formatted local man pages as well as still being able to handle the htm and html help files and then go online to try to find help for a command or program.
So the man script file was to be an improvement on the man command.
So as to me, I am going to use the script version of man with that one line modification.
I will keep your efforts around though.
Thank you for making it available to those that want it.
I've been toying with this (man) and texinfo for the last couple of days for my new distro i586-kiss-linux.
The big trouble with man is that it needs groff which is a pretty big package(~8MB). Same deal with texinfo(~7MB)
What I'm going to do is use scripts which will allow other programs to be used as a viewer -whether running from CLI or X. man2html piped through html2txt gets you the equivalent output of froff piped through lesspipe.sh(which is what man does). And man2html alone will obviouls give you suitable output for viewing in a browser. So it's just a matter of writing a script which figures out whether you are running from CLI or X, then whether the asked-for man-page is present and disaplying it, or looking for it on the web if you are connected.
Pretty much the same procedure for info pages -which Puppy also never installs, I think. I hate using info -in fact I have never figured out how to navigate with it! But, using a nicer viewer makes info pages useful to me -and many programs(mostly GNU projects) only install info pages.
I'm setting up to compress all man and info-pages using xz, which saves about 20-25% more space compared to gzip.
For the last several years I have used the coolman program which comes with cooledit as it makes man-pages much easier to read and search for terms. In fact, I created a package which combines coolman with another old GTK1 program for indexing/searching man-pages by category. I called the program RTFM...
You can get it here:
http://distro.ibiblio.org/pub/linux/dis ... tfm/0.6.0/
And, I hereby dedicate this program to one of its' chief proponents, AlienJeff!
I may stick with using coolman for KISS, but I'll probably patch it to use man2html insetad of calling groff as it now does.
For viewing info pages, there are several nice programs - pinfo and saxinfo among them, but there is also tkinfo and others.
The big trouble with man is that it needs groff which is a pretty big package(~8MB). Same deal with texinfo(~7MB)
What I'm going to do is use scripts which will allow other programs to be used as a viewer -whether running from CLI or X. man2html piped through html2txt gets you the equivalent output of froff piped through lesspipe.sh(which is what man does). And man2html alone will obviouls give you suitable output for viewing in a browser. So it's just a matter of writing a script which figures out whether you are running from CLI or X, then whether the asked-for man-page is present and disaplying it, or looking for it on the web if you are connected.
Pretty much the same procedure for info pages -which Puppy also never installs, I think. I hate using info -in fact I have never figured out how to navigate with it! But, using a nicer viewer makes info pages useful to me -and many programs(mostly GNU projects) only install info pages.
I'm setting up to compress all man and info-pages using xz, which saves about 20-25% more space compared to gzip.
For the last several years I have used the coolman program which comes with cooledit as it makes man-pages much easier to read and search for terms. In fact, I created a package which combines coolman with another old GTK1 program for indexing/searching man-pages by category. I called the program RTFM...
You can get it here:
http://distro.ibiblio.org/pub/linux/dis ... tfm/0.6.0/
And, I hereby dedicate this program to one of its' chief proponents, AlienJeff!
I may stick with using coolman for KISS, but I'll probably patch it to use man2html insetad of calling groff as it now does.
For viewing info pages, there are several nice programs - pinfo and saxinfo among them, but there is also tkinfo and others.
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
This is actually what I use as my man script in X
Code: Select all
#! /bin/bash
defaulthtmlviewer "http://www.google.com/search?&q=man+"$1"+site:linux.die.net&btnI=Search"
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
improved man script
Hi all,
attached improved man script for puppy.
extract the attached and put it as /usr/bin/man.
to look up local man page, you need man2html, which is in devx.
if you like to use original (binary) man, which is in devx sfs at /usr/bin/man,
get it from /initrd/pup_ro?/usr/bin/man and copy it to /usr/local/man.
this man script is an improved version based on the man in 4.3.1JP(Japanese Edition), basically bilingual and potentially i18n.
attached improved man script for puppy.
extract the attached and put it as /usr/bin/man.
to look up local man page, you need man2html, which is in devx.
Code: Select all
# man --help
man for puppy linux - 09 Dec 2009
If you like to use original version of man, try '/usr/local/man'.
usage: man [section] name
get it from /initrd/pup_ro?/usr/bin/man and copy it to /usr/local/man.
this man script is an improved version based on the man in 4.3.1JP(Japanese Edition), basically bilingual and potentially i18n.
I just want to share the fact that I know in Puppy 4.3.1:
- man command in Puppy is a script
- it searches for html files in /usr/share/doc and it's subdirectories
(e.g. if you type "man abiword" will open-up a browser showing /usr/share/doc/abiword.html)
- if you want to include manpage in your package, convert it to html with man2html command and place it to /usr/share/doc
- if you want to see those converted html manual page in console, you can edit the man script to change the browser to w3m, elinks, etc
- man command in Puppy is a script
- it searches for html files in /usr/share/doc and it's subdirectories
(e.g. if you type "man abiword" will open-up a browser showing /usr/share/doc/abiword.html)
- if you want to include manpage in your package, convert it to html with man2html command and place it to /usr/share/doc
- if you want to see those converted html manual page in console, you can edit the man script to change the browser to w3m, elinks, etc
This issue is very annoying for user without Internet connection.
I use CLI program in terminal frequently, and without manpage I feel lost.
@amigo
I agree with you. All packages must include man files, and other important files (README, AUTHOR, LICENSE, etc).
To open man-file in terminal, I use this command
I use CLI program in terminal frequently, and without manpage I feel lost.
@amigo
I agree with you. All packages must include man files, and other important files (README, AUTHOR, LICENSE, etc).
To open man-file in terminal, I use this command
Code: Select all
# nroff -mandoc -c manpage.n | less
Last edited by auriza on Tue 26 Jan 2010, 06:55, edited 1 time in total.
I guess Puppy users could have it both ways. groff is a large set of programs, so having man installed also should not be a burden compared to the soze of groff. then, they couls simply change the name of the man program to 'real-man' -hehe.
Leaving out man-pages is forgivable, if unwise, but leaving out the License/Copying/Copyright files is illegal in most places. And doing it anyway is quite against the open-source principles. People who distribute binaries without making the sources available and including the License should be forced to use Winblows freeware/shareware/proprietary stuff for a while -or they should put in soke months of hard work on a source-based program and release it with a free license (and no other restrictions) and then see how they feel when others distribute their code without including their License/copyright or alter the sources and claim it as their own work....
Leaving out man-pages is forgivable, if unwise, but leaving out the License/Copying/Copyright files is illegal in most places. And doing it anyway is quite against the open-source principles. People who distribute binaries without making the sources available and including the License should be forced to use Winblows freeware/shareware/proprietary stuff for a while -or they should put in soke months of hard work on a source-based program and release it with a free license (and no other restrictions) and then see how they feel when others distribute their code without including their License/copyright or alter the sources and claim it as their own work....
Groff itself is a whole 50K on my Puppy 4.31 installation. There are other external components it may call, but for most cases, just groff is sufficient.amigo wrote:I guess Puppy users could have it both ways. groff is a large set of programs, so having man installed also should not be a burden compared to the size of groff. then, they could simply change the name of the man program to 'real-man' -hehe.
And you might not even need it. Man systems tend to use the "catman" approach, where the man command cats the unformatted man page through "groff -man" to produce the formatted output on the user's screen, but it ought to be possible for the man pages to be installed already formatted, removing the need to have groff in the loop.
I started using Unix with AT&T System V Release 2 in the 80's, when Linux wasn't a gleam in Linus Torvald's eye. I've been accustomed to typing "man <command>" at a shell prompt and getting a locally installed man page in response. When I first installed Puppy, I said "WTF?". The man command was replaced by a script that tried to pop up a browser to view local HTML documentation, and if it wasn't there, tried to go out the the internet to display a man page in the browser from an external site.Leaving out man-pages is forgivable, if unwise, but leaving out the License/Copying/Copyright files is illegal in most places. And doing it anyway is quite against the open-source principles. People who distribute binaries without making the sources available and including the License should be forced to use Winblows freeware/shareware/proprietary stuff for a while -or they should put in soke months of hard work on a source-based program and release it with a free license (and no other restrictions) and then see how they feel when others distribute their code without including their License/copyright or alter the sources and claim it as their own work....
Yeah, right. All Puppy users have an always on Internet connection and can just pop online to view docs. I'd like to live in the dream world where this was the case, but this isn't it. (And I generally am connected, but "man <command>" at a prompt displaying a local man page is almost instant. Loading a browser and going out to the net is quite the opposite on the old, slow box I run Puppy on.)
I found a pet with the real man pages and the actual man command, and a front-end that could call Barry's script for things that weren't Gnu Linux commands and didn't have man pages, and life got much better. The whole installation takes about 30MB in my system, and for me, that's a trivial amount.
For future Puppy versions, I think we should consider a package with a core install and optional packages. Boot from the Live CD, tell Puppy you want to install, and it asks questions, like "Do you want the man pages?". If you say yes, you get them. If you say no, you get what Puppy currently does. Another "Do you want..." might be Pizzasgood's multi-user support. (I just encountered a package that refuses to install if you are running as root as a security measure. I'd prefer a multi-user Puppy, and would want that as an option.)
I understand the impulse to keep things small by leaving things out. But it should be possible to add them back in when installing Puppy to make a more standard Linux system if small size isn't your biggest concern. It should not be necessary to go hunting through the forums for things like a pet package of stuff that arguably should have been there in the first place.
And these "standard Linux components left out of Puppy to save space in the distro" really need to be collected and made available as "install after the fact" packages, with a pointer on the Puppy main page to where to find them so you don't have to go hunting through the forums for pointers.
______
Dennis
Yes auriza.auriza wrote:I just want to share the fact that I know in Puppy 4.3.1:
- man command in Puppy is a script
- it searches for html files in /usr/share/doc and it's subdirectories
(e.g. if you type "man abiword" will open-up a browser showing /usr/share/doc/abiword.html)
- if you want to include manpage in your package, convert it to html with man2html command and place it to /usr/share/doc
- if you want to see those converted html manual page in console, you can edit the man script to change the browser to w3m, elinks, etc
isn't this a solution?
The devx_431JPbeta2.sfs available from here contains some man pages.
it has both man2html and w3m plus improved man script.
The improved man script there looks up the man pages first if available, next look up local html, and the last look up online.
it uses man2html and the defaulthtmlviewer on rxvt, but it uses man2html and w3m from console.
the devx_431JPbeta2.sfs also have the original man program at /usr/local/man if you like to use it.
<OFF TOPIC>amigo wrote:Leaving out man-pages is forgivable, if unwise, but leaving out the License/Copying/Copyright files is illegal in most places.
A big puppy problem, that needs to be solved in my opinion. I think it's based on puppies size paradigm, that we all want to build the smallest possible package.
But with the actual packaging-practice we would have (at least) one license document per package, what would be about ~ 18 kb per package if all packages were 'gpl'ed'. as nearly 50% of OSS (see link below) seem to be published under the GPL 2.0, that would be a waste...
a more puppy-like approach would be what some other distros do:
1. having a folder with the most-used licenses e.g.
Code: Select all
/usr/share/doc/licenses
2. on package building you symlink to the license if it exists, if not, include the license. maybe this step could be included in dir2pet, to ease of handling.
</OFF TOPIC>
aragon
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
my src2pkg program does it an even better way, I think. debian distributes binary packages which link to a common License file, but each package doesn't contain the file. src2pkg links to a common file but includes that common file in each package, so any package you download *will* contain the license so it is available even if the package is not installed and even if the *common-licenses* package is not installed. So, packages built this way would simply overwrite the common license each time with an identical copy.
@Dennis
Thanks, I've used groff form devx package. It will useful in fresh installed Puppy.
@aragon
Good idea, sometimes we have to look outside to other distro for best solution.
@shinobar
Well, I never try it, because it seems that the content is in Japanese. But if you can use it well, that's good.
Thanks, I've used groff form devx package. It will useful in fresh installed Puppy.
@aragon
Good idea, sometimes we have to look outside to other distro for best solution.
@shinobar
Well, I never try it, because it seems that the content is in Japanese. But if you can use it well, that's good.
@shinobar
Oh, I see your point. So we just need to add separate *.sfs man pages. This is good to accompany the default Puppy installation.
And one more point: to conserve space, manpages must be compressed (gzip or bzip2). I think for unofficial PET packages, the manpages should be included if the size is relatively small.
Oh, I see your point. So we just need to add separate *.sfs man pages. This is good to accompany the default Puppy installation.
And one more point: to conserve space, manpages must be compressed (gzip or bzip2). I think for unofficial PET packages, the manpages should be included if the size is relatively small.