Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-08-2020, 08:35 AM   #1831
compurandom
Evangelist
compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.
 
Posts: 410
Karma: 182198
Join Date: Jun 2015
Device: kobo aura h2o
Quote:
Originally Posted by JSWolf View Post
Install the epubcheck plugin. Load the ePub in the Calibre editor. Use the editor's checker and epubcheck to check all the ePub. Then you can use the editor to fix the errors.

As for removing javascript, install the Modify ePub plugin to dump all javascript.
Most epubs don't need any changes to work well except maybe metadata tweaks and a cover update.

A small handful of epubs have issues and I typically use modify epub to remove javascript as suggested above, or have to go into the editor and remove web browser or printer specific style sheets that work poorly on ereaders, and sometimes remove more javascript that modify epub somehow missed.

And very very rarely, I have an epub that's just so bloated and messed up that epub->epub conversion fixes. These are usually ones with exceptionally long chapters that need splitting or some kind of wierdness in the TOC or a TOC that is too deeply nested and I just want to reduce the levels or something.

And occasionally I use the TOC editor in calibre for a quick fix rather than the epub converter or the toc editor in the epub editor.

As to doing it on all the epubs in a library -- it's usually only a small handful that need anything but basic tweaks anyway. If you've got a huge number of epubs that are malformed, I be they're all from the same source with the same issues and it might be worth writing a source specific tool or workflow to fix them.
compurandom is offline   Reply With Quote
Old 06-08-2020, 10:22 AM   #1832
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 57,851
Karma: 52821107
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
Quote:
Originally Posted by compurandom View Post
Most epubs don't need any changes to work well except maybe metadata tweaks and a cover update.
But all it takes is one that does need fixing to cause problems. AndI have seen some retail ePub that fails epubcheck.
JSWolf is offline   Reply With Quote
Old 06-08-2020, 03:48 PM   #1833
droopy
Fanatic
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 548
Karma: 800008
Join Date: Apr 2009
Device: Kobo Forma
Quote:
Originally Posted by DNSB View Post
You can run epubcheck from the command prompt and with a little batch file work, you can check all those books in one go. One rather long go⁠—epubcheck is not a speedy program.

I have a directory called epubcheck on my desktop with the batch file and epubcheck.jar plus epubcheck's lib directory The for loop scans through the directory (in this case %USERPROFILE\calibre\Intake points to my calibre intake library) returning any .epub files. The batch file echos the path/filename for the epub and any messages from epubcheck to a file called epubcheck.txt. The echo is needed since otherwise all I would see for an error-free file would the 3 lines telling me no errors were found. The "s around the %%f keeps me from having issues with spaces in the filepath/name string.

I saved the below to a file called checkepub.cmd

Code:
for /R %USERPROFILE%\calibre\Intake %%f in (*.epub) do (
echo "%%f" 1>>%USERPROFILE%\Desktop\epubcheck\epubcheck.txt 2>&1
java -jar epubcheck.jar "%%f" 1>>%USERPROFILE%\Desktop\epubcheck\epubcheck.txt 2>&1
)
pause
A quick scan through epubcheck.txt looking for "Check finished with errors" locates the error files.
Spoiler:

Code:
"C:\Users\David\calibre\Intake\Dave Heiland\Sigil User Guide (6734)\Sigil User Guide - Dave Heiland.epub" 
Validating using EPUB version 2.0.1 rules.
ERROR(RSC-005): C:/Users/David/calibre/Intake/Dave Heiland/Sigil User Guide (6734)/Sigil User Guide - Dave Heiland.epub/OEBPS/Text/validation.html(47,9): Error while parsing file: element "ul" not allowed here; expected the element end-tag or element "li"
ERROR(RSC-005): C:/Users/David/calibre/Intake/Dave Heiland/Sigil User Guide (6734)/Sigil User Guide - Dave Heiland.epub/OEBPS/Text/validation.html(53,9): Error while parsing file: element "ul" not allowed here; expected the element end-tag or element "li"
ERROR(RSC-005): C:/Users/David/calibre/Intake/Dave Heiland/Sigil User Guide (6734)/Sigil User Guide - Dave Heiland.epub/OEBPS/Text/validation.html(59,9): Error while parsing file: element "ul" not allowed here; expected the element end-tag or element "li"
ERROR(RSC-005): C:/Users/David/calibre/Intake/Dave Heiland/Sigil User Guide (6734)/Sigil User Guide - Dave Heiland.epub/OEBPS/Text/validation.html(65,9): Error while parsing file: element "ul" not allowed here; expected the element end-tag or element "li"
ERROR(RSC-005): C:/Users/David/calibre/Intake/Dave Heiland/Sigil User Guide (6734)/Sigil User Guide - Dave Heiland.epub/OEBPS/Text/validation.html(71,9): Error while parsing file: element "ul" not allowed here; expected the element end-tag or element "li"
ERROR(RSC-005): C:/Users/David/calibre/Intake/Dave Heiland/Sigil User Guide (6734)/Sigil User Guide - Dave Heiland.epub/OEBPS/Text/validation.html(77,9): Error while parsing file: element "ul" not allowed here; expected the element end-tag or element "li"
ERROR(RSC-005): C:/Users/David/calibre/Intake/Dave Heiland/Sigil User Guide (6734)/Sigil User Guide - Dave Heiland.epub/OEBPS/Text/validation.html(83,9): Error while parsing file: element "ul" not allowed here; expected the element end-tag or element "li"

