Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 12-05-2021, 10:58 AM   #46
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by oldboys View Post
Epub preview handler

windows only

Installation:
unzip to any folder
Start a command prompt with administrator privileges
(Search cmd, up command line desktop application, right click run as administrator)
navigate the command line to the dll directory
at the command prompt:
regsvr32.exe epub_handler.dll
to break down a small window
Its distance is the same, with the / u switch

regsvr32.exe / u epub_handler.dll

System requirement Vista / Win7 or Win10
Download
https://app.box.com/s/sqazp5b07mt6cdyaz3qmdyg3caaul56k


How to use: windows explorer / view / preview panel on

language hungary (oppsz sorry)
writing for my own use 2018
On Windows7 64bits it can't be installed, it gives an error message:

Click image for larger version

Name:	Image1.png
Views:	712
Size:	25.4 KB
ID:	190658
RbnJrg is offline   Reply With Quote
Old 12-05-2021, 11:06 AM   #47
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Nicolay77 View Post
Hello, I made a quick ePub translator script in Python.

It uses Google Translate API (requires credentials in PATH).

Link is here: https://github.com/Poyeyo/epub-translate

It can translate all text, or it can output both original and translation as parallel texts.

As described in the readme, the resulting file needs to be fixed in Calibre e-book editor or other tool. But the fixes are quick and take almost no time.

Attached is one resulting file with parallel texts.
Would it possible for you to build a Sigil plugin with this utility?
RbnJrg is offline   Reply With Quote
Old 12-05-2021, 11:36 AM   #48
oldboys
Junior Member
oldboys has a complete set of Star Wars action figures.oldboys has a complete set of Star Wars action figures.oldboys has a complete set of Star Wars action figures.oldboys has a complete set of Star Wars action figures.
 
Posts: 9
Karma: 326
Join Date: Nov 2021
Device: kobo
Quote:
Originally Posted by RbnJrg View Post
On Windows7 64bits it can't be installed, it gives an error message:

Attachment 190658
https://stackoverflow.com/questions/...ndows-7-64-bit
oldboys is offline   Reply With Quote
Old 12-05-2021, 05:20 PM   #49
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by oldboys View Post
The issue was originated because you uploaded a 32bit .dll and it must be installed in C:\Windows\syswow64\ and not in C:\Windows\system32\ as I had done.
RbnJrg is offline   Reply With Quote
Old 03-26-2022, 07:16 PM   #50
Terry Brown
Enthusiast
Terry Brown began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Jun 2010
Location: Portland, OR
Device: M1 Max Mac Studio, iPad Pro 2018 12.9, iPhone 7
epubpaginator--Add page number to epub books

epubpaginator

epubpaginator is a Python script that generates pagination for ePub books. epubpaginator makes a copy of the input epub file and modifies that copy to contain pagination information.

Features
  • For ePub3 files, epubpaginator can generate a page-list table in the navigation document, and corresponding page links in the epub text.
  • epubpaginator can generate "pagelines"--information lines in the text of an ePub2 or ePub3 document. These are placed after the paragraph where the page break occurs and are formatted as separate paragraphs in the book.
  • epubpaginator can generate page information notes formatted as superscripts in the text of an ePub2 or ePub3 document. These superscripts are placed after the word where the page break occurs.
  • If an ePub3 document has existing pagination, epubpaginator can match the pagelines or superscripts to the existing pagination. This allows you to see the publisher's page numbering in epub readers that do not support epub3 page-list.
  • Font size, color and alignment (right, left, or center) are selectable for pagelines.
  • Font size and color are selectable for superscripts.
  • Pagelines and superscripts may optionally show total page counts for the book and the current chapter.
  • For ebooks without existing pagination, the page size may be defined by specifying words per page, or by specifying total pages for the book in which case words per page is calculated by dividing the book word count by the total pages specified.

