|
|
#1 |
|
Comparer of the Ephemeris
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,169
Karma: 58793
Join Date: Mar 2009
Device: iPad
|
[GUI Plugin] Annotations
The Annotations plugin imports annotations from supported ebook readers and applications: Main Features of v1.1.2:
Installation Steps:
Plugin configuration:
Typical Marvin workflow:
Typical Kindle workflow: The Kindle UI must be set to English for the plugin to be able to retrieve locations and timestamps from your 'My Clippings.txt' file.
Typical GoodReader workflow:
Modifying the appearance of imported annotations:
How the plugin decides where to add imported annotations Spoiler:
Marvin export options: Spoiler:
Special Notes:
Developer Notes: The Annotations plugin can be extended to support devices whose annotations can be fetched while connected via USB, or exported via email. If you are a developer interested in adding support for a particular device or reader app meeting these requirements, contact me for more information. Paypal Donations: Version History: Spoiler:
Last edited by GRiker; 04-19-2013 at 07:29 AM. Reason: Update to version 1.1.2 |
|
|
|
|
|
#2 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Apr 2013
Device: Kindle Paperwhite
|
internationalization support?
Hi,
was trying to use the plugin (as included in calibre portable 0.9.23) and it did not find any annotations on my Kindle Paperwhite. Created a debug file via plugin options, which says: c:\dokume~1\axel\lokale~1\temp\calibre_annotations _plugin\Kindle.py:_parse_my_clippings(failed with line: u'- Ihre Notiz auf Seite 14 | Position 203 | Hinzugef\xfcgt am Sonntag, 2. September 2012 um 00:40:38 Uhr\n') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Traceback ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "c:\dokume~1\axel\lokale~1\temp\calibre_annotation s_plugin\Kindle.py", line 361, in _parse_my_clippings UnboundLocalError: local variable 'ts' referenced before assignment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ action:fetch_device_annotations(Amazon Kindle) action:fetch_device_annotations(INFO: <p>Unable to find any annotations on Amazon Kindle matching books in your library.</p>) It quotes the second line in My Clippings.txt, which is in deed localized to German by the Kindle. So it looks like the plugin can not handle Kindle set to language different from English, does it? I could try to change Kindle language to English, but I wonder if this would change all entries in My Clippings.txt or only new ones...? Anyway I'd rather not switch language. Best Axel |
|
|
|
|
Enthusiast
|
|
|
|
#3 | |
|
Comparer of the Ephemeris
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,169
Karma: 58793
Join Date: Mar 2009
Device: iPad
|
Quote:
I need to see your My Clippings.txt file to better understand the problem. Please copy 'My Clippings.txt' from your Kindle to your computer, then send me a PM with that file as an attachment. If it's too big, you can zip it to make it smaller. G
__________________
If you appreciate my contributions to calibre, say thanks with PayPal! |
|
|
|
|
|
|
#4 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Apr 2013
Device: Kindle Paperwhite
|
@GRiker
attached you find My Clippings.txt. I've removed some clipping entries from the beginning using notepad.exe. Got into software tester mood, so I also created a note containing some interesting non-ASCII characters, copied the file back to Kindle renamed as test.txt and marked the "==========" separator in there. By the way, sometimes the first line of an entry starts with a 3 byte UTF-8 character, which is displayed as a centered dot by notepad++ and as a caret by notepad. Do you know what that means? I don't have a binary editor here... but maybe Kindle repeatedly prefixes entries with UTF-8 BOM? Cheers Axel |
|
|
|
|
|
#5 |
|
Comparer of the Ephemeris
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,169
Karma: 58793
Join Date: Mar 2009
Device: iPad
|
@Axel, the problem is definitely related to the fact that your My Clippings.txt stores the timestamp of the annotation in German. I will do some research to see if I can find a way of handling multiple languages. It won't be right away, I'm in the midst of another project.
I will add a note to the Kindle section explaining that the UI must be set to English. G
__________________
If you appreciate my contributions to calibre, say thanks with PayPal! Last edited by GRiker; 04-18-2013 at 06:33 AM. |
|
|
|
|
|
#6 | |
|
Comparer of the Ephemeris
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,169
Karma: 58793
Join Date: Mar 2009
Device: iPad
|
Quote:
G
__________________
If you appreciate my contributions to calibre, say thanks with PayPal! |
|
|
|
|
|
|
#7 | |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Apr 2013
Device: Kindle Paperwhite
|
Thanks a lot for your fast feedback.
Quote:
I guess if I had to program a parser I would opt to keep everything after the last "|" a string. Comparing for equality should still work. Sorting by date won't work, but preserving order of entries may be good enough for most uses. In the end the question is what is to be / can be done with the notes and highlights. What I am currently looking for is a way to quickly and easily edit a book based on my notes&highlights. Considering that calibre isn't much of an ebook editor, I guess that anyway isn't something your plugin offers, or does it? |
|
|
|
|
|
|
#8 |
|
Comparer of the Ephemeris
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,169
Karma: 58793
Join Date: Mar 2009
Device: iPad
|
@-axel-
I've uploaded a new version of the plugin, 1.1.1, which substitutes the current time if it can't parse the timestamp from My Clippings.txt. This will at least allow you to fetch your annotations. If you want to try your hand at modifying the Kindle code, explode the plugin, find the document 'developer_notes.txt', follow the directions in step 4. @chaley had a great suggestion - use the online translation service at http://www.bing.com/translator to try to translate the line to English. This would assume an internet connection, and could be slow, as it would need to execute a translation for every annotation, but it could potentially solve the problem. There's a limit of 2MB of text per month through that site for free, so it would mean that individual users would need to have their own API key. This isn't something that I'm going to do in the near term, but you're welcome to try. G
__________________
If you appreciate my contributions to calibre, say thanks with PayPal! |
|
|
|
|
|
#9 | |
|
Comparer of the Ephemeris
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,169
Karma: 58793
Join Date: Mar 2009
Device: iPad
|
Quote:
I use Sigil to do the (ePub) editing. It has full-text search, so it's pretty quick to pull up the annotations (either in Calibre or on the iPad), then find the corresponding point in Sigil and correct it. I tried doing this using the Kindle PW, but it was ultimately an exercise in frustration. The interface is just too slow for making annotations. G
__________________
If you appreciate my contributions to calibre, say thanks with PayPal! |
|
|
|
|
|
|
#10 | |||
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Apr 2013
Device: Kindle Paperwhite
|
Quote:
Code:
c:\dokume~1\axel\lokale~1\temp\calibre_annotations_plugin\Kindle.py:_parse_my_clippings(failed with line: u'- Ihre Notiz auf Seite 14 | Position 203 | Hinzugef\xfcgt am Sonntag, 2. September 2012 um 00:40:38 Uhr\n') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Traceback ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "c:\dokume~1\axel\lokale~1\temp\calibre_annotations_plugin\Kindle.py", line 406, in _parse_my_clippings AttributeError: 'NoneType' object has no attribute 'group' Quote:
For .net I would try to use the built in "Culture" support. Python may have something similar? IIRC the Unix world often calls it "locale". Also note that if you tackle internationalization, you also will have to adjust the constants 'Highlight', 'Bookmark', and 'Note' in lines 345 ff in Kindle.py. Quote:
I'm more annoyed by having to use text search to locate a highlight in Sigil. There is the click-work for copy, paste and search. That's ok if you have just a few edits to do. But do it a 100 times and it becomes annoying. And there is the problem of ambiguity. An extreme example would be if I highlight an extra word "a" in the text. When I see it at the location, it becomes obvious why I marked it. But searching all "a" in the book takes some time. Some (approximate) support for "Go to location" would help. But I guess that is another topic. Thanks for your feedback and for trying to quick-fix the problem. Axel |
|||
|
|
|
|
|
#11 |
|
Comparer of the Ephemeris
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,169
Karma: 58793
Join Date: Mar 2009
Device: iPad
|
@-axel-,
I fixed the Position/Location error, version 1.1.2 should work properly for you. As far as your ambiguity problem, I always highlight context around the typo to make it easier to find the fragment. If I think I won't remember the typo or the reason for the markup, I add an annotation to the highlight explaining the markup. G
__________________
If you appreciate my contributions to calibre, say thanks with PayPal! |
|
|
|
|
|
#12 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 266
Karma: 1018687
Join Date: Mar 2011
Device: Kindle 3
|
With this plugin installed, I can't drag-and-drop new formats into existing book record in calibre. Calibre freezes, and I have to use the task manager to kill it.
Win 7, calibre 0.9.29 (and a previous version, don't remember which, both 64 and 32 bit) See also this thread Debug log: Spoiler:
|
|
|
|
|
|
#13 |
|
Comparer of the Ephemeris
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,169
Karma: 58793
Join Date: Mar 2009
Device: iPad
|
tilia, in the other thread you cited you posted a message saying that you resolved the problem. Is that correct?
G
__________________
If you appreciate my contributions to calibre, say thanks with PayPal! |
|
|
|
|
|
#14 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 266
Karma: 1018687
Join Date: Mar 2011
Device: Kindle 3
|
No, the problem with adding new formats to books is still there. (I wrote drag-and-drop, but it's not possible from the meta-data window either). I also had a problem using the plugin. After deleting three entries in My Clippings.txt, I can now use the plugin to import annotations from my K3. That's what my last post in the other thread was about.
There actually seems to be some conflict between your plugin and Alf's DRM-plugin. If I disable the DRM-plugin, I can add new formats to book records with Annotations installed. So I'm not sure if this is something that can be fixed by you, or by them. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 140 | 05-04-2013 11:27 AM |
| [GUI Plugin] Wordpress | frescogamba | Plugins | 1 | 02-27-2013 11:57 AM |
| [GUI Plugin] Ex Libris | AlPe | Plugins | 48 | 12-30-2012 11:33 AM |
| [GUI Plugin] SmartEject | JimmXinu | Plugins | 4 | 10-28-2012 01:46 PM |
| [GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |