![]() |
#1 |
Comparer of the Ephemeris
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
|
[GUI Plugin] Annotations (closed)
The Annotations plugin imports annotations from supported ebook readers and applications described in the following table: Main Features of v1.3.0:
Installation Steps:
Plugin configuration:
Typical Marvin workflow: As of Marvin 2.0, Marvin users can use the Marvin XD plugin to transfer annotations directly from Marvin to calibre. The Annotations plugin still supports Marvin, but for most users Marvin XD will be the preferred approach. If you install the Marvin XD plugin, uninstall the Annotations plugin.
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; 06-17-2014 at 06:14 AM. Reason: Closed thread |
![]() |
![]() |
#2 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6
Karma: 3088
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 |
![]() |
Advert | |
|
![]() |
#3 | |
Comparer of the Ephemeris
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,496
Karma: 424697
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 |
|
![]() |
![]() |
#4 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6
Karma: 3088
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,496
Karma: 424697
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 Last edited by GRiker; 04-18-2013 at 06:33 AM. |
![]() |
Advert | |
|
![]() |
#6 | |
Comparer of the Ephemeris
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
|
Quote:
G |
|
![]() |
![]() |
#7 | |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6
Karma: 3088
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,496
Karma: 424697
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 |
![]() |
![]() |
#9 | |
Comparer of the Ephemeris
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,496
Karma: 424697
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 |
|
![]() |
![]() |
#10 | |||
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6
Karma: 3088
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,496
Karma: 424697
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 |
![]() |
![]() |
#12 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 432
Karma: 1720909
Join Date: Mar 2011
Device: Voyage, K3
|
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,496
Karma: 424697
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 |
![]() |
![]() |
#14 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 432
Karma: 1720909
Join Date: Mar 2011
Device: Voyage, K3
|
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. |
![]() |
![]() |
#15 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Jun 2013
Device: iPad
|
![]()
Hello all together,
I'm just testing this plugin and I got following errors: My procedure was... - Marvin for iPad export Annotations (send by e-Mail) - Drag'n'drop *.MRV in the windows "Drag an exported Marvin annotations file (*.mrv, *.mrvi) to this window" - Click Preview Following error appears: calibre, version 0.9.33 ERROR: Unhandled exception: <b>UnboundLocalError</b>:local variable 'ts_style' referenced before assignment Traceback (most recent call last): File "calibre_plugins.annotations.annotated_books", line 392, in show_annotated_books_dialog_clicked File "calibre_plugins.annotations.annotated_books", line 376, in preview_annotations File "calibre_plugins.annotations.action", line 521, in get_annotations_as_HTML File "calibre_plugins.annotations.annotations_db", line 180, in annotations_to_html File "calibre_plugins.annotations.annotations", line 140, in to_HTML UnboundLocalError: local variable 'ts_style' referenced before assignment ------------------------------------------- - Or when I click Import annotations, following error occurs: Traceback (most recent call last): File "calibre_plugins.annotations.action", line 866, in present_annotated_books File "calibre_plugins.annotations.action", line 901, in process_selected_books File "calibre_plugins.annotations.action", line 105, in add_annotations_to_calibre File "calibre_plugins.annotations.annotations_db", line 180, in annotations_to_html File "calibre_plugins.annotations.annotations", line 140, in to_HTML UnboundLocalError: local variable 'ts_style' referenced before assignment ------------------------------------------- Another error occurs when I click "Modify appearance" in Customize Annotations: calibre, version 0.9.33 ERROR: Unhandled exception: <b>UnboundLocalError</b>:local variable 'ts_style' referenced before assignment Traceback (most recent call last): File "calibre_plugins.annotations.config", line 301, in configure_appearance File "calibre_plugins.annotations.appearance", line 452, in __init__ File "calibre_plugins.annotations.appearance", line 264, in initialize File "calibre_plugins.annotations.appearance", line 243, in css_edited File "calibre_plugins.annotations.appearance", line 330, in preview_css File "calibre_plugins.annotations.annotations", line 140, in to_HTML UnboundLocalError: local variable 'ts_style' referenced before assignment ------------------------------------------- I have just installed Calibre 0.9.33 + Annotations 1.1.2 (MAC-VERSION) + Apple iDevice interface 0.0.6 I've already tried - install the plugin manual - changed language of calibre (from German to English) ...nothing has helped ![]() Please ![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Annotations | davidfor | Plugins | 1187 | 03-23-2025 02:33 PM |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 514 | 03-23-2025 10:26 AM |
[GUI Plugin] Marvin XD (closed) | GRiker | Plugins | 141 | 06-15-2014 05:36 PM |
Plugin thread closed? | BookJunkieLI | Calibre | 3 | 10-05-2013 02:56 PM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |