![]() |
#1 |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Convert .lit directly into .IMP formats
A while ago, I used this procedure to convert many .lit files into .IMP formats (EBW 1150 and REB 1200).
This information was originally posted to the REB 1200 Yahoo group, and for those who do not have access to that group, I re-post same here, namely: 1. s32lit2sb.exe - Lit2sb converter compatible with eBook Publisher 2.x (EBW/GEB 1150, REB1200,GEB2250/2200/2150 ) 2. s32lit2sb-INSTRUCTIONS-by-NR.txt - Instructions on how to effectively use this program to convert .lit files into .imp (Reb 1200/GEB 1150 formats) After setting this up, one "double-click" and your .lit file gets converted. Note, you can also use batch files to convert en-masse! Enjoy! -Nick EDIT 14 Feb 2008: added batch files to convert all .lit files in a directory to .IMP. Must read the instructions first, create the empty file 'GEB1150' and ensure you 'associate' .lit as described therein, and properly place all required programs in your 'path'. After that, double-click 'NRconvert lit to 1150 imp.bat' and wait for your results. By the way, when you double-click just the .lit file in windows explorer, you must manually rename the 'o_sb.imp' file; when using these batch files (even for one .lit), it's all done for you. EDIT 23 Aug 2008: I have re-compiled a windows executable (Lit2sb.exe) based on a modified copy of that perl script to allow proper conversions. Just replace the original lit2sb.exe executable with the one in the lit2sb.zip attachment in the thread Original Lit2sb perl script RESURRECTED! Among the things fixed were: - uses source .lit filename as final .imp output filename and places resulting .imp in the same directory as the .lit source. - for resulting .imp and .opf, no longer uses 8.3 filenames. - uses "2%" left and right margins now, instead of "18pt" - properly scales GEB1150/EBW1150 cover image so as to avoid bottom margin bleeding. - fixed system calls to external programs to properly prefix path. p.s. thanks to zelda_pinwheel for inspiring me to write this Last edited by nrapallo; 09-14-2008 at 07:30 AM. Reason: added link to re-compiled windows executable (Lit2sb.exe) substitute |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,783
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I've just made this thread a sticky to make it easier to find/see.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
zeldinha zippy zeldissima
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
|
Nick, you are my hero ! i just tried this automatic conversion and it worked a treat ! in under 30 seconds i had a nice, readable, .imp version of my .lit file.
of course, then i spent 2 hours "fixing" the code so it would be even nicer, but i *could* have left it alone, it would have been fine. i also tried it on that stupid drm book i bought the other day (i think it will be the last one, as well as the first one i buy), since i was having such terrible results before. the formatting is still strange, but not the same way it was before, and infinitely better than my previous efforts. at least it's readable, and at this point i think that's really as much as i can hope for ! thanks for this !! Last edited by zelda_pinwheel; 02-14-2008 at 06:46 PM. Reason: read a post by Nate (somewhere else), replied to Nick (here)... wrong name. Sorry ! |
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() Posts: 31
Karma: 10
Join Date: Jan 2008
Device: Sony PRS-505, eBookwise 1150
|
Thank you so much for this post! It is very useful!
|
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 774
Karma: 1211741
Join Date: May 2008
Location: Oregon
Device: EB1150, iPhone, Cool-er Purple, Pocketbook 360, Kindle Fire
|
alignment off
I just converted a .lit file to .imp, I can open the file just fine, however the book seems to have been aligned to the right side margin instead of the left.
Suggestions? Ideas on how to fix this? |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
To re-create the .imp ebook, after editing the .html as per above, you should use the (free) eBook Publisher software from ETI. Even though eBookwise Librarian can create ebooks, the eBook Publisher software allows better control but however needs much more working knowledge of HTML. |
|
![]() |
![]() |
![]() |
#7 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 774
Karma: 1211741
Join Date: May 2008
Location: Oregon
Device: EB1150, iPhone, Cool-er Purple, Pocketbook 360, Kindle Fire
|
umm
Okie I opened the html file in ebook publisher. Now I am just not sure what I need to change:
<html> <head> <style type="text/css"> <!-- body {margin-left:18pt; margin-right:18pt; x-sbp-widow-push:1; x-sbp-orphan-pull:1} td {vertical-align:top} table.hdr {width:100%; border:none; margin-left:0pt; margin-right:0pt} td.hdrl {text-align:left} td.hdrc {text-align:center} td.hdrr {text-align:right} .plain {text-decoration:none; font-style:none; font-weight:none; font-size:x-small; font-family:serif; color:#000000} header {display:none; display ![]() footer {display:none; display ![]() pbrk {page-break-before:always} .KWN {page-break-inside:avoid} fn {font-size:-1} sp {font-size:-3} adv2lm {sbp-advance:left} p {margin-top:0pt; margin-bottom:0pt; text-align:left; text-decoration:none; font-style:none; font-weight:none; font-size:x-small; font-family:serif; color:#000000} a {color: #0000ff} p.FullPagePicture, li.FullPagePicture, div.FullPagePicture {margin-left:0cm; text-align:center; font-size:12.0pt; } --> </style> Should I set style to left align? It looks like the text is set up to left align, I think.... Amy Edit- The first few pages are aligned to the left, then after the acknowledgements it goes to right. So I am guessing somewhere in there a right align command got thrown in. Last edited by sassanik; 05-23-2008 at 06:53 PM. Reason: more info |
![]() |
![]() |
![]() |
#8 | |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
Code:
right or right" This is probably a clitch/error in the original code that was somehow 'overlooked' by the MS LIT reader. If you can't find it, post here the area around the acknowledgment and include enough to show the text body, before and after. When you post the text here, just place it between Code:
[ CODE ] place text here [ /CODE ] Last edited by nrapallo; 05-23-2008 at 10:57 PM. Reason: typos! |
|
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Aug 2008
Device: eBookWise 1150
|
Not working
Can someone help with this? First, it seems the html2sb program is missing when I install lit2sb. I tried downloading that and adding it, but to no avail. When I set it all up like it says in the instructions and run the bat file, the .lit file gets expanded into a subfolder and it looks like the opf file gets renamed, but no imp file is generated. If I try running html2sb on it's own, it crashes. Am I missing something? I basically end up with a .lit file and a directory full of html, images, and opf files. Any idea why this wouldn't work?
Thanks. |
![]() |
![]() |
![]() |
#10 | |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
The resulting .imp should be located in the directory where your .lit resides. Did you "double-click" the .lit file to launch the conversion? Now if you did the above, the .imp conversion may have been halted due to errors in to .opf or .html. Just load the .opf in eBook Publisher and try to build your .imp edition. Was it successful? If not, then review the Messages log and see if anything needs fixing. If not, to see if your installation of lit2sb is working, try to convert another .lit file to see if that one works. If not, private message me with some details of your failed conversion attempt. |
|
![]() |
![]() |
![]() |
#11 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Aug 2008
Device: eBookWise 1150
|
Thanks, I'll try your suggestions when I get home from work today. I'm getting my reader this weekend for my birthday and I'm trying to make sure I have some books ready to test on it.
thanks again. Dave |
![]() |
![]() |
![]() |
#12 |
Member
![]() Posts: 18
Karma: 10
Join Date: Sep 2008
Device: Sony 700
|
This program works great! Is there a similar program for pdf direct to imp?
|
![]() |
![]() |
![]() |
#13 | |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
And if you need .prc/.mobi to .imp, look at Mobi2IMP 9.4 with new Windows GUI & UTF-8! AND when you get those installed, you can get direct .lit/.pdf/.prc to .imp conversion while surfing the internet as well (though it's less efficient), using Impserve as discussed in this thread! (your plugins would all be setup then, just download the latest release here!) Enjoy the world of converting to .imp... ![]() Last edited by nrapallo; 10-24-2008 at 04:17 PM. Reason: typo |
|
![]() |
![]() |
![]() |
#14 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,671
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
|
I'm having trouble converted Calibre generated LIT files to IMP.
There are three problems. 1) The LIT2SB tool is having problems with the CSS file. Calibre is using an tag called Code:
@namespace h "http://www.w3.org/1999/xhtml"; 2) The order of the content page is incorrect. The tool assumes the <manifest> data will be in sequential order and process the IMP OPF that way. Calibre's OPF file does is not in sequential order but properly laysout the the ID in the <spine> tag so that the order is correct. This results in chapters, TOC, and cover pages to be shuffled around in the IMP book. 3)The cover.htm file assumes an image Cover_SB.jpg but this file is not created. However there is a cover.jpg and it is in calibre's OPF file. =X= |
![]() |
![]() |
![]() |
#15 |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
=X=
This tool was developed about 5 years ago when there were only MS-commissioned .lit ebooks and so the program, Lit2sb.exe, does not know how to handle any of the inconsistencies introduced by the calibre .lit encoding method. However, I was able to RESURRECT the original Lit2sb Perl script and so it can be manipulated (re-coded) to suit! At the time I had "extracted" that Perl script, I also "tweaked" it to better produce .imp ebooks so I can and have produced new windows executables of lit2sb.exe. I mainly wrote the INSTRUCTIONS on how to effectively use this tool so my knowledge of this program comes only from reading the Perl code. I could recompile it quite easily if you know the exact patches you need implemented (otherwise there may be some heavy debugging to do ![]() Either send me a problematic .lit file or attach it here and let's see what's needs to be done to make this work for calibre generated .lit ebooks. ![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convert from Kindle's .azw to other formats? | Audiobook Fan | Workshop | 41 | 08-19-2014 11:38 AM |
Convert Epub and Msreader formats to Kindle formats | bruc79 | Calibre | 17 | 06-22-2010 04:50 AM |
question/suggestion: convert directly and make importing of sourcefile optional | dura | Calibre | 0 | 09-09-2009 06:05 AM |
Announcing: MOBI2IMP v9 will directly convert mobipocket .prc to .IMP formats | nrapallo | Kindle Formats | 4 | 03-22-2008 01:38 AM |
Just to be sure, open formats not directly supported? | drogo | Sony Reader | 8 | 06-18-2007 09:47 AM |