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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-19-2010, 07:52 AM   #1
Mister_R
Member
Mister_R began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Oct 2010
Device: Kindle DX
Add book as HTML file

I have a folder with several html files. Each file is a book page.
In this folder there is also an index file.
I can’t add this book to caliber.
I press the add button. Select the html index file and the process seems ok, without any error, but it adds an empty file.
The problem may be in the index file. I have no HTML knowledge, but it seems like the example in Calibre FAQ.
Anyway I post here the HTML file sample. Any help is most welcome.

<html>
<head>
<title></title>
</head>
<body>
<a href="C:\Temp\Html\II\II-1.html" target="rechts" >Page 1</a>
<br><a href="C:\Temp\Html\II\II-2.html" target="rechts" >Page 2</a>
<br><a href="C:\Temp\Html\II\II-3.html" target="rechts" >Page 3</a>
<br><a href="C:\Temp\Html\II\II-4.html" target="rechts" >Page 4</a>
<br><a href="C:\Temp\Html\II\II-5.html" target="rechts" >Page 5</a>
...
<br><a href="C:\Temp\Html\II\II-589.html" target="rechts" >Page 589</a>
<br><a href="C:\Temp\Html\II\II-590.html" target="rechts" >Page 590</a>
<br></body>
</html>
Mister_R is offline   Reply With Quote
Old 10-19-2010, 09:03 AM   #2
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,105
Karma: 780247
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
The problem might be that the HREF references use an absolute path. It is more normal to use a relative path where the path is relative to the index.html file. You would definitely have a problem if the absolute path referenced files that did not actually exist.
itimpi is offline   Reply With Quote
Old 10-19-2010, 09:38 AM   #3
Mister_R
Member
Mister_R began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Oct 2010
Device: Kindle DX
thank you for your replay.
How do I change absolute to relative path? i have no experience with HTML.
Mister_R is offline   Reply With Quote
Old 10-19-2010, 10:18 AM   #4
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,910
Karma: 4329601
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O
Hi Mister_R,

Assuming that all your 'page' HTML files are in the same directory as the index.html file, try the following:
  1. Open index.html in your preferred text editor and use the find-and-replace so that each line goes from

    Code:
    <a href="C:\Temp\Html\II\II-2.html" target="rechts" >
    to
    Code:
    <a href="II-2.html" target="rechts" >
    i.e. remove the C:\Temp\Html\II\ part of each html filename.
  2. Save the edited index.html
  3. If you like, test it before reimporting to Calibre by double-clicking on index.html so that it opens in your Browser. Once the menu of pages comes up select one at random and make sure the correct page opens in the Browser without error. As long as this works you should be OK in Calibre.
jackie_w is offline   Reply With Quote
Old 10-19-2010, 10:18 AM   #5
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,105
Karma: 780247
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
If the files are in the same folder as the Index.hm(l) file, then you can change
"C:\Temp\Html\II\II-2.html" to "II-2.html"
The fact that there is no leading Drive Id or folder name indicates it is a relative path to the folder where index.html is located. Repeat this for each line in the index.html referencing one of the other files.
itimpi is offline   Reply With Quote
Old 10-19-2010, 11:43 AM   #6
Mister_R
Member
Mister_R began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Oct 2010
Device: Kindle DX
Perfect.
I worked just fine after removing C:\Temp\Html\II\
Thank you
Mister_R 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
Merging multiple HTML files into one HTML file skoobwoman Workshop 45 07-11-2014 11:46 AM
How can i convert HTML or txt file to EPUB file ? guguqiaqia ePub 7 05-28-2010 10:15 PM
How to add html to calibre and send to cybook opus mytwobears Calibre 1 04-18-2010 09:39 PM
Add HTML with meta tags Pixelmagic Calibre 3 03-03-2010 08:54 PM
Unable to add HTML files in 0.6.10 nekokami Calibre 2 09-06-2009 12:17 PM


All times are GMT -4. The time now is 09:45 PM.


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