Check finished with errors
Messages: 0 fatals / 7 errors / 0 warnings / 0 infos

EPUBCheck completed
"C:\Users\David\calibre\Intake\J. K. Rowling\The Ickabog (9199)\The Ickabog - J. K. Rowling.epub" 
Validating using EPUB version 2.0.1 rules.
No errors or warnings detected.
Messages: 0 fatals / 0 errors / 0 warnings / 0 infos
Thanks, David/DNSB.
Does anybody know how to run that in Linux?
droopy is offline   Reply With Quote
Old 06-08-2020, 04:21 PM   #1834
j.p.s
Wizard
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 3,000
Karma: 48837165
Join Date: Apr 2011
Device: pb360
Code:
#!/bin/bash
for f in *.epub do
  echo "$f"  >> epubcheck.txt
  echo "$f"  >> epubcheck.err
  java -jar epubcheck.jar "$f" >> epubcheck.txt 2>> epubcheck.err
done

Last edited by j.p.s; 06-08-2020 at 04:33 PM.
j.p.s is offline   Reply With Quote
Old 06-08-2020, 05:54 PM   #1835
droopy
Fanatic
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 548
Karma: 800008
Join Date: Apr 2009
Device: Kobo Forma
Quote:
Originally Posted by j.p.s View Post
Code:
#!/bin/bash
for f in *.epub do
  echo "$f"  >> epubcheck.txt
  echo "$f"  >> epubcheck.err
  java -jar epubcheck.jar "$f" >> epubcheck.txt 2>> epubcheck.err
done
should I first go to folder containing the the calibre database/library?
droopy is offline   Reply With Quote
Old 06-08-2020, 07:44 PM   #1836
j.p.s
Wizard
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 3,000
Karma: 48837165
Join Date: Apr 2011
Device: pb360
The script assumes that all the epub files are in the same directory and that you are in it.

To check all the epubs in your Calibre Library, you need to cd there, and also change
for f in *.epub do
to
for f in */*/*.epub do
because each book has its own directory in each author's own directory.

If you want to runn from any directory, you need to prepend the full path to your Claibre library to */*/*.epub

Be sure to escape or quote any evil embedded spaces in that path.

(All spaces embedded in file names are evil.)

Last edited by j.p.s; 06-08-2020 at 07:47 PM.
j.p.s is offline   Reply With Quote
Old 06-29-2020, 07:27 AM   #1837
Fpaiy
Junior Member
Fpaiy began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2017
Device: kobo aura one and kindle voyage
Set position and zoom percentage for the whole PDF

Currently, by default for PDF the zoom percentage is 100 percent and position at the centre every time we turn to next page.

We have to zoom and adjust position every time we turn to the next page. Since most book have standard white margin and page number throughout the whole book. We can adjust once at the start to our preference and apply all pages instead of adjusting on every page.

It would be great to set the position and zoom percentage for the whole book at the start to apply to the whole PDF book. So every page turn will have the zoom percentage and position in place.
Fpaiy is offline   Reply With Quote
Reply

Tags
feature requests, firmware, kobo

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature Request Partzz Calibre 6 09-09-2010 01:11 PM
Feature request / Good idea for future versions of Calibre rahulm Calibre 9 07-18-2010 06:35 PM
[Old Thread] Calibre 'feature request' thread Waba Calibre 2 02-10-2010 07:52 PM
Feature request thread? Dahak Calibre 1 08-02-2009 12:51 AM
Feature request AprilHare Calibre 4 04-22-2009 04:23 AM


All times are GMT -4. The time now is 02:59 AM.


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