You are not logged in.

#1 2008-12-27 06:53:24

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

my $0.02 on manServer

manServer: http://www.squarebox.co.uk/users/rolf/d … rver.shtml looks quite nifty and I'm currently getting good use out of it but I felt like my approach was inadequate for a package. First, I have to start the server using:

nohup manServer -s &

and I tried making a daemon script for that in rc.d but each time it said [DONE] there was actually no manServer process running.

Second, it only searches /usr/man by default. You can edit the perl script to make it search /usr/share/man but I can't get it to search both. I tried making an array and having it loop through whatever you put in it but that's very hard for someone who hasn't learned perl yet!

So instead I put this in my rc.local:

nohup manServer -s &
nohup manServer2 -s 8889 &

And I use this script as my man command:

#!/bin/bash
VAR1=`ls -R /usr/share/man | grep ""$1"\."`
VAR2=`ls -R /usr/man | grep ""$1"\."`
LENGTH1=${#VAR1}
LENGTH2=${#VAR2}
if [[ LENGTH1 -gt 1 ]]
    then
    elinks http://localhost:8888/"$1"
elif [[ LENGTH2 -gt 1 ]]
    then
    elinks http://localhost:8889/"$1"
else
    echo "No manual entry for "$1""
fi

The first copy has /usr/share/man, the second copy has /usr/man. Also a package would be troublesome because we'd have to figure out the license which is mentioned nowhere and convert the website into a man page as manServer itself comes with no man page. Like I said, it works great, but a little clumsy for my tastes.

Last edited by ConnorBehan (2008-12-27 06:56:04)


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#2 2008-12-27 10:06:43

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: my $0.02 on manServer

A quick glance indicates that manServer uses the MANPATH variable, which Arch no longer uses by default. Set that correctly and you should be fine.

Offline

#3 2008-12-27 17:57:21

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: my $0.02 on manServer

*facepalm myself*
That takes care of the two instances problem... now I just need to figure out how to make rc.d scripts play nicely with nohup manServer -s &.

EDIT:
When I list paths in the MANPATH variable, only the first path is used. Instead I had to create an /etc/manpath.config and list them there.

Last edited by ConnorBehan (2009-01-03 04:57:50)


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

Board footer

Powered by FluxBB