Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-21-2008, 10:41 AM   #16
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by maggotb0y View Post
bd2mobi does exactly what HarryT's tutorial walks you through- it just automates it all. The only thing it does not automate is converting any non-jpeg images to jpeg. If it sees any gifs or pngs in the source, it will let you know that you need to fix that.
You can use GD to convert to jpeg. That is what I use in MobiPerl. The only issue was that if you use ActivePerl in Windows you have to use an alternative repository for the GD package.

If you give -jpeg to mobigen I thought it converted to jpeg but maybe it only accept jpeg and does not convert them to gif.
tompe is offline   Reply With Quote
Old 01-21-2008, 10:44 AM   #17
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by maggotb0y View Post
For the compiled version, you won't need Perl at all, just run the .exe.
Which version of Perl did you use and how did you compile it? I had a lot of trouble finding a combination of ActivePerl and PAR that worked. I finally found one but now I do not dare to update anything...
tompe is offline   Reply With Quote
Advert
Old 01-21-2008, 11:41 AM   #18
maggotb0y
Connoisseur
maggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheese
 
Posts: 84
Karma: 1166
Join Date: Apr 2007
Location: New Jersey, Outside of Philadelphia
Device: Sony Reader
The machine I wrote it on has a relatively recent 5.8 build from activestate- it was compiled with the activestate compiler.
maggotb0y is offline   Reply With Quote
Old 01-21-2008, 12:46 PM   #19
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by tompe View Post
If you give -jpeg to mobigen I thought it converted to jpeg but maybe it only accept jpeg and does not convert them to gif.
It does indeed convert other image formats to JPEG if you use that flag, but if you have any <IMG> links in your HTML which reference the GIF (or whatever they are) files, they don't get changed, so it's not really of that much practical use .
HarryT is offline   Reply With Quote
Old 01-21-2008, 01:03 PM   #20
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by HarryT View Post
It does indeed convert other image formats to JPEG if you use that flag, but if you have any <IMG> links in your HTML which reference the GIF (or whatever they are) files, they don't get changed, so it's not really of that much practical use .
The image links are always changed to a record index pointer so it will work. So mobigen -jpeg will work for files that references GIF images. The links in the documents are not used at all in the MobiPocket file. A link to a position is replaced by a "filepos" tag for example.
tompe is offline   Reply With Quote
Advert
Old 01-21-2008, 01:27 PM   #21
maggotb0y
Connoisseur
maggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheese
 
Posts: 84
Karma: 1166
Join Date: Apr 2007
Location: New Jersey, Outside of Philadelphia
Device: Sony Reader
Quote:
Originally Posted by HarryT View Post
It does indeed convert other image formats to JPEG if you use that flag, but if you have any <IMG> links in your HTML which reference the GIF (or whatever they are) files, they don't get changed, so it's not really of that much practical use .
I'm sure I can correct the source html to deal with new file names. Over the next day or so I'll do some playing around with documents that have jpgs and gifs and update the script to handle them automatically.
maggotb0y is offline   Reply With Quote
Old 01-22-2008, 02:33 AM   #22
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by tompe View Post
The image links are always changed to a record index pointer so it will work. So mobigen -jpeg will work for files that references GIF images. The links in the documents are not used at all in the MobiPocket file. A link to a position is replaced by a "filepos" tag for example.
OK, thanks, Tommy. I remember trying something using that flag which didn't work as I expected it too. I can't recall exactly what it was, though.
HarryT is offline   Reply With Quote
Old 01-23-2008, 06:42 AM   #23
maggotb0y
Connoisseur
maggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheese
 
Posts: 84
Karma: 1166
Join Date: Apr 2007
Location: New Jersey, Outside of Philadelphia
Device: Sony Reader
Okay, I've updated the attachment to remove the checking for .jpgs and .gifs, so this should now properly convert any file with those graphics types. If you could try it out and let me know what you think, I'd appreciate it.

Thanks for the info, Tommy!
maggotb0y is offline   Reply With Quote
Old 01-30-2008, 01:30 AM   #24
lovebeta
Groupie
lovebeta has a complete set of Star Wars action figures.lovebeta has a complete set of Star Wars action figures.lovebeta has a complete set of Star Wars action figures.lovebeta has a complete set of Star Wars action figures.lovebeta has a complete set of Star Wars action figures.
 
Posts: 176
Karma: 406
Join Date: Jan 2008
Device: Amazon Kindle 2, Amazon Kindle, Sony PRS-505
Great tool maggotb0y. This is faster than doing it by hand following HarryT's instruction.

There's one issue about the author field though. When defining in BD, I would like to keep the "First name last name" sequence. However, as we know, to make "sort by author" work properly in Kindle, we need the output Mobi in the format of "last name, first name". Is there any work around for this? Thanks.
lovebeta is offline   Reply With Quote
Old 01-31-2008, 01:50 AM   #25
dcalder
Zealot
dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.
 
