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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-26-2020, 11:42 AM   #1
shotsky
Enthusiast
shotsky began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Jul 2012
Device: none
Import group of html files to epub

I am trying to import a couple hundred html files into a single new epub.
I have created a toc as referenced elsewhere, with a list of each html file to be included. These file names include the path to the files to be imported, meaning there are multiple back slashes in the file names. Further, most of these files contain images, which are 2 or more folders deeper than the actual html files.
I am attempting to do this at the command line, but so far no luck in getting even one file into Calibre.
Here is an example of one line in the toc I created:
<a href="D:\++Cook Work\Paprika\Paprika\Recipes\Recipes\Apple Crumb Cake.html"></a>
What would help me is an example file that is correctly formatted for import with just a couple filenames, to make sure my format is correct.
And then, the exact command to issue on the command line. This is what I am using now:
^!Set %output%=^$GetOutput(ebook-convert "^%HtmlMgFile%" "^%EpubFile%")$
That exact command works to convert an epub to an htmlz file, but not my group of html files. All the files, including the toc are in the same folder, but each photo is in its own folder below that html file. The path to the images is in each file.
I've attached my toc file. (I think...not sure it worked)
shotsky is offline   Reply With Quote
Old 04-26-2020, 11:59 AM   #2
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,125
Karma: 8796706
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by shotsky View Post
I am trying to import a couple hundred html files into a single new epub.
I have created a toc as referenced elsewhere, with a list of each html file to be included. These file names include the path to the files to be imported, meaning there are multiple back slashes in the file names. Further, most of these files contain images, which are 2 or more folders deeper than the actual html files.
I am attempting to do this at the command line, but so far no luck in getting even one file into Calibre.
Here is an example of one line in the toc I created:
<a href="D:\++Cook Work\Paprika\Paprika\Recipes\Recipes\Apple Crumb Cake.html"></a>
What would help me is an example file that is correctly formatted for import with just a couple filenames, to make sure my format is correct.
And then, the exact command to issue on the command line. This is what I am using now:
^!Set %output%=^$GetOutput(ebook-convert "^%HtmlMgFile%" "^%EpubFile%")$
That exact command works to convert an epub to an htmlz file, but not my group of html files. All the files, including the toc are in the same folder, but each photo is in its own folder below that html file. The path to the images is in each file.
I've attached my toc file. (I think...not sure it worked)
Ok in your cmd terminal change folder until you are in the folder with the html files
You do not need to the drive letter in your toc file.

bernie

Edit:

This is an example of a toc line for a Baen html in which the cli cmd was run from the base folder of the files.

Code:
<a href="9781982124502___1.htm"><b>DEDICATION</b></a><br />
remember KISS

Last edited by gbm; 04-26-2020 at 12:03 PM.
gbm is offline   Reply With Quote
Advert
Old 04-26-2020, 01:11 PM   #3
shotsky
Enthusiast
shotsky began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Jul 2012
Device: none
Quote:
Originally Posted by gbm View Post
Ok in your cmd terminal change folder until you are in the folder with the html files
You do not need to the drive letter in your toc file.

bernie

Edit:

This is an example of a toc line for a Baen html in which the cli cmd was run from the base folder of the files.

Code:
<a href="9781982124502___1.htm"><b>DEDICATION</b></a><br />
remember KISS
Ok, thank you, that did work to get the epub made. Unfortunately, it did not get the photos, but left a 'placeholder' page for each file that had a photo. In other words, there is a blank page where each photo should be with a little icon of a photo. The path for the images is:
<img src=" Images/8F6BB8EC-5379-4235-862C-3CC55CE3D72E-4514-0000190278ACBC2E/9FFC7EE4-6DF4-45A1-A098-00B827A78E41-4514-000019027AB93FB9.jpg " itemprop="image" class="photo photoswipe"/>
Is there perhaps a switch I could use to make it find the photos?
shotsky is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple html files to one epub book Raphi'Elohim Conversion 2 07-09-2019 08:57 AM
Consolidating HTML files in epub? joebob2a Sigil 8 06-14-2019 12:22 AM
How to get Calibre to import 500ish .html index files? bounce Calibre 3 06-03-2019 04:31 PM
Split an EPUB into more HTML files 1v4n0 Sigil 7 10-24-2015 12:57 PM
How to convert these html files to ePub? Valkrider Conversion 5 06-07-2015 07:48 AM


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


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