Solution for my manpage crysis

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
Post Reply
User avatar
82issa
DOC Team
DOC Team
Posts: 127
Joined: 13 Apr 2011, 17:24
Location: USA, NC

Solution for my manpage crysis

Post#1 by 82issa » 16 Apr 2011, 20:48

man oh man

Code: Select all

man man
Under the Name it says
man - format and display the on-line manual pages
I might be blind or dumb. But I have not been able to figure out how to get the on-line manual pages. I have plugged away for a while and have come to a couple conclusions.

The first is a really small shell script. named "oman" get it o-man no no I think you are not getting it. It is short for online manual.

Code: Select all

#! /bin/bash
lynx http://man.cx/$1
I know, I know. Your not using the actual man pages. Its just sweet and simple. I just move it to my bin directory.

So I (brain stormed) a little more. And realized how much time to people spend actually needing to craw through hundreds of man pages. Almost none.
What if there was a NFS mounted to whatever and we just add that to the $MANPATH It only needs to be read-only. And could be easily added to live distro. With access to many many more man pages than your system might hold.
Sorry guys... I got to go. My girlfriend just casted "get your dirty ass into the shower" on me.
Oh and here is some naked grandpa pictures too.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4566
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Solution for my manpage crysis

Post#2 by fanthom » 17 Apr 2011, 21:54

nice idea but i see one problem:
it wont work without internet access.

i'm voting on man pages included in distro :)
Please add [Solved] to your thread title if the solution was found.

User avatar
82issa
DOC Team
DOC Team
Posts: 127
Joined: 13 Apr 2011, 17:24
Location: USA, NC

Re: Solution for my manpage crysis

Post#3 by 82issa » 18 Apr 2011, 12:44

Well I think it would still work. Seamlessly without to many people noticing. If we did a NFS repo with all those manpages.
Sorry guys... I got to go. My girlfriend just casted "get your dirty ass into the shower" on me.
Oh and here is some naked grandpa pictures too.

lo-n-behold
White ninja
White ninja
Posts: 10
Joined: 14 Jan 2011, 11:13
Location: belgium

Re: Solution for my manpage crysis

Post#4 by lo-n-behold » 19 Apr 2011, 11:32

why not ship a minimal amount of man-pages
and add a separate module "manpages" for offline users
and add your "oman" script too

cat /usr/local/bin/man

Code: Select all

#!/usr/bin/bash
/usr/bin/man $*
if [ $? ]; then lynx http://man.cx/$1; fi

btw, the expression "online manpages" dates from before the internet,
it means that they are on your computer (i.e. on-line), instead of on paper in the cupboard (i.e. off-line)

User avatar
82issa
DOC Team
DOC Team
Posts: 127
Joined: 13 Apr 2011, 17:24
Location: USA, NC

Re: Solution for my manpage crysis

Post#5 by 82issa » 19 Apr 2011, 13:12

I just cant believe that they would not update their man manpage. Very sexy code tho.
I will be changing my oman code during lunch break.
Sorry guys... I got to go. My girlfriend just casted "get your dirty ass into the shower" on me.
Oh and here is some naked grandpa pictures too.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4566
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Solution for my manpage crysis

Post#6 by fanthom » 19 Apr 2011, 15:39

@lo-n-behold and 82issa
man pages are well compressed by 'xz' (and lzma too) - they really takes only minimal space in the ISO. i would leave them in place.
anyway, i like the idea of using 'lynx' when man page is missing.
your script will be added to next Porteus release.

Thanks a lot guys :)

EDIT:\\
rewritten the code and improved a bit:

Code: Select all

#!/bin/sh

if [ "$1" = "" ]; then echo "What manual page do you want?"; exit; fi
/usr/bin/man $* || for x in $*; do lynx http://man.cx/$x; done
otherwise man page for existing manuals would be opened twice (one from local and one from remote repository)

Cheers
Please add [Solved] to your thread title if the solution was found.

User avatar
82issa
DOC Team
DOC Team
Posts: 127
Joined: 13 Apr 2011, 17:24
Location: USA, NC

Re: Solution for my manpage crysis

Post#7 by 82issa » 19 Apr 2011, 16:22

I like the revision of the code @ fanthom. Great work all around. I only see
one potential problems. I don't know how long http://man.cx will be arround
their page extension works perfectly for our scripts. Maybe in future we will
have something a little more solid. For now excellent solution. Thanks for both
of your efforts and input @lo-n-behold and fanthom.

Edit:
And one more thing. Do you guys think /usr/local/bin/man the best path for this?
Sorry guys... I got to go. My girlfriend just casted "get your dirty ass into the shower" on me.
Oh and here is some naked grandpa pictures too.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4566
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Solution for my manpage crysis

Post#8 by fanthom » 19 Apr 2011, 16:43

@82issa
yes - /usr/local/bin is before /usr/bin
check "echo $PATH"

(scripts and binaries added by user are prioritized)
Please add [Solved] to your thread title if the solution was found.

User avatar
82issa
DOC Team
DOC Team
Posts: 127
Joined: 13 Apr 2011, 17:24
Location: USA, NC

Re: Solution for my manpage crysis

Post#9 by 82issa » 19 Apr 2011, 16:49

Good stuff I was not aware of that.
Sorry guys... I got to go. My girlfriend just casted "get your dirty ass into the shower" on me.
Oh and here is some naked grandpa pictures too.

Post Reply