View Single Post
Old 08-02-2007, 11:51 AM   #1
Adam B.
Addicted to Porting
Adam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the rough
 
Adam B.'s Avatar
 
Posts: 1,697
Karma: 7194
Join Date: Oct 2006
Location: Indianapolis, IN
Device: iRex iLiad, Nokia 770, Samsung i760
Automatic Daily Comic Strip Download

I've setup my iLiad to automatically download a group of comic strips every morning at 8:00. This is a bit more of an advanced process, but it's really cool. I'm attaching some of the files necessary (scripts, gnu wget, etc) to do it.

There are a few assumptions to this tutorial.
  • You have basic linux terminal knowledge
  • You have the updated busybox with cron installed. The easiest way to do this is with my enhanced image. Let me know if you need me to post the busybox binary.
  • You have reflash ability (Working with system files, messy scripts, etc)
  • Your iLiad is connected to a wired network and setup to use dhcp
  • You've set your iLiad to the correct timezone

First, unzip Comics.zip to your books directory. Make sure Comics is capitalized.

Now, either open up mrxvt, or an ssh session.

We will need to make the folder that contains the crontab.

Code:
mkdir -p /var/spool/cron/crontabs
Then, we will need to add the following line to the end of /home/root/start.sh

Quote:
crond &
Now, we will edit the crontab to run the script every morning. I have mine set to run at 8:00am Monday through Friday. Here's a cron reference if you need to brush up and make changes.

Start the cron editor
Code:
crontab -e
Paste this into the crontab

Quote:
0 8 * * 1-6 /mnt/free/books/Comics/fetch.sh
You should be all set. Run fetch.sh to test.

The comics are being downloaded from http://high5.net/comic/ . The comics displayed and order is determined by a cookie. I've included a cookie that has a few that I like. If you wish to add more or change the order, you'll need to do the following.
  1. Visit http://high5.net/comic/
  2. Expand and order the comics as you like
  3. Copy your cookies.txt (~/.mozilla/firefox/profile/ on your linux pc if you use firefox) to /mnt/free/books/Comics/ on your iLiad

Windows IE users will need to use the export cookies function of their browser. Windows and Firefox should be in "C:\Documents and Settings\username\Application Data\Mozilla\Firefox\Profiles\profile"

I also use FBReader to view the page after it's downloaded. It's a bit quicker and more stable than the internal html browser. You'll need to edit /mnt/settings/er_registry.txt to change the association for html.
Attached Thumbnails
Click image for larger version

Name:	comics1.png
Views:	984
Size:	73.5 KB
ID:	4685   Click image for larger version

Name:	comics2.png
Views:	1148
Size:	324.4 KB
ID:	4686  
Attached Files
File Type: zip Comics.zip (115.6 KB, 871 views)
Adam B. is offline   Reply With Quote