Using Scrivener to Compile for Kindle

li
lissie
Posts: 20
Joined: Thu Jun 30, 2011 11:41 pm
Platform: Windows

Wed Nov 23, 2011 1:35 am Post

I can't get the compile for ebook/Kindle option to work. I've downloaded Kindlegen and placed the exe file in the scrivener program directory.

When I try to run compile - I get an error telling me to install Kindlegen as per the instructions in the "compile dialogue" - as that's the only dialogue I'm getting I don't know where to tell Scivener to find KG - which is why I just dropped it in the same directory.

Any ideas - I'm running Windows 7 , Scrivener 1.0.2 and whatever KG version win32_v_1.2

Any ideas?

jr
jravan
Posts: 212
Joined: Fri Apr 08, 2011 2:15 pm
Platform: Windows

Wed Nov 23, 2011 3:49 am Post

I haven't tried Kindlegen yet because I'm not doing ebooks at the moment, but I did just download the .zip file, and it contains a Readme.txt file. Did you read it? It says the following, which might help you:

Instructions for use:
---------------------

KindleGen for Windows:
1. Download the KindleGen zip file to your PC on your Desktop.
2. Extract it to 'c:\KindleGen'
3. Open a command prompt; this can be done from the Start menu > All Programs > Accessories > Command Prompt -- alternatively, you can go to your Start menu in Windows and choose 'Run' and then type 'cmd'. This will open a black command prompt window.
4. Type 'c:\KindleGen\kindlegen'
5. You will see instructions on how to run KindleGen.
6. To convert a file called book.html, go to the directory where the book is present, eg. 'cd Desktop' and type 'c:\KindleGen\kindlegen book.html' and if successful, you will see a successful conversion and a new file on your Desktop called book.mobi.

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.

KindleGen for Linux:
1. Download the KindleGen tar.gz to your PC in a location such as your home (~) directory.
2. Extract it under '~/KindleGen'
3. Open a command prompt and type '~/KindleGen/kindlegen'.
4. You will see instructions on how to run KindleGen.
5. To convert a file called book.html, go to the directory where the book is present, eg. 'cd Desktop' and all you have to do now is type '~/KindleGen/kindlegen book.html' and if successful, you will see a successful conversion and a new file on your Desktop called book.mobi.

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.


KindleGen for Mac:
1. Download the KindleGen.zip to your Mac in a location such as your home (~) directory.
2. Unzip it under '~/KindleGen'
3. Open a command prompt and type '~/KindleGen/kindlegen'.
4. You will see instructions on how to run KindleGen.
5. To convert a file called book.html, go to the directory where the book is present, eg. 'cd Desktop' and all you have to do now is type '~/KindleGen/kindlegen book.html' and if successful, you will see a successful conversion and a new file on your Desktop called book.mobi.

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.

li
lissie
Posts: 20
Joined: Thu Jun 30, 2011 11:41 pm
Platform: Windows

Wed Nov 23, 2011 4:10 am Post

I'm not running Kindlegen - Scrievener requires it to be installed to run the compile function for Kindle - that's what I'm asking about

jr
jravan
Posts: 212
Joined: Fri Apr 08, 2011 2:15 pm
Platform: Windows

Wed Nov 23, 2011 7:29 am Post

Sorry, I'm not being clear. You are not running Kindlegen yourself, but Scrivener needs to be able to run Kindlegen. So probably, it would help to install Kindlegen as outlined in the Readme.txt file above. Then Scrivener's Kindle compile feature might start working.

Step 2 seems to be crucial. I bet Scrivener is counting on Kindlegen being in 'c:\KindleGen' as specified in that step. You said you placed Kindlegen in the Scrivener directory, not in 'c:\KindleGen'. If Scrivener expects Kindlegen to be in 'c:\KindleGen', then that might be the reason Kindle compilation doesn't work for you.

I'd suggest trying to extract the .zip file into the directory mentioned in Step 2. I expect Scrivener is trying to execute a command like the one in Step 6: 'c:\KindleGen\kindlegen book.html'. That command expects the kindlegen program, which is the first string on the line (after the blank is the name of the file to be compiled), to reside in the directory 'c:\KindleGen\'.

