KindleUnpack (MobiUnpack): Extracts text, images and metadata from Kindle/Mobi files
Quote pdurrant
However, the raw output of the 'html' in the Mobipocket file need a fair bit of work on it yet before it'll be possible to regenerate the file using Mobipocket Creator or KindleGen.
That's my eventual aim with this, however.
By taking code from other sources and tweaking it, Version 0.17 (above) now creates an opf file, a folder of images, and an html file that are ready for use with Mobipocket Creator.
Simply opening the opf file with Mobipocket Creator, and choosing to build re-creates the original Mobipocket book. Of course, it also means that it's easy to correct any typos in the HTML file first.
Quote pdurrant
By taking code from other sources and tweaking it, Version 0.17 (above) now creates an opf file, a folder of images, and an html file that are ready for use with Mobipocket Creator.
Simply opening the opf file with Mobipocket Creator, and choosing to build re-creates the original Mobipocket book. Of course, it also means that it's easy to correct any typos in the HTML file first.
Thank you pdurrant!
You have done a great job!
B.T.W, Could you please make a small Python script that can change eBook metadata (e.g eBook's title)?
Sometimes, we need to change the titles for grouping eBooks.
Thank you in advance for your attention.
Quote quocsan
Thank you pdurrant!
You have done a great job!
B.T.W, Could you please make a small Python script that can change eBook metadata (e.g eBook's title)?
Sometimes, we need to change the titles for grouping eBooks.
Thank you in advance for your attention.
If you have Calibre installed, 'ebook-meta' will do what you want. If you haven't, you should :-).
Quote quocsan
Thank you pdurrant!
You have done a great job!
B.T.W, Could you please make a small Python script that can change eBook metadata (e.g eBook's title)?
Sometimes, we need to change the titles for grouping eBooks.
Thank you in advance for your attention.
I use Mobiperl for that (with a little Applescript wrapper).
Quote pdurrant
I use Mobiperl for that (with a little Applescript wrapper).
I see. But I meant title in UNICODE (eBook => 'Sách Điện Tử' in Vietnamese).
MobiPerl cannot deal with title in UNICODE.
I have changed eBooks' titles with WinHex. But I dislike to do that by hand.
OK, I'll try with ... Google.
Thank you for attention.
Quote quocsan
I see. But I meant title in UNICODE (eBook => 'Sách Điện Tử' in Vietnamese).
MobiPerl cannot deal with title in UNICODE.
I have changed eBooks' titles with WinHex. But I dislike to do that by hand.
OK, I'll try with ... Google.
Thank you for attention.
Oh - having double-checked, I find I was wrong in my initial assumption - that title couldn't be in unicode. If the book is set up as a UTF-8 book, then the title field in the first record is stored and interpreted as UTF-8.
Of course, that means that in Windows Latin-1 Mobipocket books it's interpreted as Windows Latin-1 encoded. So it's not possible to give a unicode name to just any Mobipocket book, but it should be possible on Unicode Mobipocket books.
I have much too much on at the moment, but it's an interesting idea.
Quote pdurrant
Oh - having double-checked, I find I was wrong in my initial assumption - that title couldn't be in unicode. If the book is set up as a UTF-8 book, then the title field in the first record is stored and interpreted as UTF-8.
Of course, that means that in Windows Latin-1 Mobipocket books it's interpreted as Windows Latin-1 encoded. So it's not possible to give a unicode name to just any Mobipocket book, but it should be possible on Unicode Mobipocket books.
I have much too much on at the moment, but it's an interesting idea.
That's correct, pdurrant!
In fact whenever I want to change an ebook's title, I have to
1) Edit the title in NotePad and save it as text file in UTF-8.
2) View the text file in hexadecimal (with Total Commander) and copy the title in hexa string.
3) Open the eBook in WinHex, locate the original title and replace it with the title in step 2. Then find and update the title length in the eBook.
The above steps can help me to change UNICODE title if the eBook encoded in UTF-8 format, but not work with 1252 code page.
So I hope someone can write a Python script to do those steps.
And why Python? Because then I can run the script on my Nokia phone with Python for S60. I always enjoy eBooks on my Nokia E-series (E71).
The easiest way to have the eBook's title as we want is use MobiReader desktop version. With this, we can easily change the title and have the title saved in .MBP file. But then the eBook has to come along with .MBP file. I use this approach for eBooks encoded in 1252 format.
HOw widely used is Python these days?
Quote angelad
HOw widely used is Python these days?
Judging from Google Trends, more popular now than Perl, but still well below c++ and php:
http://www.google.co.uk/trends?q=Python%2C+Perl%2C+php%2C+c%2B%2BComparing just to Perl, we see that Perl dropped below Python in popularity at the end of 2007.
http://www.google.co.uk/trends?q=Python%2C+Perl%2CI doubt that's very accurate. python is hardly exclusive to the computer language (while c++ and perl are).