Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 23 Nov 2014, 23:09
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
Needless man files?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 4 [46 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
8-bit


Joined: 03 Apr 2007
Posts: 3393
Location: Oregon

PostPosted: Wed 02 Dec 2009, 13:59    Post subject:  

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.
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2276

PostPosted: Wed 02 Dec 2009, 16:38    Post subject:  

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/distributions/amigolinux/download/Applications/Search/rtfm/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.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4376

PostPosted: Wed 02 Dec 2009, 22:39    Post subject:  

This is actually what I use as my man script in X

Code:
#! /bin/bash
defaulthtmlviewer "http://www.google.com/search?&q=man+"$1"+site:linux.die.net&btnI=Search"

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
shinobar


Joined: 28 May 2009
Posts: 2631
Location: Japan

PostPosted: Sat 19 Dec 2009, 05:57    Post subject: improved man script
Subject description: looks up local man pages if man2html installed
 

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.
Code:
# 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

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.
man-09dec2009.gz
Description  extract and put it as /usr/bin/man (to be excutable).
gz

 Download 
Filename  man-09dec2009.gz 
Filesize  3.08 KB 
Downloaded  531 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
auriza


Joined: 05 Jan 2009
Posts: 46
Location: Surakarta, Java

PostPosted: Wed 20 Jan 2010, 12:47    Post subject:  

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
Back to top
View user's profile Send private message Visit poster's website 
auriza


Joined: 05 Jan 2009
Posts: 46
Location: Surakarta, Java

PostPosted: Mon 25 Jan 2010, 03:56    Post subject:  

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
Code:
# nroff -mandoc -c manpage.n | less

Last edited by auriza on Tue 26 Jan 2010, 02:55; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2276

PostPosted: Mon 25 Jan 2010, 11:41    Post subject:  

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....
Back to top
View user's profile Send private message 
DMcCunney

Joined: 02 Feb 2009
Posts: 897

PostPosted: Mon 25 Jan 2010, 15:20    Post subject:  

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.

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.

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.

Quote:
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....

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.

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
Back to top
View user's profile Send private message 
auriza


Joined: 05 Jan 2009
Posts: 46
Location: Surakarta, Java

PostPosted: Tue 26 Jan 2010, 03:11    Post subject:  

@technosaurus
Your man package needs groff, at least in Puppy 4.3.1
Back to top
View user's profile Send private message Visit poster's website 
shinobar


Joined: 28 May 2009
Posts: 2631
Location: Japan

PostPosted: Tue 26 Jan 2010, 05:19    Post subject:  

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

Yes auriza.
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.
Back to top
View user's profile Send private message Visit poster's website 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Tue 26 Jan 2010, 05:55    Post subject:  

amigo wrote:
Leaving out man-pages is forgivable, if unwise, but leaving out the License/Copying/Copyright files is illegal in most places.

<OFF TOPIC>
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:
/usr/share/doc/licenses

licenses: http://www.blackducksoftware.com/oss/licenses#top20

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
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2276

PostPosted: Tue 26 Jan 2010, 07:07    Post subject:  

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.
Back to top
View user's profile Send private message 
DMcCunney

Joined: 02 Feb 2009
Posts: 897

PostPosted: Tue 26 Jan 2010, 10:40    Post subject:  

auriza wrote:
@technosaurus
Your man package needs groff, at least in Puppy 4.3.1

See if this helps.
______
Dennis
groff-1.19.2.pet
Description  Groff 1.19.2
pet

 Download 
Filename  groff-1.19.2.pet 
Filesize  933.38 KB 
Downloaded  533 Time(s) 
Back to top
View user's profile Send private message 
auriza


Joined: 05 Jan 2009
Posts: 46
Location: Surakarta, Java

PostPosted: Wed 27 Jan 2010, 13:03    Post subject:  

@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.
Back to top
View user's profile Send private message Visit poster's website 
shinobar


Joined: 28 May 2009
Posts: 2631
Location: Japan

PostPosted: Wed 27 Jan 2010, 21:19    Post subject:  

auriza wrote:
it seems that the content is in Japanese.

The devx_431JPbeta2.sfs is i18n'ed. but it contains many japanese man pages and a little in english.
one of my point is the man pages and the pager can be provided by additional sfs files.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 3 of 4 [46 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1210s ][ Queries: 13 (0.0179s) ][ GZIP on ]