08-03-2015, 01:08 PM | #1 |
Generally Awesome Person
Posts: 1,095
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
[Conversion Input] KePub Input
THIS PLUGIN IS BEING INTERMITTENTLY DEVELOPED! FEATURE REQUESTS AND BUG REPORTS MAY TAKE A FEW DAYS TO BE REPLIED TO.
This plugin allows converting KePub files to ePub by removing the special KePub markup. All the credit for actually creating this goes to davidfor, he wrote the code, I'm just including it in the codebase for the other KePub plugins. Please see the README file for the most current details. I will try to keep this post up to date, but the README is always up to date. You are encouraged to install this plugin as well, to ensure KePub metadata is correctly processed:
Usage To use this plugin after installing:
Special Notes
Installation Directions Open Preferences -> Plugins -> Get new plugins and install the 'KePub Input' plugin. You may also download the attached zip file and install the plugin manually, then restart calibre as described in the Introduction to Plugins thread. Contributing Decided you want to contribute to the development of this plugin? Awesome! If you want to contribute to the development of this plugin, you have many options:
Although I'm generally perfectly happy to discuss possible issues here, any issues sent to me through any means other than the Github bug tracker (including email, PM, etc.) may be silently ignored. This is not because I don't care! It's because I have a terrible memory, the Github issue tracker is my "to-do list" for this plugin, and there's been instances where I've seen a post or PM here and promptly forgotten all about it until I happened to stumble across the post again later. If you aren't sure if you have an issue, feel free to post here and we can work together to decide if you need to make a new Github issue or not. If you are sure you have an issue, or if you have an error or exception from calibre, post a new issue. It isn't necessary to post here when you make a new issue, I get notified of all new bugs and I check the list regularly. The worst that could possibly happen on Github is the same that could happen here: I'll tell you that it's not a bug and you'll have the opportunity to convince me otherwise! Version History Spoiler:
Last edited by jgoguen; 09-20-2023 at 11:25 AM. |
08-03-2015, 01:11 PM | #2 |
how YOU doin?
Posts: 1,100
Karma: 7371047
Join Date: Feb 2009
Location: India
Device: Kindle Keyboard, iPad Pro 10.5”, Kobo Aura H2O, Kobo Libra 2
|
Nice!
Does this mean that it's now safe to use kePub as a base storage format? |
Advert | |
|
08-03-2015, 01:19 PM | #3 |
Generally Awesome Person
Posts: 1,095
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
I personally won't use KePub as the base storage format unless it's a KePub straight from Kobo. The conversion plugin is still not producing KePub files the same as Kobo's. I'm still trying to get a couple of recent releases from Kobo to address that, but I'm not interested in paying more money for a book than I think it's worth and I'm not buying a book I don't want to read anyway, so it's taking a while. Kobo is pretty consistently more expensive for any book I actually want than Amazon, and not a single book I want has ever been valid for coupons, and Kobo has been pretty rude to me in the past.
If you happen to have some KePubs purchased recently from Kobo and you want to send them my way, I'm looking for books new to Kobo since June 2015, English language only (so I can read and know what I'm looking at and what I'm expecting). I need the books to be purchased directly from Kobo's site, downloaded by the Kobo reader directly to the reader (that seems to be the only way to get the actual KePub files) and copied from there. I'm also trying to sort out some things around the rights.xml file, so I need both the encrypted KePub file directly from the reader and the decrypted KePub file. I can't tell you how to decrypt the file, but I've heard rumour that an Apprintice named Alf knows everything you need to know about that Last edited by jgoguen; 08-03-2015 at 01:23 PM. |
08-03-2015, 01:29 PM | #4 |
how YOU doin?
Posts: 1,100
Karma: 7371047
Join Date: Feb 2009
Location: India
Device: Kindle Keyboard, iPad Pro 10.5”, Kobo Aura H2O, Kobo Libra 2
|
The most recent kobo book (Download options:EPUB2 (Adobe DRM)) I have has a publication date of 2013
|
08-03-2015, 01:44 PM | #5 |
Generally Awesome Person
Posts: 1,095
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
Like I said, you can't download KePubs from the Kobo site. You've got to buy the book then let the reader download it.
|
Advert | |
|
08-05-2015, 03:12 PM | #6 |
Generally Awesome Person
Posts: 1,095
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
New version uploaded, fixes issues with file names not being handled correctly. Calibre should offer it soon.
|
10-01-2015, 01:44 AM | #7 |
Generally Awesome Person
Posts: 1,095
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
New version posted, affecting the detection of cover images in some cases. Look for an update notice from calibre in the next hour or so.
|
07-08-2016, 06:12 AM | #8 |
Junior Member
Posts: 5
Karma: 10
Join Date: May 2016
Device: Kobo aura H2O
|
Error message kepub-epub
Error message when convert a kepub into epub, only in this version of calibre (2.62).
Code:
calibre, version 2.62.0 (win32, embedded-python: True) Errore di conversione: Non riuscita: Converti libro 1 di 1 (Un nero nei tribunali dei bianchi) Converti libro 1 di 1 (Un nero nei tribunali dei bianchi) Resolved conversion options calibre version: 2.62.0 {'asciiize': False, 'author_sort': None, 'authors': None, 'base_font_size': 0.0, 'book_producer': None, 'change_justification': u'original', 'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., '\\s*((chapter|book|section|part)\\s+)|((prolog|prologue|epilogue)(\\s+|$))', 'i')) or @class = 'chapter']", 'chapter_mark': u'pagebreak', 'comments': None, 'cover': u'D:\\TEMPORANEI\\TEMP\\calibre_fjikkn\\ntsblc.jpeg', 'debug_pipeline': None, 'dehyphenate': True, 'delete_blank_paragraphs': True, 'disable_font_rescaling': False, 'dont_split_on_page_breaks': False, 'duplicate_links_in_toc': False, 'embed_all_fonts': False, 'embed_font_family': None, 'enable_heuristics': False, 'epub_flatten': False, 'epub_inline_toc': False, 'epub_toc_at_end': False, 'expand_css': False, 'extra_css': None, 'extract_to': None, 'filter_css': u'', 'fix_indents': True, 'flow_size': 260, 'font_size_mapping': None, 'format_scene_breaks': True, 'html_unwrap_factor': 0.4, 'input_encoding': None, 'input_profile': <calibre.customize.profiles.InputProfile object at 0x06430E10>, 'insert_blank_line': False, 'insert_blank_line_size': 0.5, 'insert_metadata': False, 'isbn': None, 'italicize_common_cases': True, 'keep_ligatures': False, 'language': None, 'level1_toc': None, 'level2_toc': None, 'level3_toc': None, 'line_height': 0.0, 'linearize_tables': False, 'margin_bottom': 5.0, 'margin_left': 5.0, 'margin_right': 5.0, 'margin_top': 5.0, 'markup_chapter_headings': True, 'max_toc_links': 50, 'minimum_line_height': 120.0, 'no_chapters_in_toc': False, 'no_default_epub_cover': False, 'no_inline_navbars': False, 'no_svg_cover': False, 'output_profile': <calibre.customize.profiles.OutputProfile object at 0x06430FF0>, 'page_breaks_before': u'/', 'prefer_metadata_cover': False, 'preserve_cover_aspect_ratio': True, 'pretty_print': True, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': u'D:\\TEMPORANEI\\TEMP\\calibre_fjikkn\\_thnj8.opf', 'remove_fake_margins': False, 'remove_first_image': False, 'remove_paragraph_spacing': False, 'remove_paragraph_spacing_indent_size': 1.5, 'renumber_headings': True, 'replace_scene_breaks': u'', 'search_replace': '[]', 'series': None, 'series_index': None, 'smarten_punctuation': False, 'sr1_replace': None, 'sr1_search': None, 'sr2_replace': None, 'sr2_search': None, 'sr3_replace': None, 'sr3_search': None, 'start_reading_at': None, 'strip_kobo_spans': False, 'subset_embedded_fonts': False, 'tags': None, 'timestamp': None, 'title': None, 'title_sort': None, 'toc_filter': None, 'toc_threshold': 6, 'toc_title': None, 'transform_css_rules': '[]', 'unsmarten_punctuation': False, 'unwrap_lines': True, 'use_auto_toc': False, 'verbose': 2} InputFormatPlugin: KePub Input running on D:\TEMPORANEI\TEMP\calibre_fjikkn\frdqj6.kepub KEPUBInput::convert - start Python function terminated unexpectedly 'KEPUBInput' object has no attribute 'rationalize_cover' (Error Code: 1) Traceback (most recent call last): File "site.py", line 132, in main File "site.py", line 109, in run_entry_point File "site-packages\calibre\utils\ipc\worker.py", line 190, in main File "site-packages\calibre\gui2\convert\gui_conversion.py", line 31, in gui_convert_override File "site-packages\calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert File "site-packages\calibre\ebooks\conversion\plumber.py", line 1060, in run File "site-packages\calibre\customize\conversion.py", line 241, in __call__ File "calibre_plugins.kepubin.conversion.kepub_input", line 95, in convert AttributeError: 'KEPUBInput' object has no attribute 'rationalize_cover' |
07-08-2016, 09:25 AM | #9 |
creator of calibre
Posts: 44,726
Karma: 24967300
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It's a problem in the kepub input plugin, you should post in that plugin's thread, the plugin author just has to make a couple of changes to adapt to the new epub 3 code in 2.62
|
07-08-2016, 11:21 AM | #10 |
Well trained by Cats
Posts: 30,554
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Moderator Notice
Moved |
07-08-2016, 12:32 PM | #11 |
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
|
The error reported in this thread is due to to changes: https://github.com/kovidgoyal/calibr...12dbc0d7d37f45 and https://github.com/kovidgoyal/calibr...912468e0494a0a. And they are to add epub3 metadata support. As kepubs can be either epub2 or epub3, my first thought is to fix this with:
Code:
f = self.rationalize_cover3 if opf.package_version >= 3.0 else self.rationalize_cover2 self.removed_cover = f(opf, log) |
07-08-2016, 01:20 PM | #12 |
Generally Awesome Person
Posts: 1,095
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
New version uploaded, look for the upgrade in the next hour or so.
|
07-08-2016, 01:20 PM | #13 |
Generally Awesome Person
Posts: 1,095
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
Thanks for the report, I've just uploaded a new version that accounts for the new ePub 3 code. calibre should offer the upgrade within the next couple hours.
|
07-08-2016, 02:05 PM | #14 |
Junior Member
Posts: 5
Karma: 10
Join Date: May 2016
Device: Kobo aura H2O
|
Thanks!
|
07-08-2016, 07:35 PM | #15 |
null operator (he/him)
Posts: 21,186
Karma: 28819096
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Moderator Notice
Aanti's thread merged into here |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Conversion Input] Microsoft Doc Input Plugin | igi | Plugins | 76 | 06-28-2019 05:47 AM |
[Conversion Input] LaTeX Formulas Input Conversion Plugin | sevyls | Plugins | 0 | 03-23-2015 06:52 AM |
[Input Plugin] DOCX Input | SauliusP. | Plugins | 42 | 06-05-2013 05:01 AM |
Input formats for ePub conversion? | llamedos | Conversion | 5 | 02-24-2011 02:55 PM |
Looking For MHT Input Conversion Plugin | FlooseMan Dave | Plugins | 4 | 03-30-2010 06:52 PM |