01-19-2020, 10:31 PM | #31 |
Wizard
Posts: 1,142
Karma: 5061953
Join Date: Jun 2011
Location: Ontario, Canada
Device: Kobo Aura HD
|
I would prefer an AV with more false positives than the other around... but at the end of the day, you have to make a judgement, (whether your AV warns you or not,), and telling the AV to STFU is something that has to be one on your end, not by Kepubify, Calibre, or whatever software.
|
01-19-2020, 10:45 PM | #32 |
Wizard
Posts: 2,735
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Yes. Just add the --inplace option. Make a batch file with the following text: @kepubify-windows-64bit.exe --inplace %*
|
Advert | |
|
01-19-2020, 11:34 PM | #33 |
Connoisseur
Posts: 69
Karma: 10
Join Date: Nov 2018
Device: Kindle paperwhite, Likebook Mars, Kobo Aura Ed. 2, Kobo Touch
|
|
01-20-2020, 12:20 AM | #34 | |
hopeless n00b
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Quote:
The option goes away after unblocking. Sometimes, the flag is never set depending on how the file was downloaded and zone/security settings. Iirc, Firefox downloads don't get flagged. |
|
01-20-2020, 04:13 AM | #35 | |
Evangelist
Posts: 496
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
|
OK, I've got a question about this change:
Quote:
If kepubify 3.0 better mimics Kobo's way of doing things, will that make the span fragmentation problem better or worse (I don't know how kepubify 2.0 did it instead)? Is there a way for a future version of kepubify to do a better job in reducing span fragmentation even if it means not following Kobo's conventions in applying spans during conversion (maybe by following jackie_w's hacked KTE algorithm)? Last edited by rtiangha; 01-20-2020 at 05:26 AM. |
|
Advert | |
|
01-20-2020, 04:52 AM | #36 |
Evangelist
Posts: 496
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
|
And one more question: I basically want to enable the "Improve legibility" and "Use real small capitals" tips from this page.
If the css argument can only be a single string, then did I do this right in my .bat file (I basically just removed all newlines)? Code:
@kepubify-windows-32bit.exe --verbose --smarten-punctuation --fullscreen-reading-fixes --inplace --css "body {font-kerning: normal; font-variant: common-ligatures oldstyle-nums proportional-nums; font-feature-settings: "kern", "liga", "clig", "onum", "pnum";} h1, h2, h3 {font-variant: common-ligatures lining-nums proportional-nums; font-feature-settings: "kern", "liga", "clig", "lnum", "pnum";} table {font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "kern", "lnum", "tnum";} code {font-variant: no-common-ligatures lining-nums; font-feature-settings: "kern" 0, "liga" 0, "clig" 0, "lnum";} .fraction {font-variant-numeric: diagonal-fractions; font-feature-settings: "frac";} element {font-variant: small-caps;} @supports not (font-variant-caps: small-caps) {element {font-variant: normal; font-feature-settings: "smcp", "onum", "pnum";}} @supports (font-variant-caps: small-caps) {element {font-variant: normal; font-variant-caps: small-caps;}}" %* Edit: Ah, it's embedded in the html instead. But I still don't know if I did it right. This is what it makes inside the head tags using all of my options: Code:
<style type="text/css" class="kobostylehacks">div#book-inner { margin-top: 0; margin-bottom: 0;}</style><style type="text/css" class="kepubify-extracss">body {font-kerning: normal; font-variant: common-ligatures oldstyle-nums proportional-nums; font-feature-settings: kern, liga, clig, onum, pnum;} h1, h2, h3 {font-variant: common-ligatures lining-nums proportional-nums; font-feature-settings: kern, liga, clig, lnum, pnum;} table {font-variant-numeric: lining-nums tabular-nums; font-feature-settings: kern, lnum, tnum;} code {font-variant: no-common-ligatures lining-nums; font-feature-settings: kern 0, liga 0, clig 0, lnum;} .fraction {font-variant-numeric: diagonal-fractions; font-feature-settings: frac;} element {font-variant: small-caps;} @supports not (font-variant-caps: small-caps) {element {font-variant: normal; font-feature-settings: smcp, onum, pnum;}} @supports (font-variant-caps: small-caps) {element {font-variant: normal; font-variant-caps: small-caps;}}</style><style type="text/css" class="kepubify-fullscreenfixes">body { margin: 0 !important; padding: 0 !important; } body>div { padding-left: 0.2em !important; padding-right: 0.2em !important; }</style> Last edited by rtiangha; 01-20-2020 at 06:07 AM. |
01-20-2020, 05:06 AM | #37 |
Resident Curmudgeon
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
@geek1011 Is there an option for kepubify to turn on kerning? If not, can such be added?
|
01-20-2020, 05:53 AM | #38 |
Evangelist
Posts: 496
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
|
Why not just have kepubify modify the css? Either by enabling the optimizeLegibility property of text-settings (via css or patch; apparently, that setting reads kern data even if the font doesn't have an old school kern table) or by enabling the "kern" property of font-feature-settings (or is it -webkit-font-feature-settings; I'm not sure)?
Last edited by rtiangha; 01-20-2020 at 05:58 AM. |
01-20-2020, 07:51 AM | #39 | |
Wizard
Posts: 2,735
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Quote:
Quite a few of these improvements aren't in the Calibre extension, and I think they should be implemented (e.g. whitespace behavior, not splitting on colons). Although, one behavior I haven't managed to replicate is how Kobo sometimes also increments the paragraph counter on span and a tags. This only causes an offset of one or two under a few books, so I don't consider it a big issue. You can test how kepubify differs from an official book (or even from a calibre-converted book) by running kobotest (it's in the repo) with an xhtml file with spans as stdin. P.S. Read the test suite in the kepubify code, it will explain a bunch of this with examples. |
|
01-20-2020, 07:52 AM | #40 | |
Wizard
Posts: 2,735
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Quote:
|
|
01-20-2020, 08:53 AM | #41 |
Resident Curmudgeon
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
01-20-2020, 09:27 AM | #42 |
Wizard
Posts: 2,735
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
|
01-20-2020, 09:37 AM | #43 |
Resident Curmudgeon
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
One thing I do think needs fixing is to have the extra CSS added to the CSS and not to the HTML. I do not like messy code and having the extra CSS added to every HTML is messy code.
|
01-20-2020, 10:41 AM | #44 | |
Wizard
Posts: 2,735
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Quote:
Pros: - Inline CSS is pretty much guaranteed to work. - Can be done while transforming HTML. - Doesn't need to modify the package document. - No path resolving complexities. - Won't further break broken books as much (kepubify aims to process broken books as best as possible and not make them worse). - Not as bad as directly adding styles to elements. Cons: - Possibly ambiguous escaping of angle brackets. - Duplicate CSS in each file. - Not clean and harder to edit, but this doesn't matter too much (the book is generated and not really going to be edited directly after conversion). If you have any additional disadvantages for embedded CSS, I'd be happy to consider them. |
|
01-20-2020, 02:12 PM | #45 | |
Resident Curmudgeon
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
Tags |
conversion, epub, kepub, kepubify |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
kepubify 2.0 - A standalone tool to convert ePubs to Kepubs | geek1011 | Kobo Reader | 149 | 10-03-2020 04:12 PM |
kepubify - A standalone tool to convert ePubs into Kobo ePubs | geek1011 | Kobo Reader | 114 | 03-04-2018 10:30 AM |
Creating epub/kepub books (docx→epub/kepub via MS Word→Calibre) | SJC-Caron | ePub | 18 | 04-21-2016 11:10 AM |
Kindle Comic Converter can now create KEPUB files | AcidWeb | Kobo Reader | 16 | 06-28-2015 01:14 PM |
Aspose standalone converter Word to Epub | ErikG | ePub | 1 | 05-25-2011 02:13 AM |