Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-17-2012, 07:21 PM   #1
Derek R
Connoisseur
Derek R began at the beginning.
 
Derek R's Avatar
 
Posts: 87
Karma: 20
Join Date: Jun 2011
Location: County Down, Northern Ireland
Device: none
KindleGen basics

Hello. I'm trying to get to grips with using Kindlegen to create ebooks from html files, but having downloaded it and tried the instructions, I'm getting nowhere. I'm starting from the point of zero knowledge on how to use command prompts. Amazon says to type in:

c:\KindleGen\kindlegen

to receive instructions, but when I run the command prompt the path

c:\Documents and Settings\Derek>

comes up and I'm unable (or don't know how) to overwrite it.

The actual location of the html I want to use in a test conversion is in a c:\ebooks folder.

I have tried searching for the idiot's guide to this difficulty, but with no success, so if anyone is willing and able to help an idiot...
Derek R is offline   Reply With Quote
Old 02-17-2012, 07:41 PM   #2
susan_cassidy
Wizard
susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.
 
Posts: 1,954
Karma: 1726558
Join Date: Jan 2009
Device: Kindle, iPad (not used much for reading)
Per the instructions in the kindlegen README file:

KindleGen for Windows (XP, Vista, 7):
1. Download the KindleGen zip file from www.amazon.com/kindleformat/kindlegen to the desktop.
2. Right-click the zip file, select Extract All, and enter the folder name as c:\KindleGen.
3. Open a command prompt by selecting Start menu > All Programs > Accessories > Command Prompt.
4. Type c:\KindleGen\kindlegen. Instructions on how to run KindleGen are displayed.
5. Conversion Example: To convert a file called book.html, go to the directory where the book is located, such as cd desktop, and type c:\KindleGen\kindlegen book.html. If the conversion was successful, a new file called book.mobi displays on the desktop.
6. Please note: it is recommended to follow these steps to run KindleGen. Double-clicking the KindleGen icon does not launch this program. Run the above commands without quotes. If you drag and drop a file on the kindlegen executable it will convert the file for you, but you will not be able to capture the output logging, so this is also not recommended.
susan_cassidy is online now   Reply With Quote
Old 02-17-2012, 08:06 PM   #3
Derek R
Connoisseur
Derek R began at the beginning.
 
Derek R's Avatar
 
Posts: 87
Karma: 20
Join Date: Jun 2011
Location: County Down, Northern Ireland
Device: none
Thanks, Susan. I did read that - several times, in fact - but I was still at a loss. I eventually found this page which was a bit more expansive:

http://www.helenhanson.com/kindle-fo...-exe-–-part-6/

I have now managed to get Kindlegen to run and produce a .prc file. However, although I put the file to be converted on to the desktop I could not find the .prc file there, so I had to run a search for it, and found it in My Documents\My Publications. Is there any way of altering where the output is saved to?
Derek R is offline   Reply With Quote
Old 02-17-2012, 08:21 PM   #4
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,979
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3 and Fire
Quote:
Originally Posted by susan_cassidy View Post
4. Type c:\KindleGen\kindlegen. Instructions on how to run KindleGen are displayed.
What I tend to do is to copy the files associated with the commands I want to run into the ebook directory. In this case:

a) Using normal Windows mouse-based copying, make a copy of kindlegen (kindlegen.exe) in the target folder, i.e. in c:\ebooks. While there, copy the folder location to the clipboard.

b) Open the Command Prompt (Windows Command Processor). One easy way is to type cmd into Start -> "Search programs and files". I use this often enough that I pin Windows Command Processor to my start menu.

c) Goto (cd) the target folder:
Code:
cd c:\ebooks
Type cd <space> and then right click and select paste if you have the folder location on the clipboard.

d) Issue the command you want to run:
Code:
kindlegen ebook_name.htm -c1 -o ebook_name.mobi
This works because the command processor typically searches the current folder for the command you are using. The command processor does filename completion, so type part of the name and hit <tab> to get the rest (if it can be uniquely detected).

Since you are running this in the target folder, the output file is in that folder as well.
wallcraft is offline   Reply With Quote
Old 02-17-2012, 08:23 PM   #5
Derek R
Connoisseur
Derek R began at the beginning.
 
Derek R's Avatar
 
Posts: 87
Karma: 20
Join Date: Jun 2011
Location: County Down, Northern Ireland
Device: none
Apologies, it did save to the desktop as a .mobi
Derek R is offline   Reply With Quote
Old 02-17-2012, 08:30 PM   #6
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,979
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3 and Fire
The Kindle Previewer can be used as a GUI interface to kindlegen. Just open an .htm or .opf or .epub in Kindle Previewer and it will convert it to .mobi (i.e. it calls kindlegen for you).
wallcraft is offline   Reply With Quote
Old 02-17-2012, 08:40 PM   #7
Derek R
Connoisseur
Derek R began at the beginning.
 
Derek R's Avatar
 
Posts: 87
Karma: 20
Join Date: Jun 2011
Location: County Down, Northern Ireland
Device: none
Thank you very much for the reply, wallcraft - I believe I know what to do now. Presumably -c1 -o means 'convert to' or 'output as' or something along those lines?
Derek R is offline   Reply With Quote
Old 02-17-2012, 08:45 PM   #8
Derek R
Connoisseur
Derek R began at the beginning.
 
