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 05-21-2016, 04:20 PM   #166
evanft
Zealot
evanft ought to be getting tired of karma fortunes by now.evanft ought to be getting tired of karma fortunes by now.evanft ought to be getting tired of karma fortunes by now.evanft ought to be getting tired of karma fortunes by now.evanft ought to be getting tired of karma fortunes by now.evanft ought to be getting tired of karma fortunes by now.evanft ought to be getting tired of karma fortunes by now.evanft ought to be getting tired of karma fortunes by now.evanft ought to be getting tired of karma fortunes by now.evanft ought to be getting tired of karma fortunes by now.evanft ought to be getting tired of karma fortunes by now.
 
Posts: 108
Karma: 695156
Join Date: Apr 2013
Device: Kindle 4 NT
Nevermind.

Last edited by evanft; 05-21-2016 at 04:24 PM.
evanft is offline   Reply With Quote
Old 07-18-2016, 02:17 AM   #167
lilhand
Junior Member
lilhand began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2016
Device: Kobo Glo HD
I've been struggling with a problem for some time and I haven't been able to find any solution or ideas. When I convert and send some books to my Kobo Glo HD, the page numbers are completely incorrect and messy. For example, the book will start on page 10 in the copyright information, then go to page 15 on the table of contents, jump to 40 on the dedication and then finally begin on page 2, only to jump to page 100 on chapter 2.

The weird thing is that the chapters are actually fine, but I can never know how far into the book I am because of this and the statistics on how long it is to the end of the book are totally wrong too.

I have no idea what to do about this and I haven't found anyone mentioning it. Any ideas?

Edit: I just noticed that this happens when simply changing the extension from epub to kepub.epub too, so maybe it's not just a problem with the conversion, but I still have no idea what to do.
lilhand is offline   Reply With Quote
Advert
Old 07-18-2016, 03:29 AM   #168
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
From memory, this is an issue with the ToC in the book. For a kepub to work best, every internal file needs to be in the ToCthere needs to be one one ToC per internal file and. If you edit the book in the calibre editor and rebuild the ToC properly, it should fix it.
davidfor is offline   Reply With Quote
Old 07-19-2016, 04:52 PM   #169
lilhand
Junior Member
lilhand began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2016
Device: Kobo Glo HD
Thank you!
lilhand is offline   Reply With Quote
Old 11-03-2016, 10:39 AM   #170
jiembe
Zealot
jiembe began at the beginning.
 
Posts: 137
Karma: 10
Join Date: Sep 2016
Location: Montréal Québec
Device: Kobo Glo; Kobo Libra
Gett the Cover page into the Table of Contents

I'm using "Kepub Output" to converting my epubs into kepubs. I'm very satisfied with the output.

However, I'm unable to get a link to the Cover page into the Table of Contents even if I have that link in the original epub file. Do someone know how to?
jiembe is offline   Reply With Quote
Advert
Old 11-03-2016, 06:42 PM   #171
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Where is the link missing? In the generated NCX or when you look at the ToC on the device?

If the link is missing from the NCX, then you need to check the options for building the ToC. For a conversion, the ToC isn't usually carried over. It is rebuilt from the book using the options specified. The file for the cover is probably just embedding the cover image and has nothing extra that can be picked up as the ToC entry for the cover page. When I want to do this, I add a hidden heading to the file. This will be something like:

Code:
<h1 class="hidden">Title of the Book</h1>
And in the stylesheet:
Code:
.hidden { display: None }
This gives something for the the ToC builder to find without changing what the cover page looks like.
davidfor is offline   Reply With Quote
Old 11-03-2016, 09:36 PM   #172
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
@davidfor,

I can confirm what jiembe says. A source epub which has a ToC entry in the NCX for each file including the cover page (a standard calibre SVG-type cover page) produces a kepub which still has the cover page but the NCX entry for the cover page disappears during the conversion process.

An epub-to-epub conversion using the same source epub and conversion settings does not lose the cover page entry in the NCX.

I can post a small test epub if you need one.
jackie_w is offline   Reply With Quote
Old 11-03-2016, 09:59 PM   #173
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
@jackie_w: OK, that's not what I expected. I'll have a look over the weekend.

