10-09-2019, 07:20 AM | #16 |
Junior Member
Posts: 4
Karma: 10
Join Date: Oct 2019
Device: none
|
Nemate plugin ktorý funguje aj na Calibre 4.1?
|
12-13-2020, 02:33 PM | #17 |
Member
Posts: 18
Karma: 99066
Join Date: Oct 2020
Device: Calibre
|
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 |
Advert | |
|
12-13-2020, 03:57 PM | #18 | |
Resident Curmudgeon
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:
|
|
12-13-2020, 06:50 PM | #19 |
Guru
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. |
01-21-2021, 08:37 AM | #20 |
Member
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?
|
Advert | |
|
02-03-2021, 07:43 PM | #21 |
Junior Member
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. |
02-03-2021, 09:10 PM | #22 |
Grand Sorcerer
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. |
03-17-2021, 02:25 PM | #23 |
Member
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' 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. |
03-18-2021, 06:42 AM | #24 |
Guru
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. |
09-19-2021, 10:35 PM | #25 |
Member
Posts: 15
Karma: 10
Join Date: Feb 2014
Device: kindle paperwhite
|
Version 2021.9.19
Some more fixes
|
09-19-2021, 11:04 PM | #26 |
Member
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/
|
10-02-2021, 09:41 PM | #27 |
Member
Posts: 15
Karma: 10
Join Date: Feb 2014
Device: kindle paperwhite
|
Could the moderators update the first message with the latest zip uploaded? Thx
|
10-03-2021, 11:32 PM | #28 |
creator of calibre
Posts: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
10-04-2021, 04:05 AM | #29 |
Member
Posts: 15
Karma: 10
Join Date: Feb 2014
Device: kindle paperwhite
|
|
10-04-2021, 04:54 AM | #30 |
Well trained by Cats
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
|
|
|
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 |