Tuesday, July 3, 2007

alternative linux browsers

currently, there are several linux-based browser running under most linux distros.
here are few of then:

firefox / mozilla - http://www.mozilla.com/en-US/firefox/
opera - http://www.opera.com/download/index.dml?platform=linux
netscape - ftp://ftp.netscape.com/pub/netscape7/english/7.1/unix/linux22/sea/
dillo - http://www.dillo.org/


and for fast alternative text-based browsers:

elinks
lynx
links

and non-interactive web browser:

wget
curl

There are may ways how these tools can be beneficial. Say, we need to download
an image from web and send it to our email box on daily basis. Making use of linux crontab for scheduling this kind of daily job would be nice like so:

30 08 * * * cd /root/scripts ; rm -rf pic_pag00.jpg; wget -c "http://images.inq7.net/img/thumbnails/new/hea/pag/img/pic_pag00.jpg" ; echo "INQ7" | mutt -s "INQ7 front page" -a /root/scripts/pic_pag00.jpg

Explained:

30 08 = this cronjob should be executed exactly 8:30AM

cd /root/scripts = cd to this /root/scripts folder when cronjob starts

rm -rf pic_pag00.jpg = deletes this file from current path location regardless if it exists or not

wget -c "http://images.inq7.net/img/thumbnails/new/hea/pag/img/pic_pag00.jpg" = download the same new pix pic_pag00.jpg non-interactively and save it with the same filename to current path location,

then finally

echo "INQ7" | mutt -s "INQ7 front page" -a /root/scripts/pic_pag00.jpg youremail@domain.com = created an email with subject name "INQ7 front page", attaches pic_pag00.jpg as email attachment with email body of "INQ7" and sends it back to your email box - works like a charm.

Alternatively, you can browse and dump a specific site so you can view it on daily basis from your MUAs or mail user agent like outlook, eudora, thunderbird, like so:

01 07 * * * lynx -dump www.google.com > google.txt ; echo "Google dumped" | mutt -s "Google dumped" -a google.txt you@here.com

The above would be executed exactly 7:01AM , browse and dump the URL, save it as google.txt file, attaches the file and sends it right away to your email box.

How about checking for new download files

33 01 30 * * wget -c www.google.com/files.rpm; echo "Google file" | mutt -s "Google dumped" -a files.rpm you@here.com

Exactly 1:30AM exeucted every 30th day of the month, browse and dumps www.google.com/files.rpm file, attaches to email composition and sends it to your email box.

Well, combine it from server side script, like compare it to previous download file, if there is difference, emails you to inform you that there is a new version of that file.

Handy.

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy