02-03-2014, 12:10 PM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: Feb 2014
Device: K3, K4
|
Trying to pair filename and sha1 hash in collections.json
Hello.
I was pointed to this amazing forum to find answers to my problem I need to identify which sha1 hash in collections.json file in Kindle belongs to which ebook file. I understand the hash is generated from the path to the file in Linux file system. However, there is some step in the process that Kindle uses, when handling spaces and dashes? I am unable to obtain the proper hashes. I have tried many online tools, and kindle collections, but none of them generated the right hashes. For example for the path to: /mnt/us/documents/Orwell, George/1984 - George Orwell.mobi the corresponding hash should be: f20904d7-b190-40f0-96a5-ea79b73a9997 Is there any online tool or a simple script/program that really works? Or am I doing it wrong? Thanks for any useful advice/help! |
02-03-2014, 06:16 PM | #2 |
BLAM!
Posts: 13,491
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@Adam23: In your example, that's not the sha1 hash of the absolute path, that's the ASIN (in this case, a fake ASIN created by Calibre from an UUID). The sha1 thing is now a fallback when the book doesn't have an ASIN set in its metadata, and used to be preceded by a star in the old format. Can't remember how the SQL-ized version on FW 5.x handles it.
Check the Kindle Collections plugin for the gory details. There's surely some smaller and simpler, but older, pieces of code laying around that handle the basics, but the Kindle Collections Calibre plugin is the only one that's still maintained, and AFAIK, probably the most complete & accurate one. Last edited by NiLuJe; 02-03-2014 at 06:22 PM. |
Advert | |
|
02-11-2014, 12:09 PM | #3 |
Junior Member
Posts: 2
Karma: 10
Join Date: Feb 2014
Device: K3, K4
|
Thanks for your response, but I still couldn't figure out why some books were identified by ASIN or by the hash numbers. Finally, I decided not to follow this path. I instead manually adjusted each file.
|
02-11-2014, 02:31 PM | #4 |
BLAM!
Posts: 13,491
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
FWIW: If the ASIN is set in the metadata, it's used, if it's not, the fallback to the sha1 sum is used instead.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Troubleshooting who provide the file in /usr/share/webkit-1.0/pillow/debug_cmds.json | hanpal | Amazon Kindle | 3 | 02-21-2012 04:21 AM |
sha1 on kindle? | dubaaron | Kindle Developer's Corner | 2 | 02-17-2011 12:50 PM |
Generate hash codes for Dictionaries? | meme | Kindle Developer's Corner | 0 | 02-01-2011 04:38 PM |
Force reloading collections.json | enn | Kindle Developer's Corner | 2 | 10-03-2010 06:57 PM |
post the root hash from your K3 | blkhawk | Kindle Developer's Corner | 7 | 09-20-2010 10:26 PM |