View Single Post
Old 06-02-2009, 06:26 AM   #6
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Some more info:

After installing NetaTalk the ipod touch is automatically discovered on the network as an AFP share, with two volumes, one called root, one called home. Once root is mounted the path on OS X is the following:

Code:
/Volumes/root/var/mobile/Applications/939E5CA6-B556-4C0E-800C-1A7#A2D
I'm assuming that 939E5CA6-B556-4C0E-800C-1A7#A2D is the universal folder name for the kindle app across all iphones/ipod touches, but I would need some other users who have jailbroken their iphones to corroborate that. If it's not each subfolder in /Applications/ has a name that looks like that, the subfolders would need to be searched for one named Kindle.app to confirm the correct folder for that device.

The xml file I attached previously is located within the app folder at:
Code:
Relative Path from program directory:
/Documents/cache/KindleSyncMetadataCache.xml

Full Path (OS X):
/Volumes/root/var/mobile/Applications/939E5CA6-B556-4C0E-800C-1A7#A2D/Documents/cache/KindleSyncMetadataCache.xml
If you look at single entry from the XML:
Code:
<meta_data><ASIN>B000FBJCJE</ASIN><title>Snow Crash</title><authors><author>Stephenson, Neal</author></authors><publishers><publisher>Spectra</publisher></publishers><publication_date>2003-08-26T00:00:00+0000</publication_date><cde_contenttype>EBOK</cde_contenttype><content_type></content_type></meta_data>
You'll see the ASIN is B000FBJCJE. The book filename can be constructed from this by appending _EBOK.prc:
Code:
Filename:
B000FBJCJE_EBOK.prc

Relative Path:
/Documents/eBooks/B000FBJCJE_EBOK.prc

Full Path (OS X):
/Volumes/root/var/mobile/Applications/939E5CA6-B556-4C0E-800C-1A7#A2D/Documents/eBooks/B000FBJCJE_EBOK.prc
All the ebooks are in that same folder. I suppose another option would be to just parse the metadata of all the files, but that seems like a lot more work.


The biggest problem with the AFP approach is that it's not natively available on Windows or Linux, but I think that it can be installed. The alternative would be to use OpenSSh/sFTP. That's got the benefit of being cross platform, but it would mean integrating a client into Calibre. The paths would be similar in that case, just drop /Volumes/root from the full path.
ldolse is offline   Reply With Quote