View Full Version : How To mass-convert ereader files into HTML and then into MOBI


GatorDeb
08-01-2009, 07:25 PM
Here are the steps on how to mass convert ereader into Kindle (no cover, just the book).

It keeps hyperlinks! You do lose images and the cover.

You are going to need:

THE ereader python script

Mobiperl: (download the appropriate one depending on your operating system, I.e. Windows users will want mobiperl-win-0.0.43.zip as of this writing (8/1/09))

https://dev.mobileread.com/dist/tompe/mobiperl/


First step, OPEN the ereader Python script in notepad.

Find this line:

file(os.path.join(outdir, 'book.html'),'wb').write(pml.process())

Change it to

file(os.path.join(outdir, outdir+'.html'),'wb').write(pml.process())

Put all your ereader files in a directory and go to the command prompt. Navigate to the directory with all the ereader files (your new ereader Python script should be here also).

Execute this command:

for %a in (*.pdb) do "ereader2html.py" %a "c:\completepath\%~na" "Name Last Name" Last8ofCC

Here's what you will get:

In that directory, you will create one directory per book that has the images. You can delete the directories, save them, whatever you want to do with them.

Most importantly, you will have BookName.html files, as opposed to just "book.html" files. Your output files will carry each book's name.

Now copy html2mobi from the Mobiperl zip into the directory with all the HTML files.

Now in your command prompt execute:

for %a in (*.html) do html2mobi.exe %a

And that is how you mass convert ereader to Kindle :D

texasnightowl
08-09-2009, 09:21 PM
Hey Deb...thanks for this! You inspired me. I buy most of my books in mobi format cuz that is quickest to convert for my Kindle, but I do have some ereader files around.

Anyway, I figured there must be a way to mass convert but also keep the images. And I think I got it. At least, it worked on my machine.

As soon as I clean up my batch file code, I'll post about it.

Baskar
12-18-2009, 04:51 PM
Can i convert mobi to html format