Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 12-09-2022, 02:09 PM   #1
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
epub to epub conversion using ebook-convert

I am trying to convert a .epub file to a .epub file using ebook-convert from terminal in macos Ventura.

I can do this in the Calibre GUI, and it renames the original epub to file.ORIGINAL_EPUB. However I can't do this with the command line ebook-convert. Trying this:

Code:
ebook-convert file1.epub file2.epub
Gives the following error:

Quote:
Traceback (most recent call last):
File "runpy.py", line 196, in _run_module_as_main
File "runpy.py", line 86, in _run_code
File "site.py", line 41, in <module>
File "site.py", line 37, in main
File "calibre/ebooks/conversion/cli.py", line 379, in main
File "calibre/ebooks/conversion/cli.py", line 330, in create_option_parser
ValueError: Input file is the same as the output file
I can do this by converting first to .mobi, for example, then converting back to .epub, but this messes up some of the formatting in the original epub.

Is there a way to do epub to epub conversion using ebook-convert from the command line?
Terry Brown is offline   Reply With Quote
Old 12-09-2022, 03:11 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,064
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Terry Brown View Post
I am trying to convert a .epub file to a .epub file using ebook-convert from terminal in macos Ventura.

I can do this in the Calibre GUI, and it renames the original epub to file.ORIGINAL_EPUB. However I can't do this with the command line ebook-convert. Trying this:

Code:
ebook-convert file1.epub file2.epub
Gives the following error:



I can do this by converting first to .mobi, for example, then converting back to .epub, but this messes up some of the formatting in the original epub.

Is there a way to do epub to epub conversion using ebook-convert from the command line?
Put it in a different folder? I guess the GUI allows a cleanup pass (EPUB>EPUB) that the cmdline does not. Does it even do anything (changes) if no profile called?
theducks is offline   Reply With Quote
Advert
Old 12-09-2022, 06:32 PM   #3
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 theducks View Post
Put it in a different folder? I guess the GUI allows a cleanup pass (EPUB>EPUB) that the cmdline does not. Does it even do anything (changes) if no profile called?
Ha! This actually worked. I guess you have to create it in a different directory rather than with just a different file name.

Thanks!
Terry Brown is offline   Reply With Quote
Old 12-09-2022, 07:59 PM   #4
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
ValueError: Input file is the same as the output file
Are you sure you are using
Code:
ebook-convert file1.epub file2.epub
instead of
Code:
ebook-convert file1.epub file1.epub (same filename, I mean)
In Windows, cmd line converting file1.epub to file2.epub works as expected...

edit: oops, just saw this had already been resolved, after posting.

Last edited by Comfy.n; 12-09-2022 at 08:02 PM.
Comfy.n is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ebook-convert - text to epub conversion failing flink Conversion 0 06-23-2017 06:03 AM
How to convert an ebook from .epub to .fb2? RbnJrg Workshop 26 03-30-2016 01:00 PM
Convert .XML to .ePub (Or: What am I doing wrong? A little boys primer on conversion) Ecaz Calibre 9 11-11-2014 03:54 PM
How to convert Rocket eBook (RB) to ePub? gfrobe Conversion 11 07-06-2011 09:10 PM
Can't convert MOBI to EPUB.. conversion FAILS wallace.webmail Calibre 5 07-16-2010 12:45 AM


All times are GMT -4. The time now is 04:57 PM.


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