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 10-09-2019, 07:20 AM   #16
karino
Junior Member
karino began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2019
Device: none
Nemate plugin ktorý funguje aj na Calibre 4.1?
karino is offline   Reply With Quote
Old 12-13-2020, 02:33 PM   #17
brianswilson
Member
brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!
 
Posts: 18
Karma: 99066
Join Date: Oct 2020
Device: Calibre
Exclamation Installation error with ver. 2018.3.30 in Calibre 5.7

I received the following error while installing Martinus.sk version 2018.3.30 on Calibre 5.7.0:

calibre, version 5.7.0
ERROR: Install plugin failed: A problem occurred while installing this plugin. This plugin will now be uninstalled. Please post the error message in details below into the forum thread for this plugin and restart calibre.

Traceback (most recent call last):
File "calibre\gui2\dialogs\plugin_updater.py", line 709, in _install_clicked
File "calibre\customize\ui.py", line 472, in add_plugin
File "calibre\customize\ui.py", line 61, in load_plugin
File "calibre\customize\zipplugin.py", line 293, in load
File "importlib\__init__.py", line 127, in import_module
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "calibre\customize\zipplugin.py", line 185, in exec_module
File "calibre\customize\zipplugin.py", line 181, in get_code
File "calibre_plugins.martinussk.__init__", line 45
version = (2018, 03, 30)
^
SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers
brianswilson is offline   Reply With Quote
Advert
Old 12-13-2020, 03:57 PM   #18
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,510
Karma: 136565488
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by brianswilson View Post
I received the following error while installing Martinus.sk version 2018.3.30 on Calibre 5.7.0:

calibre, version 5.7.0
ERROR: Install plugin failed: A problem occurred while installing this plugin. This plugin will now be uninstalled. Please post the error message in details below into the forum thread for this plugin and restart calibre.

Traceback (most recent call last):
File "calibre\gui2\dialogs\plugin_updater.py", line 709, in _install_clicked
File "calibre\customize\ui.py", line 472, in add_plugin
File "calibre\customize\ui.py", line 61, in load_plugin
File "calibre\customize\zipplugin.py", line 293, in load
File "importlib\__init__.py", line 127, in import_module
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "calibre\customize\zipplugin.py", line 185, in exec_module
File "calibre\customize\zipplugin.py", line 181, in get_code
File "calibre_plugins.martinussk.__init__", line 45
version = (2018, 03, 30)
^
SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers
This plugin is not compatible with Python 3 used in Calibre 5. If you want to run this plugin, you will need to go back to Calibre 4.23.
JSWolf is offline   Reply With Quote
Old 12-13-2020, 06:50 PM   #19
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 783
Karma: 2298438
Join Date: Jan 2017
Location: Poland
Device: Various
I have prepared a working version (2020.12.13)
Retrieves the long description of the book.
Supports Python 3 in the latest 5.x Calibre releases.

Last edited by BeckyEbook; 10-04-2021 at 12:15 PM. Reason: Cleaning the thread. Removal of outdated files.
BeckyEbook is offline   Reply With Quote
Old 01-21-2021, 08:37 AM   #20
brianswilson
Member
brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!brianswilson has a thesaurus and is not afraid to use it!
 
