Yuvi, this may or may help for Android which I think did some slightly different stuff in page saving.


In the application's Library/Caches folder there is a sqlite file 'Databases.db', which contains meta-information about the websql tables that the PhoneGap-based app used.

In its 'Databases' table, the 'origin' field maps to a subdirectory of Library/Caches, such as 'file__0'. 'name' holds the app-given table name, in our case 'historyDB' or 'savedPagesDB' which is the fun one! And finally the 'path' field maps to a filename of yet another sqlite database file that actually contains the table, with cute names like '000000000000000001.db'.

At least in the iOS version, the 'savedPagesDB' actual table appears to actually be a mapping from API urls to JSON blobs holding the page title, language, and format version.

The JSON data fetched from the API...? apparently is saved as a local file in the 'Documents' directory, with the filename being the hex md5 sum of the API URL.


So there's two main ways to go about this:

The first would be to just extract the saved title/language pairings out of 'savedPagesDB' value blobs, load those pages in sequence and run them through our new save logic. This probably needs to be wrapped with a progress bar and a way to cancel.


The second would be to try to actually migrate the saved data offline and save it into the new format. This might be ickier, and I would happily skip it, though working offline is always nice.

I'm starting on option 1, methinks. :)

-- brion