Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 02-20-2010, 05:25 AM   #16
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 72,496
Karma: 309060442
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by quocsan View Post
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.
pdurrant is offline   Reply With Quote
Old 02-20-2010, 07:08 AM   #17
quocsan
Enthusiast
quocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it is
 
Posts: 32
Karma: 2204
Join Date: Jul 2009
Device: none
Quote:
Originally Posted by pdurrant View Post
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.

Last edited by quocsan; 02-20-2010 at 07:21 AM.
quocsan is offline   Reply With Quote
Advert
Old 02-23-2010, 12:10 PM   #18
angelad
Groupie
angelad is on a distinguished road
 
Posts: 163
Karma: 64
Join Date: Jun 2009
Device: kindle dx
HOw widely used is Python these days?
angelad is offline   Reply With Quote
Old 02-23-2010, 12:29 PM   #19
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 72,496
Karma: 309060442
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by angelad View Post
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=Pyt...php%2C+c%2B%2B

Comparing 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%2C
pdurrant is offline   Reply With Quote
Old 02-23-2010, 01:15 PM   #20
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,525
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I doubt that's very accurate. python is hardly exclusive to the computer language (while c++ and perl are).
kovidgoyal is offline   Reply With Quote
Advert
Old 02-23-2010, 03:56 PM   #21
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 72,496
Karma: 309060442
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by kovidgoyal View Post
I doubt that's very accurate. python is hardly exclusive to the computer language (while c++ and perl are).
Granted. How about this one?

http://www.google.co.uk/trends?q=per...ile+-skin+-pet

which I think removes most other meanings of python.

Last edited by pdurrant; 02-23-2010 at 04:05 PM.
pdurrant is offline   Reply With Quote
Old 02-23-2010, 04:11 PM   #22
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,525
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Much better I'm happy to see Python usage rising. Another useful comparison is with Ruby.
kovidgoyal is offline   Reply With Quote
Old 03-19-2010, 12:31 PM   #23
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 72,496
Karma: 309060442
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by pdurrant View Post
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.
Version 0.20, now uploaded above, improves the opf file and the HTML file.
pdurrant is offline   Reply With Quote
Old 03-20-2010, 06:23 AM   #24
quocsan
Enthusiast
quocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it is
 
Posts: 32
Karma: 2204
Join Date: Jul 2009
Device: none
Quote:
Originally Posted by pdurrant View Post
Version 0.20, now uploaded above, improves the opf file and the HTML file.
Oh, it's really v0.21!
Thank you.
quocsan is offline   Reply With Quote
Old 03-20-2010, 10:55 AM   #25
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 72,496
Karma: 309060442
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by quocsan View Post
Oh, it's really v0.21!
Thank you.
So it is - I got it right in one message, and forgot the version number by the time I wrote the second! :-)
pdurrant is offline   Reply With Quote
Old 04-12-2010, 05:21 AM   #26
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 72,496
Karma: 309060442
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by pdurrant View Post
[Bug fix so that it works right with Mobipocket files containing more than 9 images]
Now here's version 22.
Another update, to fix a silly bug that got the image links wrong if there were more than nine images.
pdurrant is offline   Reply With Quote
Old 07-25-2010, 12:36 PM   #27
adamselene
Enthusiast
adamselene can tame squirrels without the assistance of a chair or a whip.adamselene can tame squirrels without the assistance of a chair or a whip.adamselene can tame squirrels without the assistance of a chair or a whip.adamselene can tame squirrels without the assistance of a chair or a whip.adamselene can tame squirrels without the assistance of a chair or a whip.adamselene can tame squirrels without the assistance of a chair or a whip.adamselene can tame squirrels without the assistance of a chair or a whip.adamselene can tame squirrels without the assistance of a chair or a whip.adamselene can tame squirrels without the assistance of a chair or a whip.adamselene can tame squirrels without the assistance of a chair or a whip.adamselene can tame squirrels without the assistance of a chair or a whip.
 
Posts: 42
Karma: 11050
Join Date: Nov 2009
Device: Kindle Paperwhite, Kindle Touch, Kindle 2
I have to admit I kind of dropped this on the floor after my initial flurry. Thanks for the additional work, pdurrant.

One of the things that has always been a little irritating about Mobipocket (compared with ePub) is that it hard-codes file offsets in links, making it problematic to fix errors in an eBook if you don't have good tools. It's clearly seen as a display format (like PostScript) rather than a source format.

Thankfully, ePub is a lot more sane.
adamselene is offline   Reply With Quote
Old 07-26-2010, 10:12 AM   #28
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 72,496
Karma: 309060442
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by adamselene View Post
I have to admit I kind of dropped this on the floor after my initial flurry. Thanks for the additional work, pdurrant.

One of the things that has always been a little irritating about Mobipocket (compared with ePub) is that it hard-codes file offsets in links, making it problematic to fix errors in an eBook if you don't have good tools. It's clearly seen as a display format (like PostScript) rather than a source format.

Thankfully, ePub is a lot more sane.
Without your initial work, I couldn't have done anything. Tweaking python — fine, I can do that. Writing this from scratch? No way...

I think that mobiunpack now allows unpacking, editing and re-packing (with KindleGen) without any problems. If anyone does come across any problems doing this, I'd love to hear about them so that they can be fixed.

What's nice with ePub is that (with careful choice of attributes in the opf file), it's possible to create a valid ePub and use the ePub source folder to create a well-formed Mobipocket ebook using KindleGen.
pdurrant is offline   Reply With Quote
Old 08-29-2010, 06:48 PM   #29
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 72,496
Karma: 309060442
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by pdurrant View Post
[Enhancement: Now includes Start guide item in the opf]
Now here's version 23.
Just uploaded version 23. Mobipocket books can include a pointer to where the book should open to when first opened (often the first page of the first chapter, skipping all the prelims).

Version 23 of MobiUnpack now writes this info out in the .opf file, so that it's preserved if the Mobipocket file is re-built from mobiunpack's output using Kindlegen.
pdurrant is offline   Reply With Quote
Old 09-02-2010, 03:12 AM   #30
quocsan
Enthusiast
quocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it is
 
Posts: 32
Karma: 2204
Join Date: Jul 2009
Device: none
Good job, thank you pdurrant!
quocsan is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can i rotate text and insert images in Mobi and EPUB? JanGLi Kindle Formats 5 02-02-2013 05:16 PM
PDF to Mobi with text and images pocketsprocket Kindle Formats 7 05-21-2012 08:06 AM
Mobi files - images DWC Introduce Yourself 5 07-06-2011 02:43 AM
pdf to mobi... creating images rather than text Dumhed Calibre 5 11-06-2010 01:08 PM
Transfer of images on text files anirudh215 PDF 2 06-22-2009 10:28 AM


All times are GMT -4. The time now is 10:30 AM.


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