Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 11-27-2018, 12:16 PM   #76
konstantinus
Connoisseur
konstantinus began at the beginning.
 
Posts: 54
Karma: 10
Join Date: May 2018
Device: Kobo Glo HD, Kobo Forma
Quote:
Originally Posted by Semwize View Post
Using the symbol «"» everything works, just checked

with «'» does not work
Strange, I was sure that I started with this option, but you are right - it works. Thank!
konstantinus is offline   Reply With Quote
Old 11-27-2018, 12:23 PM   #77
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,735
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by konstantinus View Post
Strange, I was sure that I started with this option, but you are right - it works. Thank!
Oh yes, you're using Windows ...
geek1011 is offline   Reply With Quote
Advert
Old 11-27-2018, 12:30 PM   #78
konstantinus
Connoisseur
konstantinus began at the beginning.
 
Posts: 54
Karma: 10
Join Date: May 2018
Device: Kobo Glo HD, Kobo Forma
Yes, the replacement is now happening, but in the output file is a regular space, although I copy the non-breaking space into the command.
konstantinus is offline   Reply With Quote
Old 11-27-2018, 12:37 PM   #79
Semwize
Guru
Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.
 
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
Quote:
Originally Posted by konstantinus View Post
Yes, the replacement is now happening, but in the output file is a regular space, although I copy the non-breaking space into the command.
I have replaced all the nbsps, checked

works fine
Semwize is offline   Reply With Quote
Old 11-27-2018, 12:47 PM   #80
konstantinus
Connoisseur
konstantinus began at the beginning.
 
Posts: 54
Karma: 10
Join Date: May 2018
Device: Kobo Glo HD, Kobo Forma
Quote:
Originally Posted by Semwize View Post
I have replaced all the nbsps, checked

works fine
Can you send a file after such a replacement?
konstantinus is offline   Reply With Quote
Advert
Old 11-27-2018, 01:06 PM   #81
Semwize
Guru
Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.
 
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
oops

geek1011, in places the replacement, it adds
</span><span class="koboSpan" id="kobo.9.3">
after the space


Last edited by Semwize; 11-27-2018 at 01:40 PM.
Semwize is offline   Reply With Quote
Old 12-01-2018, 01:24 AM   #82
konstantinus
Connoisseur
konstantinus began at the beginning.
 
Posts: 54
Karma: 10
Join Date: May 2018
Device: Kobo Glo HD, Kobo Forma
cmd when executing the command replaces the non-breaking space with the usual one. PowerShell works correctly, but when I make a .bat file with powershell launch, the launch is performed via cmd and the command is not sent correctly. In addition, kepubify with * .epub does not work in either cmd or powershell. A simple task, but now I don’t understand how to perfom it in windows.
Attached Thumbnails
Click image for larger version

Name:	2018-12-01_122335.jpg
Views:	240
Size:	59.7 KB
ID:	168078  
konstantinus is offline   Reply With Quote
Old 12-01-2018, 02:36 AM   #83
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,393
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by konstantinus View Post
cmd when executing the command replaces the non-breaking space with the usual one. PowerShell works correctly, but when I make a .bat file with powershell launch, the launch is performed via cmd and the command is not sent correctly. In addition, kepubify with * .epub does not work in either cmd or powershell. A simple task, but now I don’t understand how to perfom it in windows.
I suspect it would be easiest to use a for loop if you want to do it file by file. Otherwise, you can just pass the directory the files are in (kepubify e:\working\epubtemp as an example).

Code:
@echo off
for %%f in (*.epub) do kepubify.exe "%%f"
pause
The above is for a batch file (the one I used is named kepubcmd). To run from a command line, change the %% to a single % and leave off the @echo off and pause lines. The "'s around the second %%f are to handle a filename with embedded spaces.

Last edited by DNSB; 12-01-2018 at 02:40 AM. Reason: Typos: a never ending resource...
DNSB is offline   Reply With Quote
Old 12-01-2018, 05:53 AM   #84
konstantinus
Connoisseur
konstantinus began at the beginning.
 
Posts: 54
Karma: 10
Join Date: May 2018
Device: Kobo Glo HD, Kobo Forma
Quote:
Originally Posted by DNSB View Post
I suspect it would be easiest to use a for loop if you want to do it file by file.
I wrote about the problem with .epub for information, of course I can process the entire directory or use the method you suggest. The main problem is that all this is done through cmd.exe, as a result, the symbol of an unbreakable space changes to a simple space. Everything works fine in PowerShell, but I do not want to use the command line, I want to click / drag the file.
konstantinus is offline   Reply With Quote
Old 12-01-2018, 02:28 PM   #85
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,393
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by konstantinus View Post
I wrote about the problem with .epub for information, of course I can process the entire directory or use the method you suggest. The main problem is that all this is done through cmd.exe, as a result, the symbol of an unbreakable space changes to a simple space. Everything works fine in PowerShell, but I do not want to use the command line, I want to click / drag the file.
Interesting. I tried converting from a Powershell prompt and from a cmd prompt (using file by file and passing the directory so 4 output files from each input file)and the SHA-256 checksums for the kepub files generated from the same epub were identical. All three test input files had multiple & #160; or & nbsp; embedded. I also tried dropping a single file and a directory on kepubify and it converted the file/directory as expected with the identical SHA-256 checksums as any other method I tried.

