baslinux AT lists.ibiblio.org
Subject: Baslinux mailing list
List archive
[BL] (Script) Links Startup With Bookmarks File 23
- From: Lee Forrest <lforrestster AT gmail.com>
- To: baslinux AT lists.ibiblio.org
- Subject: [BL] (Script) Links Startup With Bookmarks File 23
- Date: Sat, 27 Jan 2007 11:28:43 +0000
I really wanted links to come up with its bookmarks displayed
as usable links, and couldn't find any way in the manual to
accomplish this. (And, frankly, I prefer this to the bookmarks
window because it displays more bookmarks on the screen and
you can go to your choice just by entering a number and to the
next/last page with Space/b)
So I wrote this script, which is aliased to "links" in my
/etc/profile:
alias links="/usr/local/bin/links.sh"
First, it converts the current ~/.links/bookmarks into html and
(creates or) overwrites the file ~/.links/bookmarks.html with
the output. If you don't have a URL (or the address of a local
directory or file) on the commandline, it will bring up links
with bookmarks.html.
You can bookmark the bookmarks.html file, too, although
if anyone can tell me how to bring up the bookmarks.html file
from the links file menu, I'd appreciate it.
The leftmost column of "#" below was added to preserve formatting
and to keep any software between me and you from 'thinking' that
I am trying to run an executable.
##!/bin/sh
#
##/usr/local/bin/links.sh
## Copywrong Lee Forrest 2007
# Change these two if necessary. Don't put "/" after home directory name.
#home=/root
#links=/usr/bin/links-0.90
#
#dest=${home}/.links/bookmarks.html
#
#echo "<html><head><title>links bookmarks</title></head><body>" > "$dest"
#echo "<p><br> This is ${home}/.links/bookmarks converted to html and called
by /usr/local/bin/links.sh<br>" >> "$dest"
#sed -n 's/^\([^|]*\)\(|\)\(.*$\)/<a href="\3">\1<\/a><br>/p'
${home}/.links/bookmarks >> "$dest"
#echo "<p><br>" >> "$dest"
#echo "</body></html>" >> "$dest"
#
#if test -n "$1"
#then
#$links "$1"
#else
#$links ${home}/.links/bookmarks.html
#fi
Because links (apparently) doesn't have a persistent history
file, I bookmark everything of interest and then weed out the
mistakes later. It's easier manually than using links to do it.
Hope someone else benefits from this.
The more I use this http/ftp browser, the more I like it.
Just don't _ever_ try to download a huge file.tgz (like the kernel
sources) this way:
~<#> links http://somewhere.com/huge_file.tgz
because it won't. It just pretends to. Or, rather, it brings it down
into memory/swap and then loses it somehow. This is very frustrating after
waiting for 5 hours....
Use wget -c or just go to the site and proceed from there. The
detailed downloading information that links displays is nice.
Lee
--
BasicLinux: Small is Beautiful
http://www.basiclinux.com.ru
- [BL] (Script) Links Startup With Bookmarks File 23, Lee Forrest, 01/27/2007
Archive powered by MHonArc 2.6.24.