Posts: 18
Karma: 99066
Join Date: Oct 2020
Device: Calibre
As written, the plugin is not compatible I agree. My report was made in the hope that the code could be changed to be compatible and provide the same functionality. I see the post from BeckyEbook (https://www.mobileread.com/forums/sh...87#post4068787) says there is a working version available for download. Any chance this can be pulled back to the main code branch?
brianswilson is offline   Reply With Quote
Advert
Old 02-03-2021, 07:43 PM   #21
hradocan
Junior Member
hradocan began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2021
Device: Kindle
ISBN query

Could you please modify the plugin to find a book just by ISBN?
I made some stupid test changes in _init_.py to prepare search page with ISBN:

def create_query(self, log, title=None, authors=None, isbn=None):
if title is not None:
search_title = title.replace(' ', '+')
elif isbn is not None:
search_title = isbn.replace(' ', '+')
else:
search_title = ''

if authors is not None:
search_author = authors[0].replace(' ', '+')
elif isbn is not None:
search_author = isbn.replace(' ', '+')
else:
search_author = ''

search_page = 'https://www.martinus.sk/?uMod=list&uTyp=search&c=čšťď&uQ=%s+%s' % (search_title,search_author)
log.info('URl> %s' %search_page)
return search_page
[/FONT]

And also in:

def identify(self, log, result_queue, abort, title, authors,
identifiers={}, timeout=30):
'''
Note this method will retry without identifiers automatically if no
match is found with identifiers.
'''
matches = []
martinussk_id = identifiers.get('martinussk', None)
isbn = check_isbn(identifiers.get('isbn', None))
log.info(u'\nTitle:%s\nAuthors:%s\nISBN:%s\n'%(tit le, authors, isbn))
br = browser()
if martinussk_id:
matches.append(martinussk.BASE_URL + '?uItem=' + martinussk_id)
else:
query = self.create_query(log, title=title, authors=authors, isbn=isbn)


But I've got trouble with:
def _parse_search_results(self, log, orig_title, orig_authors, root, matches, timeout):
especially in:
if self.match(title,orig_title) or (author in orig_authors) or (self.match(author,oauthor) for oauthor in orig_authors):

When I replaced mentioned IF statement with "if author is None:" it returns the correct book if such exists in martinus.sk or the list with several books with similar ISBN books.

Can somebody modify code the professional way?
Thank you in advance.
hradocan is offline   Reply With Quote
Old 02-03-2021, 09:10 PM   #22
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: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
@hradocan: You are overcomplicating it. If you look at how most of the metadata source plugins handle this, the "create_query" will check if there is an ISBN in the identifier and build a query that just uses that. If not, builds the author/title query. Then it does the actual search. If nothing is found, they recurse into "identify" again without passing in the identifiers.

You can look at the Goodreads, KoboBooks and others to see how they handle this.
davidfor is offline   Reply With Quote
Old 03-17-2021, 02:25 PM   #23
Ubiquity
Member
Ubiquity began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Apr 2019
Device: Android phone
S pluginem je nějaký problém. Používám verzi postnutou 13.12. a občas stražení metadat skončí s 0 nálezy a chybovou hláškou Nepodařilo se stáhnout metadata

Code:
calibre, version 5.13.0
CHYBA: Stahování selhalo: Nepodařilo se stáhnout metadata. Pro podrobnosti klikněte na "Zobrazit podrobnosti"

Traceback (most recent call last):
  File "calibre\utils\ipc\simple_worker.py", line 304, in main
  File "calibre\ebooks\metadata\sources\worker.py", line 107, in single_identify
  File "calibre\ebooks\metadata\sources\identify.py", line 499, in identify
  File "calibre\ebooks\metadata\sources\identify.py", line 367, in merge_identify_results
  File "calibre\ebooks\metadata\sources\identify.py", line 155, in finalize
  File "calibre\ebooks\metadata\sources\identify.py", line 249, in merge_isbn_results
  File "calibre\ebooks\metadata\sources\identify.py", line 297, in merge
TypeError: '>' not supported between instances of 'str' and 'int'
Mám už ozkoušeno že když Martinus.sk deaktivuji metadata se najdou takže chyba je jasně v tomto pluginu.
Jinak bych měl prosbu aby plugn prohledával i doménu martinus.cz. Jsou knižky které najdu jenom tam a naopak. Jak česká tak slovenská mutace webu mají stejnou strukturu tak že by to nemělo dát moc práce.
Ubiquity is offline   Reply With Quote
Old 03-18-2021, 06:42 AM   #24
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 783
Karma: 2298438
Join Date: Jan 2017
Location: Poland
Device: Various
This is not my plugin.
I made a tiny fix, but if someone is going to have some extra support for the Czech website, it won't be me.

Fix (2021.03.18)

Last edited by BeckyEbook; 10-04-2021 at 12:15 PM. Reason: Cleaning the thread. Removal of outdated files.
BeckyEbook is offline   Reply With Quote
Old 09-19-2021, 10:35 PM   #25
plazma
Member
plazma began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Feb 2014
Device: kindle paperwhite
Version 2021.9.19

Some more fixes
Attached Files
File Type: zip Martinus.sk.zip (6.8 KB, 241 views)
plazma is offline   Reply With Quote
Old 09-19-2021, 11:04 PM   #26
plazma
Member
plazma began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Feb 2014
Device: kindle paperwhite
Also, any pull requests are welcome here: https://bitbucket.org/pavolzibrita/c...sk/src/master/
plazma is offline   Reply With Quote
Old 10-02-2021, 09:41 PM   #27
plazma
Member
plazma began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Feb 2014
Device: kindle paperwhite
Could the moderators update the first message with the latest zip uploaded? Thx
plazma is offline   Reply With Quote
Old 10-03-2021, 11:32 PM   #28
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by plazma View Post
Could the moderators update the first message with the latest zip uploaded? Thx
done, though you should be able to edit the first post in this thread yourself, since you created it.
kovidgoyal is offline   Reply With Quote
Old 10-04-2021, 04:05 AM   #29
plazma
Member
plazma began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Feb 2014
Device: kindle paperwhite
Quote:
Originally Posted by kovidgoyal View Post
done, though you should be able to edit the first post in this thread yourself, since you created it.
It does not look like I have edit rights.
plazma is offline   Reply With Quote
Old 10-04-2021, 04:54 AM   #30
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,454
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by plazma View Post
It does not look like I have edit rights.
Your MR post count is probably still too low (forum anti-spam measure) to allow self edits. That will go away in time-posts. Until then Forum Mods can do the edits. Just PM (that is restricted also) one of the forum Mods.
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Read a book's metadata in a Metadata source plugin? J-H Development 2 03-30-2021 10:08 AM
[Metadata Source Plugin] wikidata compurandom Plugins 46 11-28-2020 12:32 AM
[Metadata Source Plugin] Empty Plugin? (Fake Identifier) mneimeyer Plugins 3 11-11-2019 09:07 PM
[Metadata Source Plugin] Bookradar idlesign Plugins 0 11-04-2014 12:44 AM
[Metadata Source Plugin] Aladin.co.kr (KO) sseeookk Plugins 1 04-10-2014 09:34 PM


All times are GMT -4. The time now is 03:55 PM.


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