BTW, IMNSHO, when you write about a problem, including an image of a method that will not work is not the best way to demonstrate the issue.

Code:
C:\Users\David\Desktop\oeb>kepubify Convtest
Kepubify v2.3.1: Converting 3 books
Output folder: C:\Users\David\Desktop\oeb
[1/3] Converting 'C:\Users\David\Desktop\oeb\Convtest\The Island Deception - Dan Koboldt.epub'
[2/3] Converting 'C:\Users\David\Desktop\oeb\Convtest\The Rogue Retrieval - Dan Koboldt.epub'
[3/3] Converting 'C:\Users\David\Desktop\oeb\Convtest\On Basilisk Station - David Weber.epub'

3 total, 3 converted, 0 skipped, 0 erroredkepubify convtest
Code:
PS C:\Users\David\desktop\oeb> .\kepubify Convtest
Kepubify v2.3.1: Converting 3 books
Output folder: C:\Users\David\desktop\oeb
[1/3] Converting 'C:\Users\David\desktop\oeb\Convtest\On Basilisk Station - David Weber.epub'
[2/3] Converting 'C:\Users\David\desktop\oeb\Convtest\The Island Deception - Dan Koboldt.epub'
[3/3] Converting 'C:\Users\David\desktop\oeb\Convtest\The Rogue Retrieval - Dan Koboldt.epub'

3 total, 3 converted, 0 skipped, 0 errored
Given that I do not see the problem of a non-breaking space being converted to a space, perhaps you might want to look at the locale settings on your computer.

Last edited by DNSB; 12-01-2018 at 02:31 PM.
DNSB is offline   Reply With Quote
Old 12-01-2018, 04:09 PM   #86
konstantinus
Connoisseur
konstantinus began at the beginning.
 
Posts: 54
Karma: 10
Join Date: May 2018
Device: Kobo Glo HD, Kobo Forma
Here is the book file.
Диккенс Чарльз - .epub
It contains non-breaking spaces:
Click image for larger version

Name:	2018-12-02_025911.jpg
Views:	308
Size:	308.0 KB
ID:	168091
After conversion, they are replaced by & # 160;
I managed to leave them in their original form only with the help of the command in powershell. Maybe there really is a problem in the system settings, I don’t know.
P.S. The presence of characters & # 160; in the text leads to the following result:
Click image for larger version

Name:	20181202_032353.jpg
Views:	279
Size:	491.1 KB
ID:	168092

Last edited by konstantinus; 12-01-2018 at 04:29 PM.
konstantinus is offline   Reply With Quote
Old 12-01-2018, 10:08 PM   #87
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,393
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by konstantinus View Post
Here is the book file.
Attachment 168090
It contains non-breaking spaces:
Attachment 168091
After conversion, they are replaced by & # 160;
I managed to leave them in their original form only with the help of the command in powershell. Maybe there really is a problem in the system settings, I don’t know.
P.S. The presence of characters & # 160; in the text leads to the following result:
Attachment 168092
Perhaps you might want to check the following post (or the entire thread it comes from). The renderer used by Kobo for kepubs has some issues with non-breaking spaces. See GeoffR's post ( GeoffR post 5 ) or the entire thread at KEPUB and non-breaking space for more information.

I did some testing with a file which has numerous non-breaking spaces and after conversion to kepub, it didn't matter if I had the character or numeric entity as far as how the display looked.

I'll double check this with the book you attached but suspect I will see the same behaviour.