Posts: 127
Karma: 9856
Join Date: Dec 2007
Location: Ontario, Canada
Device: Sony PRS-300/Kindle Keyboard/iPad Mini
I've downloaded and attempted to use bd2mobi but not having any luck with it.

Using this command line:

Code:
bd2mobi.exe "C:\Documents and Settings\dcalder\My eBooks\build\aylno.html0"
I end up with this result:

Code:
*****************************************
* Mobipocket mobigen.exe V6.01 build 36 *
* A command line e-book compiler        *
* Copyright Mobipocket.com 2003-2007    *
*****************************************

opt compression: standard DOC compression
opt security: no security
Error: unsupported argument -jpegdone processing A Year Like No Other by Aspen
No file appears to have been created. Am I doing something wrong or is there a bug in the script? Where should the mobi file appear - in the directory with bd2mobi or in the directory with the BD source file?
dcalder is offline   Reply With Quote
Old 02-01-2008, 09:25 AM   #26
maggotb0y
Connoisseur
maggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheese
 
Posts: 84
Karma: 1166
Join Date: Apr 2007
Location: New Jersey, Outside of Philadelphia
Device: Sony Reader
Quote:
we need the output Mobi in the format of "last name, first name". Is there any work around for this? Thanks.
I'll look into a switch for reversing the author or allowing you to specify.
maggotb0y is offline   Reply With Quote
Old 02-01-2008, 09:38 AM   #27
maggotb0y
Connoisseur
maggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheese
 
Posts: 84
Karma: 1166
Join Date: Apr 2007
Location: New Jersey, Outside of Philadelphia
Device: Sony Reader
Quote:
Originally Posted by dcalder View Post
No file appears to have been created. Am I doing something wrong or is there a bug in the script? Where should the mobi file appear - in the directory with bd2mobi or in the directory with the BD source file?
If everything's working properly, the mobi file will be created in the same folder as the html0 file.

Not sure why that would happen, it may be something in the environment on your PC. Does the problem you're describing happen with all files or just one file. If you are experiencing only with this file, can you post it (is it public domain)? If not I'll work to add a switch that doesn't delete the source files so we can troubleshoot the issue.
maggotb0y is offline   Reply With Quote
Old 02-07-2008, 11:01 AM   #28
dcalder
Zealot
dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.dcalder knows what is on the back of the AURYN.
 
Posts: 127
Karma: 9856
Join Date: Dec 2007
Location: Ontario, Canada
Device: Sony PRS-300/Kindle Keyboard/iPad Mini
Quote:
Originally Posted by maggotb0y View Post
If everything's working properly, the mobi file will be created in the same folder as the html0 file.

Not sure why that would happen, it may be something in the environment on your PC. Does the problem you're describing happen with all files or just one file. If you are experiencing only with this file, can you post it (is it public domain)? If not I'll work to add a switch that doesn't delete the source files so we can troubleshoot the issue.

After a little further investigation, it appears that the problem may be that I'm using the latest mobigen - which no longer supports the -jpeg option, as it behaves that way by default. That's what throws the error. It seems likely that it's also what prevents the mobi file from being created.
dcalder is offline   Reply With Quote
Old 04-07-2008, 09:25 PM   #29
maggotb0y
Connoisseur
maggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheese
 
Posts: 84
Karma: 1166
Join Date: Apr 2007
Location: New Jersey, Outside of Philadelphia
Device: Sony Reader
After an extremely long delay, I've finally gotten around to releasing an update that works with newer versions of mobigen, and also allows you to specify author, title, and cover image.
maggotb0y is offline   Reply With Quote
Old 04-09-2008, 03:21 PM   #30
maggotb0y
Connoisseur
maggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheesemaggotb0y can extract oil from cheese
 
Posts: 84
Karma: 1166
Join Date: Apr 2007
Location: New Jersey, Outside of Philadelphia
Device: Sony Reader
Sorry, didn't document the usage. Its as follows

mobigen.exe "my example book.html0" --author="Smith, Agent" --title="My Example Book" --cover="My Neato Cover.jpg"
maggotb0y is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EPUB to MOBI: "Failed: Convert book 1 of 1" Jillo Introduce Yourself 4 02-20-2010 06:49 PM
Mobi book won't convert to ePub HarryT Calibre 4 08-09-2009 11:20 AM
Using Book Designer to convert Lit to Lrf? Gibbo Sony Reader 11 07-22-2007 10:33 AM
Book Designer - I'm a Convert! HarryT Sony Reader 114 05-25-2007 10:15 PM
Handy Perl Script to convert HTML0 files to smartquotes maggotb0y Sony Reader 0 04-12-2007 11:49 AM


All times are GMT -4. The time now is 02:17 AM.


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