PDA

View Full Version : Firefox Scrapbook to iSiloX


Luhmann
02-08-2006, 01:09 PM
For some time now, I've been using the Scrapbook extension (http://amb.vis.ne.jp/mozilla/scrapbook/) for Firefox to save files for reference or offline viewing. Over that time, a folder called "To Read" has grown steadily, without any of those files having been read. With the purchase of my new Treo 650, I thought it was time to move everything to my PDA for reading there, figuring I'm more likely to look at something when I'm on the road. Here's how I did it.

First, export an HTML tree from Scrapbook. This can be done from the "tools" menu. You can choose to export just one folder.

Unfortunately, the javascript output seems to screw up iSilo X, so I took the source of the HTML file and ran it through some regex search and replace within BBEdit, as follows:

Step 1, extract URLs from HTML

Replace:

(.*<a [^>]*href\s*=\s*")([^"]+)("[^>]*>.*\r)

with:

\2\r

Step 2:

Manually erase extra stuff (headers and footers, etc.)

Step 3:

replace

^\.\.\/data

with

http://localhost/~username/ScrapBook/data

Oh, I forgot to mention, I have my scrapbook files saved in my OS X "Sites" folder rather than the default location. That way I can view them from any browser as if they were hosted, rather than as local files. You can set this in Scrapbook's preferences.

Then I copy and paste the output to iSiloX. However, we are not ready to convert just yet. If you run conversion now you will discover that all the files have the same name: index.html. This is a problem, as it will just output one file! It will keep writing over and over the same document. iSiloX is too stupid to handle this by automatically renaming the files index-1.html, index-2.html, as the OS X finder does with screen captures, for instance. The only way I could solve this problem was by using Dynamic Titles to add the time to the title, so that the seconds and minutes function as part of the name.

Put the following in the document title:

\Xtime?H2-M2-S2; To_Read

You may also wish to allow it to follow links to a certain depth, as long as they are in the same subfolder.

If anyone knows a simpler way, I'm open to suggestions, but this seemed to work for me, converting over 200 documents in my folder. Hopefully I'll read some of them on my 14 hour flight tomorrow!

bones221
07-21-2007, 08:14 PM
save page to scrap book
call up page in scrap book
right click on page
choose "save page as" (supply your own name)
save to desk top
drag saved icon to isilox
convert
hotsink
viola!