Edit: I looked at the epub file you attached. The non-breaking space used was the numeric (#160) form despite no Kobo spans or other evidence that it had been converted to kepub. I did a quick bulk replace in Sigil and tried a kepub conversion. The & nbsp entities were all converted back to numeric entities so I edited them back to & nbsp. I've attached that file here though the kepub seems to have been shrunk to k.

One other item is that before and after conversion, the file made both Flightcrew and epubcheck very unhappy. You might to check and fix those errors—garbage in, garbage out comes to mind. fb2mobi.py does not seem to do a very good job of generating epub code.
Attached Files
File Type: epub Диккенс Чарльз-.k.epub (1.19 MB, 190 views)

Last edited by DNSB; 12-01-2018 at 10:38 PM.
DNSB is offline   Reply With Quote
Old 12-02-2018, 01:57 AM   #88
konstantinus
Connoisseur
konstantinus began at the beginning.
 
Posts: 54
Karma: 10
Join Date: May 2018
Device: Kobo Glo HD, Kobo Forma
Quote:
Originally Posted by DNSB View Post
Edit: I looked at the epub file you attached. The non-breaking space used was the numeric (#160) form despite no Kobo spans or other evidence that it had been converted to kepub. I did a quick bulk replace in Sigil and tried a kepub conversion. The & nbsp entities were all converted back to numeric entities so I edited them back to & nbsp. I've attached that file here though the kepub seems to have been shrunk to k.
I stopped understanding the conversation, I'm sorry.
The file I attached contains non-breaking spaces.
Click image for larger version

Name:	1.jpg
Views:	206
Size:	182.8 KB
ID:	168121
After kepubify, it looks like this:
Click image for larger version

Name:	2.jpg
Views:	212
Size:	303.0 KB
ID:	168122
I do not need it, I need it to remain as in the first screenshot. With the help of changes respected geek1011 I do this, in powershell.
In cmd.exe after executing the command (no space after &):
Code:
kepubify-windows-64bit_2_3_1_2.exe --replace "& #160;|*"
Replacement occurs, but the space is normal, not a non-breaking space. In Windows, batch files are processed via cmd.exe, so I cannot automate the replacement process.
Quote:
Originally Posted by DNSB View Post
One other item is that before and after conversion, the file made both Flightcrew and epubcheck very unhappy. You might to check and fix those errors—garbage in, garbage out comes to mind. fb2mobi.py does not seem to do a very good job of generating epub code.
Thanks for the info, this is not a problem for me now.
konstantinus is offline   Reply With Quote
Old 12-02-2018, 04:10 PM   #89
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,393
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by konstantinus View Post
I stopped understanding the conversation, I'm sorry.
The epub you attached is filled with non-breaking spaces. Sadly, they are the numeric entity form (#160) and not the character entity form (nbsp form. Depending on the editor you are using, these may get converted to nbsp form when saving. In Sigil, this is the preserve entities preferences area.

Have you checked on the issues with non-breaking spaces in Kobo epub files as described in the thread I linked to?

Quote:
Originally Posted by konstantinus View Post
Thanks for the info, this is not a problem for me now.
Not worrying about errors in your epub? If you have errors, it is hard to say if one of those errors is the not cause of your issues.
DNSB is offline   Reply With Quote
Old 12-02-2018, 05:00 PM   #90
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,393
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
When I was playing with Konstantius's ebook, I noticed one oddity in the converted kepubs when the end of lines were disappearing. The original code from my test file read:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Non-breaking space</title>
</head>
<body>
<h3>This is a test file laden with non-breaking spaces</h3>
<p> </p>
<p>The first line was created with the character entities.</p>
<p>—&nbsp;—&nbsp;—&nbsp;—&nbsp;—&nbsp;—&nbsp;—&nbsp;—&nbsp;—&nbsp;—&nbsp;—&nbsp;—&nbsp;—&nbsp;—&nbsp;—&nbsp;</p>
<p>&nbsp;</p><p> </p>
<p> </p>
<p> </p>
<p>The second line was created with numeric entities.</p>
<p>— — — — — — — — — — — — — — — </p>
<p> </p>
</body>
</html>
While after conversion to kepub:
Code:
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>Non-breaking space</title>
<style type="text/css">div#book-inner{margin-top: 0;margin-bottom: 0;}</style></head>
<body><div class="book-columns"><div class="book-inner"><h3><span class="koboSpan" id="kobo.0.2">This is a test file laden with non-breaking spaces</span></h3><p><span class="koboSpan" id="kobo.1.1">*</span></p><p><span class="koboSpan" id="kobo.2.1">The first line was created with the character entities.</span></p><p><span class="koboSpan" id="kobo.3.1">—*—*—*—*—*—*—*—*—*—*—*—*—*—*—*</span></p><p><span class="koboSpan" id="kobo.4.1">*</span></p><p><span class="koboSpan" id="kobo.5.1">*</span></p><p><span class="koboSpan" id="kobo.6.1">*</span></p><p><span class="koboSpan" id="kobo.7.1">*</span></p><p><span class="koboSpan" id="kobo.8.1">The second line was created with numeric entities.</span></p><p><span class="koboSpan" id="kobo.9.1">𔍼*𔍼*𔍼*𔍼*𔍼*𔍼*𔍼*𔍼*𔍼*𔍼*𔍼*𔍼*𔍼*𔍼*𔍼*</span></p><p><span class="koboSpan" id="kobo.10.1">*</span></p></div></div></body></html>
DNSB is offline   Reply With Quote
Reply

Tags
conversion, epub, kepub, kepubify, kobo


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
kepubify - A standalone tool to convert ePubs into Kobo ePubs geek1011 Kobo Reader 114 03-04-2018 10:30 AM
Standalone ebook-convert kido.resuri Conversion 3 01-28-2017 06:55 PM
Kepubs vers Epubs lohtse Kobo Reader 28 11-13-2013 06:58 PM
Pros and Cons of using Kepubs vs ePubs kaufman Kobo Reader 8 04-30-2013 04:41 PM
[Kobo Glo] kepubs and series (or: some kepubs invisible for Calibre) beedaddy Devices 3 01-14-2013 02:05 AM


All times are GMT -4. The time now is 06:09 PM.


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