I probably have a suitable epub, but if you post your sample, then we are working from the same starting point. Can you also post the conversion logs? They will show the settings used and I can make sure I have them correct.
davidfor is offline   Reply With Quote
Old 11-03-2016, 10:38 PM   #174
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
@davidfor,

I've attached the test source epub and the converted kepub. Hopefully that's enough, but let me know if something's missing.

This is only a guess but I think the problem might have something to do with the cover page file (titlepage.xhtml) being moved out of its text/ sub-directory into the root directory during the kepub conversion. Perhaps the NCX loses track of the move.

Conversion job details
Spoiler:
Convert book 1 of 1 (Ligatures)
Resolved conversion options
calibre version: 2.70.0
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 12.0,
'book_producer': None,
'change_justification': u'original',
'chapter': u'/',
'chapter_mark': u'pagebreak',
'comments': None,
'cover': u'D:\\sysfiles\\Temp\\calibre_u7scni\\ud1hoz.jpeg' ,
'debug_pipeline': None,
'dehyphenate': False,
'delete_blank_paragraphs': False,
'disable_font_rescaling': True,
'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': False,
'flow_size': 260,
'font_size_mapping': u'9, 10, 11, 12, 14, 16, 20, 36',
'format_scene_breaks': False,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x0000000005A9BE80>,
'insert_blank_line': False,
'insert_blank_line_size': 0.5,
'insert_metadata': False,
'isbn': None,
'italicize_common_cases': False,
'keep_ligatures': False,
'kepub_clean_markup': False,
'kepub_disable_hyphenation': False,
'kepub_hyphenate': False,
'kepub_replace_lang': True,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 0.0,
'linearize_tables': False,
'margin_bottom': -1.0,
'margin_left': -1.0,
'margin_right': -1.0,
'margin_top': -1.0,
'markup_chapter_headings': False,
'max_toc_links': 0,
'minimum_line_height': 0.0,
'no_chapters_in_toc': False,
'no_default_epub_cover': False,
'no_inline_navbars': False,
'no_svg_cover': False,
'output_profile': <calibre.customize.profiles.TabletOutput object at 0x0000000005AB1908>,
'page_breaks_before': u'/',
'prefer_metadata_cover': False,
'preserve_cover_aspect_ratio': False,
'pretty_print': True,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': u'D:\\sysfiles\\Temp\\calibre_u7scni\\2mxssl.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,
'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': False,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: EPUB Input running
on D:\sysfiles\Temp\calibre_u7scni\uxvpj7.epub
Found HTML cover text/titlepage.xhtml
Parsing all content...
Parsing text/lig.htm ...
Parsing stylesheet.css ...
Parsing text/titlepage.xhtml ...
Reading TOC from NCX...
Merging user specified metadata...
Detecting structure...
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Cleaning up manifest...
Trimming unused files from manifest...
Trimming u'text/titlepage.xhtml' from manifest
Creating KePub Output...
Splitting markup on page breaks and flow limits, if any...
Looking for large trees in text/lig.htm...
No large trees found
Copying file 'D:\sysfiles\Temp\calibre_u7scni\irnoug_KePubOutpu tPluginInfo' to 'D:\sysfiles\Temp\calibre_u7scni\jmnn1z_epub_conta iner' as 'plugininfo.kte'
{'smarten_punctuation': False, 'replace_lang': True, 'hyphenate': False, 'no-hyphens': False, 'extended_kepub_features': True, 'clean_markup': False}
KoboTouchExtended:common:modify_epub:Found cover image ID 'cover'
KoboTouchExtended:common:modify_epub:Setting cover-image property
Forcing cleanup for file text/lig.htm
Forcing cleanup for file titlepage.xhtml
KoboTouchExtended:common:modify_epub:Overriding OPF language
KoboTouchExtended:common:modify_epub:Overriding content file language :: text/lig.htm
KoboTouchExtended:common:modify_epub:Overriding content file language :: titlepage.xhtml
KoboTouchExtended:common:modify_epub:Adding extended Kobo features to Ligatures by Aaa Zzz
Adding Kobo spans to text/lig.htm
Adding Kobo spans to titlepage.xhtml
Adding Kobo divs to text/lig.htm
Adding Kobo divs to titlepage.xhtml
Skipping file (many divs! handle it!)
Copying file 'D:\sysfiles\Temp\calibre_u7scni\kepub_uifnky_styl ehacks' to 'D:\sysfiles\Temp\calibre_u7scni\jmnn1z_epub_conta iner' as 'kte-css/stylehacks.css'
Adding reference to kte-css/stylehacks.css to file text/lig.htm
Adding reference to kte-css/stylehacks.css to file titlepage.xhtml
KEPUB output written to D:\sysfiles\Temp\calibre_u7scni\smerli.kepub
Attached Files
File Type: epub source.epub (150.4 KB, 243 views)
File Type: epub output.kepub.epub (150.8 KB, 216 views)

