Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-19-2010, 06: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, 08: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,552
Karma: 950151
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
Advert
Old 10-19-2010, 08: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, 09:18 AM   #4
jackie_w
Grand Sorcerer
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: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
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, 09: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,552
Karma: 950151
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
Advert
Old 10-19-2010, 10: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


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add HTML with meta tags Pixelmagic Calibre 9 04-19-2020 05:47 PM
Merging multiple HTML files into one HTML file skoobwoman Workshop 45 07-11-2014 10:46 AM
How can i convert HTML or txt file to EPUB file ? guguqiaqia ePub 7 05-28-2010 09:15 PM
How to add html to calibre and send to cybook opus mytwobears Calibre 1 04-18-2010 08:39 PM
Unable to add HTML files in 0.6.10 nekokami Calibre 2 09-06-2009 11:17 AM


All times are GMT -4. The time now is 09:52 AM.


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