Mobileread
Collections data format in 2.5 firmware
#1  ngukho 05-14-2010, 11:29 AM
Managing collections on Kindle is painful and slow. However, if you dig into the new file system, you could find a "collections.json" at /mnt/us/system, which stores all the stuff related to collections data.

The "collections.json" is a standard json file. The only tricky part is how it identifies a document --- or what do those hashes come from. A little trial and error shows that they are merely the sha1 hash value of the document's absolute path, say a H.pdf is at the Kindle's documents directory, then its hash in collections.json would be sha1 hash of the string "/mnt/us/documents/H.pdf".

Voila, all that's needed for a PC-end collections manager is above. Anyone willing to contribute a GUI for this job? (-8
Reply 

#2  elmoglick 05-15-2010, 05:56 PM
Quote ngukho
Managing collections on Kindle is painful and slow. However, if you dig into the new file system, you could find a "collections.json" at /mnt/us/system, which stores all the stuff related to collections data.
What is interesting is that deleting the file results in its immediate re-creation. From where??
Reply 

#3  =X= 05-20-2010, 11:54 AM
Couldn't you use calibre for the GUI?
Reply 

#4  Pushka 05-20-2010, 05:58 PM
That is like the screensavers. You delete them from the kindle, and next time, they are back! Calibre doesnt set up the collections - the developers dont even have the upgrade yet.
Reply 

#5  schaefer 06-18-2010, 01:56 PM
Quote ngukho
Managing collections on Kindle is painful and slow. However, if you dig into the new file system, you could find a "collections.json" at /mnt/us/system, which stores all the stuff related to collections data.

The "collections.json" is a standard json file. The only tricky part is how it identifies a document --- or what do those hashes come from. A little trial and error shows that they are merely the sha1 hash value of the document's absolute path, say a H.pdf is at the Kindle's documents directory, then its hash in collections.json would be sha1 hash of the string "/mnt/us/documents/H.pdf".

Voila, all that's needed for a PC-end collections manager is above. Anyone willing to contribute a GUI for this job? (-8
I have not been able to replicate this result. I am using OS X and the following command to generate the hash.

echo <Filepath> | openssl sha1

The result I get is the same length as the hash in the collections file but is not equal. Additionally, each item in my collections file has an asterisk before the hash, are others seeing this as well?
Reply 

#6  NiLuJe 06-18-2010, 02:23 PM
Use echo -n

(no trailing linebreak) [Provided OS X's echo implementation is more or less the same as on Linux]

And yep, I also have an asterisk here.
Reply 

#7  schaefer 06-18-2010, 02:41 PM
Quote NiLuJe
Use echo -n

(no trailing linebreak) [Provided OS X's echo implementation is more or less the same as on Linux]

And yep, I also have an asterisk here.
Still a different result. Here's the command I'm using

echo -n "/mnt/us/documents/hackermonthly-issue1.pdf" | openssl sha1
Reply 

#8  clarknova 06-18-2010, 02:56 PM
Quote schaefer
Still a different result. Here's the command I'm using

echo -n "/mnt/us/documents/hackermonthly-issue1.pdf" | openssl sha1
That similar command line works for my collections on linux, and the above gives "1d71ee1d02b3a543980d690d8d4026a8be73e3ca" as does using sha1sum instead of openssl.

According to the Mac OS X man pages, echo is posix compatible and supports the -n flag as it should.
Reply 

#9  schaefer 06-18-2010, 02:58 PM
Quote clarknova
That similar command line works for my collections on linux, and the above gives "1d71ee1d02b3a543980d690d8d4026a8be73e3ca" as does using sha1sum instead of openssl.

According to the Mac OS X man pages, echo is posix compatible and supports the -n flag as it should.
That's exactly the result I get as well, however it isn't the one that is in the collections.json file, hence my frustration.

EDIT:

Would other modifications have effected the way in which my DX creates the hashes? I have installed the updated screensaver hack.
Reply 

#10  schaefer 06-18-2010, 03:51 PM
Quote schaefer
That's exactly the result I get as well, however it isn't the one that is in the collections.json file, hence my frustration.

EDIT:

Would other modifications have effected the way in which my DX creates the hashes? I have installed the updated screensaver hack.
Update: I just tried it with a few other files and I get the same hash as the Kindle creates. The difference I notice is that these other files don't have hyphens in the filename. Is it possible that the hyphen is causing the difference?
Reply 

  Next »  Last »  (1/2)
Today's Posts | Search this Thread | Login | Register