Last edited by jackie_w; 11-04-2016 at 02:52 PM. Reason: Pre-judging a problem with no facts is probably counter-productive
jackie_w is offline   Reply With Quote
Old 11-06-2016, 12:11 AM   #175
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
The problem is in the calibre conversion code. For everything except epubs, the conversion process strips the ToC entry pointing to the cover before passing everything to the output plugin. I have made a change to add kepub to the exceptions and checked it in. Assuming Kovid agrees, it will be in the next release.

For those who want to check, the change is https://github.com/davidfor/calibre/...fd85fbb5bf941e
davidfor is offline   Reply With Quote
Old 11-06-2016, 09:48 AM   #176
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 1,061
Karma: 2178845
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
[Conversion Output] KePub Output Plugin

Should that be a list in the class, so plugins can override it?
jgoguen is offline   Reply With Quote
Old 11-06-2016, 01:04 PM   #177
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by davidfor View Post
Assuming Kovid agrees, it will be in the next release.
I see he did agree. I tried it in my 'run from source' calibre. It looks fine. Thank you
jackie_w is offline   Reply With Quote
Old 11-06-2016, 06:32 PM   #178
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by jgoguen View Post
Should that be a list in the class, so plugins can override it?
I wouldn't code it as a list. If I was doing it properly, I would probably add a property along the lines of "supports_cover_in_toc". Default that to false in the base OutputPlugin class and set it to true wherever appropriate. That was more than I felt like doing yesterday and the change I made was in keeping with the coding style in of the class and method I was changing. And if we keep adding things like, this Kovid will eventually accept that kepubs are a standard format. Wouldn't we all like to edit kepubs in the calibre editor??? Just two or three changes if anyone is interested.

Also, is the git repository up to date? My local copy doesn't match but I'm not sure which are changes I've meant to throw away.
davidfor is offline   Reply With Quote
Old 11-06-2016, 07:25 PM   #179
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 1,061
Karma: 2178845
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
It should be. Though since I moved the code folder to my Dropbox it wouldn't be the first time I forgot to run "git push"
jgoguen is offline   Reply With Quote
Old 11-10-2016, 06:22 PM   #180
Occivink
Member
Occivink began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Oct 2016
Device: Kobo Aura One
Hi, the right side of my kepub books is slightly clipped, is that a known issue? I'm using an aura one, and it happens with all books that I've tried. The font settings also don't seem to have an influence on the issue.

Here is a sample of what it looks like: http://i.imgur.com/Dhavd3k.jpg
Occivink is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
catalogue builder output columns are not in the same order in the output KWhytte Library Management 5 12-04-2012 02:03 AM
Plugin not customizable: Plugin: HTML Output does not need customization flyingfoxlee Conversion 2 02-24-2012 02:24 AM
Plugin which uses net as input and output medve Development 0 12-04-2011 03:20 PM
Creat new Output plugin (LaTeX and/or txt2tags) Lebewesen Development 3 11-22-2011 11:10 AM
AZW Conversion Output Plugin tylau0 Plugins 59 08-14-2011 10:36 PM


All times are GMT -4. The time now is 03:48 AM.


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