Derek R's Avatar
 
Posts: 87
Karma: 20
Join Date: Jun 2011
Location: County Down, Northern Ireland
Device: none
P.S. I have just successfully used the Kindle Previewer for conversion as you suggested. Thank you again for your help!
Derek R is offline   Reply With Quote
Old 02-18-2012, 01:52 AM   #9
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 7,284
Karma: 20065712
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International & Sony PRS-T1 & BlackBerry PlayBook
Quote:
Originally Posted by Derek R View Post
Presumably -c1 -o means 'convert to' or 'output as' or something along those lines?
The -c options are for compression settings. -c2 gets you the smallest file size, -c0 is no compression and useful for debugging a build gone wrong without having to wait the extra time it takes a file to compress.
ATDrake is online now   Reply With Quote
Old 02-18-2012, 10:53 AM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,539
Karma: 44002482
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Just a quick addition:

After extracting the exe to c:\kindlegen (or whatever), I've found it's quite handy to add that folder to your PATH. That way you can easily cd into any directory and run kindlegen with no preceding path and without any file copying. That also allows me to rename the executable and easily run multiple versions (for debug purposes when kindlegen gets updated).
DiapDealer is offline   Reply With Quote
Old 02-19-2012, 01:48 AM   #11
osnova
Kindler of the Flame
osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.
 
osnova's Avatar
 
Posts: 583
Karma: 646016
Join Date: Oct 2009
Location: US of A
Device: K DX,3,KT,KP,KF, KFHD; Nook C, PRS600, iPad, Xoom, N900, N810, Zaurus
I am still using Mobipocket Creator (it's GUI based) with manual .opf and toc.ncx files. Kindlegen adds the source files inflating the file size. I use kindlegen only when the toc.ncx is too big for Mobipocket Creator (it has a limit).
osnova is offline   Reply With Quote
Old 03-17-2012, 09:13 PM   #12
AThirstyMind
A Thirsty Mind
AThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with others
 
Posts: 81
Karma: 2546
Join Date: May 2011
Location: Lubec, Maine
Device: Kindle Fire, iPad, iPhone
I'm probably way behind the discussion, but I just got the Kindlegen instructions, and am baffled. I realize the KF8 can let me do lots more than mobi/prc does. But I'm just converting novels, nothing fancy, one font throughout usually, no images except small excerpt cover images and some flourish images. The books I convert and preview on both Kindle Previewer as well as on my Kindle Fire, look fine using MobiPocket. Do I HAVE to use Kindlegen at all? At least until my clients want to do more complex books.
AThirstyMind is offline   Reply With Quote
Old 03-19-2012, 11:54 AM   #13
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,539
Karma: 44002482
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by AThirstyMind
Do I HAVE to use Kindlegen at all? At least until my clients want to do more complex books.
Of course you don't HAVE to. Use calibre, use MobiPocket Creator, use whatever you like. Just realize that it's probably a good idea to have a little bit of experience manipulating the CSS to accommodate both the old-style MOBI and the new KF8 formats BEFORE a client drops a bomb in your lap.
DiapDealer is offline   Reply With Quote
Old 03-19-2012, 12:45 PM   #14
Oldpilot
Groupie
Oldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with others
 
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
Quote:
Originally Posted by AThirstyMind View Post
Do I HAVE to use Kindlegen at all?
I don't! But then I am only working for myself; I don't have any clients. No one has yet complained that my books lack an NCX file. When they do, or when Amazon actually enforces the requirement, I will face up to the task. For now I'm having too much fun getting new books up there.
Oldpilot is offline   Reply With Quote
Old 03-20-2012, 04:39 AM   #15
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,663
Karma: 15346071
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
I'd also note that any prc files, or mobis made with older versions of KG, will not produce the "MasterMobi" file needed to make use of the Fire's abilities. When you drop a prc file on KDP, it will stay a prc file, in essence (yes, it will crunch into azw, but it won't be a MasterMobi).

What it does mean is that your books shan't be Fire-optimized, which also means that you might get unexpected results when the books are loaded onto the Fire. We gen our books from ePUBs, but we test every single book, practically page-by-page, because we've had some highly unexpected results from ePUBs run through the Fire, and we've also had unexpected results from "regular" mobi's/prc's that were made pre-K8.

Lastly, FWIW, aside from the Previewer GUI interface, I'd also note that instead of screwing around with the CL, you can simply take an OPF, or ePUB, or html file, etc., and literally DRAG AND DROP it on the KindleGen.exe program icon in the directory in which it is installed, and it works perfectly. ;-)

HTH,
Hitch
Hitch is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre Content Server - Basics ddjohn Calibre 9 12-16-2011 11:02 PM
Basics on Droid Apps for NC JonnyG Nook Developer's Corner 8 02-14-2011 11:39 PM
Troubleshooting TOC fails in Kindlegen 1.1, not Kindlegen 1.0 cyberbaffled Amazon Kindle 3 12-25-2010 06:21 PM
K3 plugboard basics jackie999 Calibre 13 12-13-2010 04:48 AM
Conversion Basics Help raggedpelicanllc Workshop 2 10-22-2010 04:17 PM


All times are GMT -4. The time now is 10:56 PM.


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