View Single Post
Old 04-14-2011, 12:17 PM   #9
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 698
Karma: 150000
Join Date: Feb 2010
Device: none
OK, let's assume you have downloaded the KindleGen.zip file to your mac, and unzipped it into a directory called "KindleGen" in your home directory, just like the instructions said.

Let's further assume your nameofbook.html file is located in your Desktop folder.

Now, open Terminal.app, and you should be in your home directory. To verify this, type "pwd" at the prompt (without quotes, of course), hit return (<cr>), and you should see something like:

/Users/petercrowell

if your username is "petercrowell"

Now if you type "ls" at the prompt, and hit return you should see a listing of files and subdirectories within your home directory. Among those should be a directory called "KindleGen", which is where the kindlegen program resides, and one called "Desktop" which is where your nameofbook.html file resides. (If you installed kindlegen elsewhere, or your .html file elsewhere, adjust the pathnames in the following steps to match your actual situation.)

so now you need to change your working directory to the Desktop directory, by typing "cd Desktop" and hitting return. (Note: it's case-sensitive.)

Now if you type "pwd<cr>" you should see

/Users/petercrowell/Desktop

and if you type "ls<cr>" you should see a listing of all the files and directories on your desktop, among which should be "nameofbook.html".

Now we're ready for the big finish: At the command prompt, type

~/KindleGen/kindlegen nameofbook.html<cr>

and if all goes well you'll have a new file, nameofbook.mobi, in the Desktop directory and, thus, on your desktop.

Don't forget the "~" in the kindlegen command. The "~" is unix shorthand for your home directory, /Users/petercrowell/ in this example. So the complete command is actually

"/Users/petercrowell/KindleGen/kindlegen nameofbook.html"

Because you are in the same directory as nameofbook.html when you execute the command, you don't need to specify a full path to the input file -- just the filename iteself.

The output file will ALWAYS be put in the current directory -- i.e. the one where you were when you executed the command. I don't think you can specify an alternate path.

Hope this helps!
st_albert is offline   Reply With Quote