Requirements
  1. Python 3.7 or greater.
  2. Optional [epubcheck module](https://pypi.org/project/epubcheck/)--see below.
  3. Optional Calibre ebook-convert--see below.

Take a look at the details on Github:

epubpaginator
Terry Brown is offline   Reply With Quote
Old 03-30-2022, 08:16 AM   #51
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Terry Brown View Post
epubpaginator

epubpaginator is a Python script that generates pagination for ePub books. epubpaginator makes a copy of the input epub file and modifies that copy to contain pagination information.
...
Very nice! Could you adapt your python script as Sigil (or Calibre) plugin?
RbnJrg is offline   Reply With Quote
Old 04-01-2022, 06:26 PM   #52
Terry Brown
Enthusiast
Terry Brown began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Jun 2010
Location: Portland, OR
Device: M1 Max Mac Studio, iPad Pro 2018 12.9, iPhone 7
epubpaginator as a calibre plugin

Quote:
Originally Posted by RbnJrg View Post
Very nice! Could you adapt your python script as Sigil (or Calibre) plugin?
Calibre doesn't allow multiple copies of a single format, like epub, within a single calibre record. That means that doing this is like building a conversion tool where the source is epub and the destination is a replacement epub that is the output of epubpaginator. That is fraught with all sorts of bad possibilities should epubpaginator destroy the functionality of the epub yet merrily go ahead and replace the existing, good one. I could back up the existing file somewhere before doing this, then at least the user can recover. I could even provide a "recovery" tool that would restore the original epubs to Calibre.

I could also convert the file, present it to the user to peruse using ebook-viewer (a calibre ebook reader). If the user approved, she could then choose to overwrite the existing file as well as having a copy.

You can see why I am reluctant to create such a beast.

It is quite simple for me to add functionality to epubpaginator that creates a new book record (with a new id) in your calibre database. This new record would hold the paged epub file as a format. I can also easily add a tag "paged" to this book to allow easy selection of books that have paged epubs. I can also add "Paged" to the title of the new book.

However, when I do this, the duplicate records complicate looking at your database in calibre. Who wants two copies of every book? And, if you track reading books with tags or whatever, then you probably need to track in two places.

It is also easy to add the paged epub to Calibre without generating a duplicate record by modifying the extension name of the paged epub, calling it, for example Mybook.epub_paged. This works for storing the new format, but now applications don't know what to do with the format, so that is also a mess.

It's also easy to create a new calibre library, called, for example Paged_Epubs and put the paginated epubs there. But again, the duplication complicates tracking reading status, etc.

Another idea would be to separate the functionality of verifying the paginated books from the pagination itself. Then, you paginate a bunch of books and store them in a directory. After you convince yourself that they are all properly formatted, the new tool would insert them into the calibre database, replacing the originals.

Comments? Suggestions?
Terry Brown is offline   Reply With Quote
Old 04-01-2022, 06:51 PM   #53
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: 76,402
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Terry Brown View Post
Comments? Suggestions?
There is a simple solution. You can do it the way the ModifyePub plugin does it. You can create an ORIGINAL_EPUB file for the original ePub is such a file does not exists. That way it's very easy to restore the original ePub if need be.
JSWolf is offline   Reply With Quote
Old 04-01-2022, 09:10 PM   #54
Terry Brown
Enthusiast
Terry Brown began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Jun 2010
Location: Portland, OR
Device: M1 Max Mac Studio, iPad Pro 2018 12.9, iPhone 7
Quote:
Originally Posted by JSWolf View Post
There is a simple solution. You can do it the way the ModifyePub plugin does it. You can create an ORIGINAL_EPUB file for the original ePub is such a file does not exists. That way it's very easy to restore the original ePub if need be.
Is this what you are suggesting? Assume the epub file for a book is "book.epub" and I do the following with an external program:
  1. Copy book.epub
  2. Copy book.epub to book.ORIGINAL_EPUB
  3. Use
    Code:
    calibredb add_format
    to add book.ORIGINAL_EPUB to formats.
  4. Use
    Code:
    calibredb remove_format
    to remove book.ebub from the format list.
  5. Use my stuff to paginate my copy of book.epub and name it book.epub.
  6. Use
    Code:
    calibredb add_format
    to add the paginated book.epub to the format list.
  7. Done.

This gets the job done using all external tools. I could do this quickly (a day or two) and sort of integrate epubpaginator with Calibre.

But what I think is that you are suggesting I use ModifyePub as a template and create a Calibre Plugin.

Well.

I have looked at creating a Calibre plugin and I think it would take me weeks to figure out. I do pretty well with python and python libraries and I have figured out enough about epub to be pretty dangerous, but when I look at the Calibre plugin examples, my eyes glaze over. I spent my career writing verilog code and down to the metal diagnostic software to verify my hardware designs, not complex object-oriented code.

Classes and the complex structure of Calibre (to say nothing of QT) seem pretty overwhelming to me.

Would you recommend me not creating such a hack? Do you think maybe I am smarter that I think and can really make a Calibre plugin??

And, by the way, if I do generate ebook.ORIGINAL_EPUB, you imply it is easy to restore. Is that done by some magic in the calibre interface? or? The only way I can see to do this is to export ebook.ORIGINAL_EPUB to disk, rename it, and add it back.
Terry Brown is offline   Reply With Quote
Old 04-01-2022, 09:32 PM   #55
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Terry Brown View Post
...
I have looked at creating a Calibre plugin and I think it would take me weeks to figure out. I do pretty well with python and python libraries and I have figured out enough about epub to be pretty dangerous, but when I look at the Calibre plugin examples, my eyes glaze over. I spent my career writing verilog code and down to the metal diagnostic software to verify my hardware designs, not complex object-oriented code.
...
What about writting a plugin for Sigil? I think is less complex than writting a plugin for Calibre.
RbnJrg is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple ePub Reading Software Jaime_Astorga Reading and Management 6 09-12-2014 07:21 AM
Announcing: epub-tools software dino8352 General Discussions 0 04-23-2011 02:06 PM
Looking for reading software on Android that will read Epub format CJBarrow Reading and Management 1 04-14-2010 04:28 PM
Epub Reading Software Differences brewt ePub 1 12-29-2008 11:02 AM


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


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