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 09-07-2014, 07:31 AM   #1
Shady3
Junior Member
Shady3 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2014
Device: Personal Computer
Keeping file name when converting

Hi all!

I have 300 epubs. I want to convert them to PDF and save them. When I save them, they have changed the file name, for example:

Original Epub Name: Absolución de Luis Landero r1.0.epub
PDF saved file name: Absolución - Luis Leandro.pdf

How can I have my PDF saved file with the same file name as original epub file?
Like that:
Original Epub Name: Absolución de Luis Landero r1.0.epub
PDF saved file name: Absolución de Luis Landero r1.0.pdf

Thank you guys!
Shady3 is offline   Reply With Quote
Old 09-07-2014, 10:10 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
The name change happened when you imported the EPUB to calibre. You will need to add the appropriate metadata to calibre, probably in a custom column. (I have a custom column "Original Filename".) Then configure the appropriate save template in Preferences ==> Saving to disk.

You can also convert via the command-line interface to avoid calibre's library naming schemes.
eschwartz is offline   Reply With Quote
Old 09-08-2014, 09:30 AM   #3
Shady3
Junior Member
Shady3 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2014
Device: Personal Computer
Quote:
Originally Posted by eschwartz View Post
The name change happened when you imported the EPUB to calibre. You will need to add the appropriate metadata to calibre, probably in a custom column. (I have a custom column "Original Filename".) Then configure the appropriate save template in Preferences ==> Saving to disk.

You can also convert via the command-line interface to avoid calibre's library naming schemes.
Hi eschwartz.

First of all thank you a lot for your answer.

I am very interesting in that "Original Filename" custom column u said. How can I make it?

Thank you. Greets.
Shady3 is offline   Reply With Quote
Old 09-08-2014, 10:55 AM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Under Preferences, you can Add Your Own Columns.

Give it a column heading, say "Original Filename", a lookup name like "#origfile", and choose text as the type. After creating it you will need to restart calibre, and then you will have a new column for storing this info in.
eschwartz is offline   Reply With Quote
Old 09-08-2014, 11:06 AM   #5
Shady3
Junior Member
Shady3 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2014
Device: Personal Computer
Quote:
Originally Posted by eschwartz View Post
Under Preferences, you can Add Your Own Columns.

Give it a column heading, say "Original Filename", a lookup name like "#origfile", and choose text as the type. After creating it you will need to restart calibre, and then you will have a new column for storing this info in.
Hi!

If I understood u, I have to put the original filename of every ebook the custom column in Calibre before save it, is it?
Shady3 is offline   Reply With Quote
Old 09-08-2014, 12:51 PM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by Shady3 View Post
Hi!

If I understood u, I have to put the original filename of every ebook the custom column in Calibre before save it, is it?
Yes. I do it while I am already cleaning up the metadata to fix weird titles and add series and missing anthology authors and stuff.
eschwartz is offline   Reply With Quote
Old 09-08-2014, 04:15 PM   #7
Shady3
Junior Member
Shady3 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2014
Device: Personal Computer
Quote:
Originally Posted by eschwartz View Post
Yes. I do it while I am already cleaning up the metadata to fix weird titles and add series and missing anthology authors and stuff.
That's it!
But I wonder if there's any way to do it with a bunch of ebooks at the same time, I mean not editting every epub file one by one.

Is it possible?
Shady3 is offline   Reply With Quote
Old 09-08-2014, 04:59 PM   #8
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
It could probably be scripted via the command-line but I've never really put thought into it.

You can set the Preferences for Adding Books to read metadata from the filename via a custom regex, but then metadata will not be addded from the file contents.
eschwartz is offline   Reply With Quote
Old 09-11-2014, 02:12 AM   #9
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Regarding your PM...

Assuming you do not need the books in the library GUI, you can use the following batch file to search the current folder (the folder you stick the batch file in) and convert all EPUBs to PDF:

Code:
del conversion.log
for /r %%I in ("*.epub) do (
    echo ******************************* >> conversion.log
    echo Converting "%~dpnI.epub" to PDF >> conversion.log
    ebook-convert "%~dpnI.epub" "%~dpnI.pdf" >> conversion.log
)
It will use the default conversion settings, exactly as though you used the "traditional" way in the library, but without any of the customizations the conversion dialog offers.

You can duplicate the effects of anything in the calibre conversion dialog using the command-line options detailed here: http://manual.calibre-ebook.com/gene...k-convert.html

Change
Code:
ebook-convert "%~dpnI.epub" "%~dpnI.pdf" >> conversion.log
to
Code:
ebook-convert "%~dpnI.epub" "%~dpnI.pdf" [options go here] >> conversion.log
eschwartz is offline   Reply With Quote
Old 09-11-2014, 10:51 AM   #10
Shady3
Junior Member
Shady3 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2014
Device: Personal Computer
Quote:
Originally Posted by eschwartz View Post
Regarding your PM...

Assuming you do not need the books in the library GUI, you can use the following batch file to search the current folder (the folder you stick the batch file in) and convert all EPUBs to PDF:

Code:
del conversion.log
for /r %%I in ("*.epub) do (
    echo ******************************* >> conversion.log
    echo Converting "%~dpnI.epub" to PDF >> conversion.log
    ebook-convert "%~dpnI.epub" "%~dpnI.pdf" >> conversion.log
)
It will use the default conversion settings, exactly as though you used the "traditional" way in the library, but without any of the customizations the conversion dialog offers.

