Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 09-25-2021, 01:41 AM   #991
aik099
Enthusiast
aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!
 
Posts: 33
Karma: 100180
Join Date: Apr 2020
Device: none
Quote:
Originally Posted by Savate View Post
Thanks for the tip, I tried that.

Very difficult to use and the procedure does not seem to allow me to select individual books - it always prints the entire library, and the formatting of the outputs is always rudimentary.

Do you know of any plugins that might do the job?
There is a "Fetch Annotations" 1.0.0 plugin by Kovid Goyal, that parses the "My Clippings.txt" file on the Kindle and then shows the dialog for selecting books to import annotations from. But does work for Kindle only and is marked as experimental.
aik099 is offline   Reply With Quote
Old 09-25-2021, 02:19 AM   #992
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Savate View Post
Thanks for the tip, I tried that.

Very difficult to use and the procedure does not seem to allow me to select individual books - it always prints the entire library, and the formatting of the outputs is always rudimentary.
The catalogue is for all books in the current list. If you do a search, then it will only include the books that are in the result list.
Quote:
Do you know of any plugins that might do the job?

OR

Is there another way to print the contents of my annotations field individually?

OR

is there a chance that a print/export action could be added to the Annotations plugin?
I don't think there is another plugin. But, I have never really needed to produce catalogues or print these, so I have not really looked. And it isn't something I want to add to the plugin.

If you are generating an epub, you can edit it afterwards to improve the formatting. Or you can generate a CSV or XML and produce something from that.
davidfor is offline   Reply With Quote
Old 09-25-2021, 05:28 AM   #993
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by aik099 View Post
There is a "Fetch Annotations" 1.0.0 plugin by Kovid Goyal, that parses the "My Clippings.txt" file on the Kindle and then shows the dialog for selecting books to import annotations from. But does work for Kindle only and is marked as experimental.
That works basically the same way as this plugin does. But, there is less flexibility with where the annotations go and how they are formatted.
davidfor is offline   Reply With Quote
Old 01-27-2022, 03:29 PM   #994
olof-ynwa
Junior Member
olof-ynwa began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2022
Device: Kindle Paperwhite 5
Minor detail... and some help please :)

Hello! I use obsidian quite a bit and I've wanted to easily insert highlights from my kindle into my obsidian notes. For this I've written a python script that parses the my clippings file and sorts them into note and highlight pairs where the note content may include commands that govern how and whether to check if there are valid commands in the note , how the content of the highlight should be modified (embedding words with pattern match in obsidian links, adding content above and below the highlight, basic search and replace) and how and where the note should be inserted (file pattern match, header pattern match/ which line, append/prepend etc).

This plugin has worked smoothly for me though so I don't plan to parse MyClippings directly anymore. So I just wonder how you would go about accessing the notes and highlights from either the specified columns or the comments section. And deleting the command notes when they served their purpose.

Also, when you create a note directly in kindle, it automatically creates a highlight at the same time. If you edit the note it creates a new note in my clippings, and if you're highlights are extremely close to eachother there are no ways of distinguishing which note belongs to which highlight except for the timestamp (if created at the same time, no problem, if edited, no chance). This made me notice a bombshell bug, in the plugin notes, are always registered as being created one second before the corresponing highlight even though they should be timestamped at the same time !!! (obviously not an issue but oh well)
olof-ynwa is offline   Reply With Quote
Old 01-28-2022, 02:14 AM   #995
aik099
Enthusiast
aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!
 
Posts: 33
Karma: 100180
Join Date: Apr 2020
Device: none
Question Support for AlReader on the Android-based devices

Hi,

I've posted an issue on GitHub for AlReader support: https://github.com/davidfor/calibre-...ions/issues/18 . Could you please implement it?

Thank you.
aik099 is offline   Reply With Quote
Old 01-28-2022, 03:14 AM   #996
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by aik099 View Post
I've posted an issue on GitHub for AlReader support: https://github.com/davidfor/calibre-...ions/issues/18 . Could you please implement it?
Personally, no. I don't use the app so have no experience or knowledge in how it works. And that leaves me with no personal interest in doing it. If someone is interested in doing it, I am happy to answer any question, check the code and add it to the plugin, but, I am unlikely to implement the fetch for a device or app that I do not have or use.

And sorry for not replying to the issue before. I didn't get notification about it and rarely look at the repository.
davidfor is offline   Reply With Quote
Old 01-28-2022, 03:33 AM   #997
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by olof-ynwa View Post
Hello! I use obsidian quite a bit and I've wanted to easily insert highlights from my kindle into my obsidian notes. For this I've written a python script that parses the my clippings file and sorts them into note and highlight pairs where the note content may include commands that govern how and whether to check if there are valid commands in the note , how the content of the highlight should be modified (embedding words with pattern match in obsidian links, adding content above and below the highlight, basic search and replace) and how and where the note should be inserted (file pattern match, header pattern match/ which line, append/prepend etc).

