Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: jpeters on February 04, 2009, 06:08:44 AM
-
Here's a great little script by Barry Kauler that I changed to work with Netrik for reading manuals.
First it searches through /usr/share/doc, and if nothing is found loads http://linux.die.net/man/${1}.
example:
man help
This brings up the "Getting Started With Tiny Core Linux" doc. Type "q" to quit
I just submitted netrik.tce, netrik.tcl (44K....lightning fast!), and here's a link to the script:
apps/man][removed due to policy]apps/man (http://[removed due to policy)
-
It seems die.net has changed it's search functions, so that now it's necessary to include the manual number, eg "linux.die.net/man/<number>/$1" This seems really stupid, since now a script won't work unless you can guess what the number is. "1" will work for many, so that's better than nothing. :'(
-
that stinks...it means my script won't fully work either. It will at least still work for local pages, though, provided you have netrik and man2html
manserver="http://linux.die.net/man"
mandir="/home/shared/reference/man_pages"
[ -n "$1" ] || exit
page="$mandir/$1"
for num in 1 2 3 4 5 6 7 8; do
if [ -r "$page.$num.gz" ]; then
zcat "$page.$num.gz" | man2html | netrik -
exit
elif [ -r "$page.$num" ]; then
man2html "$page.$num" | netrik -
exit
fi
done
if [ ! -r "$page.html" ]; then
wget --dns-timeout=7 "$manserver/$1" -O "$page.html"
if [ "$?" == 0 ]; then
sed -i '/<link\ rel.*$/d' "$page.html"
else rm -f "$page.html" && exit
fi
fi
exec netrik "$page.html"
I guess I'll need to cut out that second part for the time being.
Ideally I'd like to find a server that has formatted man pages, but no luck so far.
-
i don't suppose you could put a php script up somewhere, that took the old query and then redirected to the proper new url.
-
A simple workaround is add another variable, so if it isn't in /man/1 you can try something else.
Probably 1 or 8 will get most of them. For my posted script, edit line 67. So "man 1 vim" and
"man 8 ldconfig".
67 netrik http://linux.die.net/man/${1}/${2}
-
perhaps you could modify it to download each one to /tmp, then cat them all into a single html file, and load the entire thing in netrik.
-
perhaps you could modify it to download each one to /tmp, then cat them all into a single html file, and load the entire thing in netrik.
I'm looking for instant info.......TM@ snap computing.......off YOUR server. :) (ie, no downloading nutin.....)
Note: I know, text browsers will probably be declared illegal at some point....worse even than ad-block.
-
i love text browsers... as an option. i love text apps in general. links is great. thank you for adding elinks.