Comments (3)
In order to split only on ".", "!" and "?", and to avoid adding a span around single puctuation marks, i.e.
<span class="koboSpan" id="kobo.x.y">.</span>
you could chage the regex in line 468 to look like this:
groups = re.split(ur'(.*?[\.!?][\'"\u201d\u2019]?)', node, flags = re.UNICODE | re.MULTILINE)
I've tested it and it works, but then the conversion eats a space before other tags like <em> or <b>, i.e.
<p>Some text. <em>Italic text.</em></p>
i.e.
Some text. Italic text.
is changed to
<p><span class="koboSpan" id="kobo.1.1"><span class="koboSpan" id="kobo.1.2">Some text.</span></span><em><span class="koboSpan" id="kobo.1.3"><span class="koboSpan" id="kobo.1.4">Italic text.</span></span></em></p>
i.e.
Some text.Italic text.
with the space removed...
from calibre-kobo-driver.
Awesome, thanks! I'll play with this when I get some time.
from calibre-kobo-driver.
I have some good news and some bad news: the good news is that the new regex works fine, the bad news is that the space before the italics is probably lost by fix #47 ...
I had the same results (i.e. missing spaces between plain and italic texts) also with the vanilla driver as downloaded from github (version 1.3.3) :-(
from calibre-kobo-driver.
Related Issues (20)
- Libra 2 HOT 3
- Missing cover after the conversion HOT 4
- 'Untitled Chapter' bug for all chapters after kepub conversion
- Obok DeDRM plugin not functioning in Calibre 6.0 HOT 1
- Kepub Output - QT errors in Calibre 6.x HOT 4
- UniCodeDecodeError HOT 1
- "Continue on error" for copy jobs with multiple books that fails because of content errors HOT 2
- List name of failing book in the job log error message. HOT 1
- name of file after converting EPUB to KEPUB HOT 1
- Add support for 4.34.20097 firmware HOT 1
- Send to device always results in epub, not kepub HOT 1
- Error Communicating with Device (TimeoutError on conversion)
- Updating an existing ebook on device does not take new pages into account HOT 8
- Process for importing (new?) Amazon Kindle Unlimited Voucher-associated file content HOT 2
- Conversion to kepub fails with "list index out of range" HOT 1
- Retrieving annotations not working (but 3rd party Annotations plugin works) HOT 1
- KoboTouchExtended: Error communicating with device HOT 5
- synopsis not loaded HOT 1
- SafeConfigParser has been removed in Python 3.12 HOT 1
- Option to not encoding non-English "Send-to" path into English one HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calibre-kobo-driver.