This plugin has worked smoothly for me though so I don't plan to parse MyClippings directly anymore. So I just wonder how you would go about accessing the notes and highlights from either the specified columns or the comments section. And deleting the command notes when they served their purpose.
It depends on where you are running the code. If you are writing a calibre plugin, then you can access any column in any book in the library. In this case, you can get the HTML code stored in the column, parse it how you want and update whatever it is that you need. I can point to code that does it. Or suggest other plugins that would be good references. The "Clean Comments" plugin would probably be a good start.

If you are doing it from outside calibre, you can use the calibredb command to get data from the library. I don't use it much but you can get any column from the library once you know the book id. And the book id can be found in various ways.
Quote:
Also, when you create a note directly in kindle, it automatically creates a highlight at the same time. If you edit the note it creates a new note in my clippings, and if you're highlights are extremely close to eachother there are no ways of distinguishing which note belongs to which highlight except for the timestamp (if created at the same time, no problem, if edited, no chance). This made me notice a bombshell bug, in the plugin notes, are always registered as being created one second before the corresponing highlight even though they should be timestamped at the same time !!! (obviously not an issue but oh well)
That's news to me. The plugin reads the files in order and uses the timestamp to sort them within the book. There is some checking for duplicate timestamps, but, all the code does is add a second to to them to make the timestamp unique. If there is a bug, then I need some examples and an explanation of what is wrong and how it should be handled. I don't have a Kindle, so I can't test it myself.
davidfor is offline   Reply With Quote
Old 01-28-2022, 04:09 AM   #998
olof-ynwa
Junior Member
olof-ynwa began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2022
Device: Kindle Paperwhite 5
Yeah I wasn't that serious about the bug thing :-). It's just that in the kindle, notes and highlights may have the same timestamp which can be useful if you want to pair a note with a highlight. You just mark out the wanted text, click create note, and a highlight will automatically be created for that note at the same time (duplicate timestamps are expected).
You may use location to pair them as well but it doesn't work if there are multiple notes/highlights in the same location.
Obviously, you can't really create multiple notes within one second of each other, so if it just adds one second to duplicate timestamps it isn't a problem, I just got a bit confused.
olof-ynwa is offline   Reply With Quote
Old 01-29-2022, 02:35 PM   #999
frailtyy
Member
frailtyy ought to be getting tired of karma fortunes by now.frailtyy ought to be getting tired of karma fortunes by now.frailtyy ought to be getting tired of karma fortunes by now.frailtyy ought to be getting tired of karma fortunes by now.frailtyy ought to be getting tired of karma fortunes by now.frailtyy ought to be getting tired of karma fortunes by now.frailtyy ought to be getting tired of karma fortunes by now.frailtyy ought to be getting tired of karma fortunes by now.frailtyy ought to be getting tired of karma fortunes by now.frailtyy ought to be getting tired of karma fortunes by now.frailtyy ought to be getting tired of karma fortunes by now.
 
frailtyy's Avatar
 
Posts: 22
Karma: 1458640
Join Date: Nov 2019
Location: PDX
Device: Kobo Libra H2O, Kindle Paperwhite
Seeing something strange when attempting to configure the plugin on Linux:

Quote:
calibre, version 5.33.2
ERROR: Unhandled exception: <b>AttributeError</b>:module 'collections' has no attribute 'Callable'

calibre 5.33.2 embedded-python: False is64bit: True
Linux-5.15.16-200.fc35.x86_64-x86_64-with-glibc2.34 Linux ('64bit', 'ELF')
('Linux', '5.15.16-200.fc35.x86_64', '#1 SMP Thu Jan 20 15:38:18 UTC 2022')
Python 3.10.2
Interface language: None
Successfully initialized third party plugins: DeACSM (0, 0, 15) && DeDRM (10, 0, 2) && Annotations (1, 16, 0) && Count Pages (1, 11, 2) && Goodreads (1, 5, 1) && Goodreads Sync (1, 15, 1) && KOReader Sync (0, 2, 2) && Kindle hi-res covers (0, 5, 0) && Obok DeDRM (10, 0, 0) && Reading List (1, 7, 6) && Zotero Metadata Importer (1, 0, 70)
Traceback (most recent call last):
File "calibre_plugins.annotations.action", line 1332, in show_configuration
self.interface_action_base_plugin.do_user_config(s elf.gui)
File "/usr/lib64/calibre/calibre/customize/__init__.py", line 166, in do_user_config
config_widget = self.config_widget()
File "calibre_plugins.annotations.__init__", line 28, in config_widget
self.cw = ConfigWidget(self.actual_plugin_)
File "calibre_plugins.annotations.config", line 197, in __init__
restore_state(self)
File "calibre_plugins.annotations.common_utils", line 1189, in restore_state
if isinstance(setter_ref, collections.Callable):
AttributeError: module 'collections' has no attribute 'Callable'
If there's anything else I can pull to help, feel free to let me know.
frailtyy is offline   Reply With Quote
Old 01-29-2022, 06:27 PM   #1000
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by frailtyy View Post
Seeing something strange when attempting to configure the plugin on Linux:



