![]() |
#1 |
Apeist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,126
Karma: 381090
Join Date: Oct 2008
Location: The sunny part of California
Device: Generic virtual reality story-experiential device
|
Converting HTML to Mobi?
Is there a way to prevent the insertion of page numbers coded in the original file?
Also, is there a WYSIWYG way of cleaning up headers, etc.? Finally, it would be incredibly helpful, if Calibre can be used as to edit a converted book (basic editing, like delete or add text, maybe find and replace.) I am assuming it is a difficult task, otherwise it would have been implemented, but it would be oh so helpful. |
![]() |
![]() |
![]() |
#2 |
Reticulator of Tharn
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
If the page numbers are numbers are markuped up in some semantic way then you can get rid of them with a bit of --override-css. For example, if the HTML has something like '<span class="pagenumber">12</span>', you can just add '.pagenumber { display: none; }' to your override CSS.
Editing, probably not any time soon, especially WYSIWYG. I can't speak for Kovid or any other calibre contributor, but for me it's kind of hard to get motivated to work on something I'd never use ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,170
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yeah there are no immediate plans for an editor, though I have some nice ideas about one that perhaps one day I will implement. The problem is time, calibre is already so large that a significant fraction of my calibre development tiome is getting sucked into chasing down bugs in its various far flung components.
|
![]() |
![]() |
![]() |
#4 |
Apeist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,126
Karma: 381090
Join Date: Oct 2008
Location: The sunny part of California
Device: Generic virtual reality story-experiential device
|
Thanks!
I might be a bit thick, but I don't seem to be able to figure out how to edit the code to prevent automatic pagination. I am providing it here, if someone can point me to the correct line and how to change it, I would be grateful. Code:
<script language="JavaScript"> function Paginate() { if ( document.styleSheets[0].rules[0].style.display == "" ) { document.styleSheets[0].rules[0].style.display = "none"; document.styleSheets[0].rules[1].style.display = ""; document.styleSheets[0].rules[2].style.display = "none"; } else { document.styleSheets[0].rules[0].style.display = ""; document.styleSheets[0].rules[1].style.display = "none"; document.styleSheets[0].rules[2].style.display = ""; } } </script> </head> <script language="JavaScript"> <!-- hide var w; var lab = new Array() function openWin(label) { lab[lab.length] = label; if (!w || w.closed) { w=window.open('','Footnote','resizable=yes,menubar=no,toolbar=no,scrollbars=yes,width=700,height=350'); w.document.open(); w.document.write('<html><head><title>Footnote</title>'); w.document.write('<link rel="stylesheet" href="sci.css" type="text/css">'); w.document.write('</head>'); w.document.write('<script language="JavaScript">function openWin(label){ if (opener) opener.openWin(label);} function openWin1(label){ if (opener) opener.openWin1(label);} function window.onbeforeunload() {opener.lab.length = 0;}</script>'); w.document.write('<body BGCOLOR="#AFE1A7" onunload=winClose1()>'); w.document.write('</body></html>'); w.document.close(); } w.document.body.innerHTML = document.getElementById(label).innerHTML; if (lab.length>1) w.document.body.innerHTML = w.document.body.innerHTML + '<br><a href=# onClick="openWin1(\''+lab[lab.length-2]+'\'); return false;"><< Back</a>'; } function openWin1(label) { lab.pop(); w.document.body.innerHTML = document.getElementById(label).innerHTML; if (lab.length>1) w.document.body.innerHTML = w.document.body.innerHTML + '<br><a href=# onClick="openWin1(\''+lab[lab.length-2]+'\'); return false;"><< Back</a>'; } function winClose() { if(w) w.close() } //--> </script> <body onunload=winClose()> <a name=tit></a> <table width=100% cellspacing=0 cellpadding=0 border=0> <tr><td> <td width=100%><hr></td> <td><a href=#cont>>></a></td> </tr> </table> <center><img src=cover.jpg width="500" height="500"></center> <br> <table width=100% cellspacing=0 cellpadding=0 border=0> <tr><td><a href=#tit><<</a></td> <td width=50%><hr></td> <td><span class=page> <a name=pii>{ii}</a> </span><pagenumber { display: none; }></td> <td width=50%><hr></td> <td><a href=#cont>>></a></td> </tr> </table> Last edited by Sonist; 02-08-2009 at 01:46 PM. |
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() ![]() Posts: 73
Karma: 186
Join Date: Feb 2009
Location: CT, USA
Device: samsung i910 now - cybook later
|
perhaps rather then putting in an editor adding a function to export the temp html to an editor selected by the user?
Basically I'm saying if I'm doing a convert on something like a lit file, Calibre could explode the LIT, reformat based on the settings, then write the file to a temp workspace before launching the user's preferred HTML editor on the workspace. After editing the file the user saves the file and continues the import in Calibre. I know these actions are all available with the tools in the Calibre install but just suggesting making user friendly this way. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,170
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can just convert to epub then use winzip (or whatever) to unzip the epub and you will have nice easily editable files. After you're done editing zip up the files and reanme to .epub
One application that does this for you is ecub (it's posted on the forums here). |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
MemoryError converting PHP manual (html->mobi) | jalperin | Calibre | 1 | 09-21-2010 11:40 AM |
Calibre Indent Issue When Removing Blank Lines (Converting From HTML to MOBI or EPUB) | David Derrico | Calibre | 5 | 08-04-2010 12:13 AM |
converting from standard mobi to compressed mobi | noideaatall | Kindle Formats | 6 | 07-11-2010 03:10 PM |
multiple repeat error converting HTML to MOBI | moog | Calibre | 0 | 02-05-2010 01:03 PM |
Problem converting HTML to Mobi | AprilHare | Calibre | 3 | 05-02-2009 09:34 PM |