View Single Post
Old 01-15-2015, 08:06 AM   #115
richo
Connoisseur
richo began at the beginning.
 
richo's Avatar
 
Posts: 68
Karma: 10
Join Date: Sep 2014
Device: KOReader on: Kindle Paperwhite and Android
I have noticed that from certain update of Kindle Paperwhite the parsing of myclippings.txt file for position of the highlight in book is failing. I have done little digging and found out that location text in MyClippings has been changed as follows:

example of the old text:
Your Highlight Location 93-96

example of the new text:
Your Highlight at location 206-206

I looked at the code in ParseKindleMyClippingsTxt.py and found out that very little change is needed to make this work again:

starting at line 96 (underlined line is added)

Code:
_LOCATION_REGEX = {
    'en': (r"\sLocation\s*%s",
           r"\slocation\s*%s",
           r"\sLoc\.\s*%s",),
    'de': (r"\sPosition\s*%s",),
    'es': (r"\sPosición\s*%s",),
    'fr': (r"\sEmplacement\s*%s",),
    'it': (r"\sPosizione\s*%s",),
    'jp': (r"\s位置No.\s*%s",),
    'pt': (r"\sPosição\s*%s",),
    'ch': (r"\s位置\s*%s",),
}
richo is offline   Reply With Quote