If there's anything else I can pull to help, feel free to let me know.
That appears to be a change in Python. The code works in older versions of Python but was removed in version 3.8. I'll fix it as soon as I have a chance.
davidfor is offline   Reply With Quote
Old 02-18-2022, 05:04 AM   #1001
Drake82
Junior Member
Drake82 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2022
Device: Kindle Paperwhite
Hello and thank you for help, I bought a new kindle and I want to transfer everything from the old one to the new one, I tried to transfer everything with copy/paste, but notes didn't got on the new one, then I tried to synch everything to Calibre library and then resynch with new kindle, but no way, there is something I can do for transfer all my notes to new kindle?

Thank you again
Drake82 is offline   Reply With Quote
Old 02-18-2022, 05:59 AM   #1002
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Drake82 View Post
Hello and thank you for help, I bought a new kindle and I want to transfer everything from the old one to the new one, I tried to transfer everything with copy/paste, but notes didn't got on the new one, then I tried to synch everything to Calibre library and then resynch with new kindle, but no way, there is something I can do for transfer all my notes to new kindle?
If the books are purchased from Amazon and syncing to the device, the annotations should sync. For sideloaded books, there is no way to do it that I know of. The Annotations plugin is one-way. It reads the annotations and stores them. But, it has no way to restore them to the device.

I would suggest asking your question in the Kindle forum. Someone there might have a suggestion.
davidfor is offline   Reply With Quote
Old 02-18-2022, 10:31 AM   #1003
aik099
Enthusiast
aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!
 
Posts: 33
Karma: 100180
Join Date: Apr 2020
Device: none
Unable to make "SampleFetchingApp.py" class to work

Hi,

I've used https://github.com/davidfor/calibre-...FetchingApp.py and made these change in class declaration:

Code:
# Change the class name to <app_name>ReaderApp, e.g. 'KindleReaderApp'
class Nova3ReaderApp(USBReader):
    """
    Sample USB implementation
    Fetching annotations takes place in two stages:
    1) get_installed_books():
        add the installed books' metadata to the database
    2) get_active_annotations():
        add the annotations for installed books to the database
    """
    # The app name should be the first word from the
    # device's name property, e.g., 'Kindle' or 'SONY'. Drivers are located in
    # calibre.devices.<device>
    # For example, the name declared in the Kindle class
    # is 'Kindle 2/3/4/Touch/PaperWhite Device Interface',
    # so app_name would be the first word, 'Kindle'
    app_name = 'Nova3'

    # Change this to True when developing a new class from this template
    SUPPORTS_FETCHING = True
and of I've registered that class in the "annotations.json" file.

Now I see that class being loaded by the Calibre, however, when I connect my device which has "Nova3" device name (as app_name) the "import annotations from device" (or similarly named) menu entry of the "Annotations" toolbar button is grayed out.

I've also tried adding another class (as done for Kindle reader class), but that had no effect.

Code:
class NovaReaderApp(Nova3ReaderApp):
    """
    Fetching annotations takes place in two stages:
    1) get_installed_books():
        add the installed books' metadata to the database
    2) get_active_annotations():
        add the annotations for installed books to the database
    """
    # The app name should be the first word from the
    # device's name property, e.g., 'Kindle' or 'SONY'. Drivers are located in
    # calibre.devices.<device>
    # For example, the name declared in the Kindle class
    # is 'Kindle 2/3/4/Touch/PaperWhite Device Interface',
    # so app_name would be the first word, 'Kindle'
    app_name = 'Nova'
Any idea, what I'm doing wrong?

Thank you.
aik099 is offline   Reply With Quote
Old 02-18-2022, 05:49 PM   #1004
aik099
Enthusiast
aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!
 
Posts: 33
Karma: 100180
Join Date: Apr 2020
Device: none
Turned out to be a bug in device detection inside the plugin itself. I've assembled a fix in https://github.com/davidfor/calibre-annotations/pull/20 and tested it on 2 devices:

- Kindle
- Onyx Boox Android Device

Please review it.
aik099 is offline   Reply With Quote
Old 02-19-2022, 04:19 AM   #1005
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by aik099 View Post
Turned out to be a bug in device detection inside the plugin itself. I've assembled a fix in https://github.com/davidfor/calibre-annotations/pull/20 and tested it on 2 devices:

- Kindle
- Onyx Boox Android Device

Please review it.
Thanks. I haven't had to deal with MTP devices before so this is good.
davidfor is offline   Reply With Quote
Reply

Tags
sampleexportingapp


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 523 07-15-2025 06:45 PM
[GUI Plugin] Open With kiwidude Plugins 404 02-21-2025 05:42 AM
[GUI Plugin] Annotations (closed) GRiker Plugins 68 06-17-2014 06:11 AM
[GUI Plugin] KiNotes -axel- Plugins 0 07-14-2013 06:39 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 10:48 PM.


MobileRead.com is a privately owned, operated and funded community.