li
lissie
Posts: 20
Joined: Thu Jun 30, 2011 11:41 pm
Platform: Windows

Wed Nov 23, 2011 9:05 am Post

Ah I understand - good thought - but no it didn't work -Scrivener still can't find it - it seems odd that there is not step to tell Scrivener where to find KG

Co
Columbus Smith
Posts: 1
Joined: Wed Dec 07, 2011 4:33 am
Platform: Windows

Wed Dec 07, 2011 4:39 am Post

I just did this. The step you are missing is after you extract kingen to your machine, you have to point Scrivener to where it is located the first time. After that it works great. This was one of the features that prompted me to purchase another piece of writing software. :wink:

li
lissie
Posts: 20
Joined: Thu Jun 30, 2011 11:41 pm
Platform: Windows

Wed Dec 07, 2011 7:12 am Post

And how do you do that ? That's exactly the bit that is missing?

jr
jravan
Posts: 212
Joined: Fri Apr 08, 2011 2:15 pm
Platform: Windows

Wed Dec 07, 2011 9:35 am Post

Well, I have never tried to compile my WIP as a .mobi file. But I selected the mobi format in the Compile dialog and was presented with this message:

KGRequest.jpg
KindleGen Request Dialog
KGRequest.jpg (17.59 KiB) Viewed 1741 times

When I clicked "OK", the Compile dialog window now said the following:

KGCompile.jpg
Compile Dialog requesting KindleGen
KGCompile.jpg (48.04 KiB) Viewed 1741 times

Did you not receive this dialog at least once when you tried a mobi format compile? That would obviously be a bug.

Note the select list on the left starting with "Contents." Its last item is "KindleGen" and that item has been selected by Scrivener (that is, I didn't select it). You should be able to bring up this KindleGen page of the Compile interface anytime you would like by selecting the mobi format as the target of "Compile For:." This should cause the "KindleGen" item to appear in the selection list. Then click on "KindleGen." Clicking the "Choose..." button (scroll the above picture until you can see it) will lead you to a standard file selection dialog. I think all you have to do at that point is navigate to wherever you installed KindleGen, select the kindlegen.exe file and click "Open."

li
lissie
Posts: 20
Joined: Thu Jun 30, 2011 11:41 pm
Platform: Windows

Thu Dec 08, 2011 7:27 am Post

I['m travelling at the moment so cant try this for real - but I've never seen the 2nd screen - I got the first one - installed kindlegen - re-started scrivenier - and still got the first screen.

I am using the Windows version -I'm wondering if its just not been implemented in Windows?

jr
jravan
Posts: 212
Joined: Fri Apr 08, 2011 2:15 pm
Platform: Windows

Thu Dec 08, 2011 7:59 am Post

I'm using Windows as well.

And I think you will keep getting the first dialog ("KindleGen Not Found") until you do what that dialog says.

When you select mobi as the format you wish to output, look at the Compile dialog. You should see the option "KindleGen" in the list in the Compile dialog's left hand pane. If you don't see the "KindleGen" item in the left hand pane when mobi is your selected output format, that's a bug. Cick on "KindleGen" in that left hand pane.

When you click on "Kindlegen", you will see the dialog that allows you to find where you installed kindlegen.exe fill the right hand side of the Compile dialog. That's the second of the two dialogs I posted above--the one you should see when you click "KindleGen" in the left hand pane. Then just click "Choose" in that dialog and go find kindlegen.exe using the file selection dialog that pops up. When you find it, click "Open."

li
lissie
Posts: 20
Joined: Thu Jun 30, 2011 11:41 pm
Platform: Windows

Tue Dec 20, 2011 2:19 am Post

OK I finally figured it out - 2 get the 2nd screen you posted - you don't hit OK (as you'd expect) - you hit the blue down button on the right - and then all is good cause you can set up the location of kindlegen and the rest of the compile functions!