You can duplicate the effects of anything in the calibre conversion dialog using the command-line options detailed here: http://manual.calibre-ebook.com/gene...k-convert.html

Change
Code:
ebook-convert "%~dpnI.epub" "%~dpnI.pdf" >> conversion.log
to
Code:
ebook-convert "%~dpnI.epub" "%~dpnI.pdf" [options go here] >> conversion.log
Thank you a lot for your time. I created a batch file as you said, but I don't know what do I have to do with it. I create it, I open it in the folder where all my epub files are but nothing happens.

I also tried to change all these ************* for the folder where they are, but nothing happens: it opens and closes automatically.

Sorry for my bad skills :/

Sin título.png
Shady3 is offline   Reply With Quote
Old 09-11-2014, 03:42 PM   #11
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by Shady3 View Post
Thank you a lot for your time. I created a batch file as you said, but I don't know what do I have to do with it. I create it, I open it in the folder where all my epub files are but nothing happens.

I also tried to change all these ************* for the folder where they are, but nothing happens: it opens and closes automatically.

Sorry for my bad skills :/

Sin título.png
I am far more comfortable writing linux shellscripts than windows batch files.
I forgot that the percent symbol needs to be doubled when used in windows scripts instead of the command prompt. (linux does not use two different forms.) Use this:

Code:
del conversion.log
for /r %%I in ("*.epub") do (
    echo ******************************* >> conversion.log
    echo Converting "%%~dpnI.epub" to PDF >> conversion.log
    ebook-convert "%%~dpnI.epub" "%%~dpnI.pdf" >> conversion.log
)
Change
Code:
ebook-convert "%%~dpnI.epub" "%%~dpnI.pdf" >> conversion.log
to
Code:
ebook-convert "%%~dpnI.epub" "%%~dpnI.pdf" [options go here] >> conversion.log
if you want to change the conversion settings.

Moral of the story -- my bad skills are nearly as bad as your bad skills, but worse because I don't realize it.

P.S. Leave in the ************* it is there to separate the conversion logs for each other. It is plain text to be written to the file. (The "echo" command prints text out.)
On second thought -- it doesn't really matter, I only stuck it there in the first place in order to record what was getting done. Just in case it ever becme important -- for instance, if you wanted to see what settings were used and print out potential errors and stuff. Just like Job Details in the calibre library window.
eschwartz is offline   Reply With Quote
Old 09-12-2014, 10:07 AM   #12
Shady3
Junior Member
Shady3 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2014
Device: Personal Computer
Quote:
Originally Posted by eschwartz View Post
I am far more comfortable writing linux shellscripts than windows batch files.
I forgot that the percent symbol needs to be doubled when used in windows scripts instead of the command prompt. (linux does not use two different forms.) Use this:

Code:
del conversion.log
for /r %%I in ("*.epub") do (
    echo ******************************* >> conversion.log
    echo Converting "%%~dpnI.epub" to PDF >> conversion.log
    ebook-convert "%%~dpnI.epub" "%%~dpnI.pdf" >> conversion.log
)
Change
Code:
ebook-convert "%%~dpnI.epub" "%%~dpnI.pdf" >> conversion.log
to
Code:
ebook-convert "%%~dpnI.epub" "%%~dpnI.pdf" [options go here] >> conversion.log
if you want to change the conversion settings.

Moral of the story -- my bad skills are nearly as bad as your bad skills, but worse because I don't realize it.

P.S. Leave in the ************* it is there to separate the conversion logs for each other. It is plain text to be written to the file. (The "echo" command prints text out.)
On second thought -- it doesn't really matter, I only stuck it there in the first place in order to record what was getting done. Just in case it ever becme important -- for instance, if you wanted to see what settings were used and print out potential errors and stuff. Just like Job Details in the calibre library window.
It works!!

Thank you so much for your time. I thought it was something impossible to do.

Thank you!!!!!!!!!
Shady3 is offline   Reply With Quote
Old 09-12-2014, 11:07 AM   #13
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
You're welcome.

I got an opportunity to brush up on Windows batch scripting, which was fun. (I am a glutton for punishment.)
eschwartz is offline   Reply With Quote
Old 09-13-2014, 07:02 PM   #14
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,724
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
This thread got moved from the Recipes Sub Forum

I thought it worthy of a bump to bring it to the attention of those who don't lurk in Recipes

Thanks to theducks

BR

Last edited by BetterRed; 09-13-2014 at 09:19 PM.
BetterRed is offline   Reply With Quote
Old 09-15-2014, 08:47 AM   #15
Shady3
Junior Member
Shady3 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2014
Device: Personal Computer
Quote:
Originally Posted by eschwartz View Post
You're welcome.

I got an opportunity to brush up on Windows batch scripting, which was fun. (I am a glutton for punishment.)
Yeah! You don't know how much did u help me

I wonder if it is possible to change font size.
Shady3 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Keeping Same File Names zobop Library Management 3 06-28-2012 07:50 AM
Keeping small caps when converting from sigil to calibre sly_skittle Sigil 8 03-22-2012 05:59 PM
Mac user needs help converting pdf's (TV Scripts) and keeping format!! mcforman Kindle Developer's Corner 12 06-20-2011 05:28 PM
Having a very hard time converting a comic and keeping it in order! branchedout Reading and Management 2 08-18-2010 11:13 AM
Question: converting lit to imp and keeping table of contents links etc askyn IMP 11 10-04-2008 01:04 AM


All times are GMT -4. The time now is 11:17 PM.


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