Once you have completed and validated your HTML (e.g. with the W3C Markup Validator) you are ready to see what it would look like on an e-reader.
Using ebookmaker to create the e-reader versions
It is important to use ebookmaker, rather than another tool, to convert your HTML to epub and mobi/Kindle formats. This is because it is ebookmaker that will be used at PG for conversion once your book is submitted.
- Zip just your HTML file and your images folder (not your text files or .bin files) into a zip file.
- Go to the PG Online Ebookmaker webpage.
- Below the "Quick Start" heading, click the Choose File button, locate and select your zip file.
- You don't need to complete the other fields.
- Click the "Make it!" button.
- Wait - if you have a large images folder, it may take a while - until you hopefully get "ebookmaker ended with a successful exit code".
- Click on the temporary link (it will look something like: http://ebookmaker.pglaf.org/cache/12345678901234).
- On the "Index of cache" that shows next, click "10001-images-epub.epub" and save it to your computer, then repeat for "10001-images-kindle.mobi" if required.
- Either transfer the appropriate file to the appropriate e-reader, or open with an epub or Kindle viewer on your computer (see below).
On your computer
Note: It is not recommended to use the out-of-date version of epubmaker (former name for ebookmaker) that is included with Guiguts 1.0.25, but the instructions are still included at the bottom of this section.
Getting the latest version of ebookmaker for Windows
Note: Linux instructions can be found in the ebookmaker readme file.
Only do this if you are confident with using the Windows command line, and have suitable backups or the ability to restore things should they go wrong. If not, it is recommended that you use ebookmaker online.
Note: You do not need to download ebookmaker before starting these instructions - that will happen during the steps below.
- Install Python 3.6+ from python.org.
- Add system environment variable: Right-click "My Computer", then Properties, then Advanced, then Environment variables, then New. Call the variable PYTHON_HOME, and set it to the Python folder.
- Also edit the PATH variable (not PYTHON_HOME) and add to the end of it
- Check by starting a new command window and typing
pythonIt should run your version of Python. Quit python with
- Install HTML Tidy if you don't have it already. It doesn't come preinstalled on Windows, but if you have Guiguts installed, you should find it in a folder such as
C:\DP\guiguts-win\tools\tidyAdd its foldername to the PATH variable as you did in step 3. Do the same for Kindlegen.
- In command window, type
pip3 install --user pipenvScript may warn it has put scripts into a folder such as
C:\Users\myname\AppData\Roaming\Python\Python37\Scriptsand to add this to the PATH environment variable. Do this as you did in step 3 – don't forget the semicolon before the new folder name!
- Close old command window and start a new (to get the new path)
- Create a folder for ebookmaker, e.g.
- In command window, go to the new folder
pipenv install ebookmakerThis takes a while to install (at least a few minutes - reported by one user to be 30 minutes). It will also create a "virtual environment", with a new folder, something like
- Look in
C:\Users\myname\.virtualenvs\and find the name of your virtualenv - it should be something like
pipenv run python C:\Users\myname\.virtualenvs\<name of virtualenv>\Scripts\ebookmaker --versionto check ebookmaker version.
Running downloaded ebookmaker from within Guiguts
- Create a batch file run_ebookmaker.bat in your c:\dp\ebookmaker folder containing the following two lines (Note the second line (pipenv...%3) is quite long and may be wrapped below. Ensure it is all on one line in your .bat file) - change <name of virtualenv> to the name of your virtual environment - see above:
pipenv run python C:\Users\myname\.virtualenvs\<name of virtualenv>\Scripts\ebookmaker -v --make=epub.images --make=kindle.images --output-dir=%1 --title=%2 %3
- Setup run_ebookmaker.bat as an "external operation" within Guiguts (in the Custom menu):
c:\dp\ebookmaker\run_ebookmaker.bat $d. $f $d$f$e
Under some setups it may be necessary to use:
start c:\dp\ebookmaker\run_ebookmaker.bat $d. $f $d$f$e
- When editing an HTML file, make sure you save it then, choose the ebookmaker external operation from the Custom menu.
Old instructions - no longer recommended
These instructions are for version 1.0.25 of Guiguts running under Windows. If someone has experience of using this on other platforms, please edit or add to them.
- Make sure your HTML filename does not have hyphens or spaces in it
- Open your HTML file in Guiguts
- In the "Tools" menu (or "Fixup" under the old menu structure), find "RST Tools", then select "EpubMaker (all formats)".
- Check the black command line window - it should say "Beginning epubmaker" and tell you that the files will be created in the same folder as your HTML file, with a further note that it is running in the background with no messages that processing is complete. There may be other warnings or errors. You may have to determine by trial and error which are significant - it's quite likely you can ignore references to PDFWriter and RSTWriter.
- After a few seconds look in the output folder for files called "No title.images.epub" and "No title.images.kindle". If you don't see one of these, and instead you see files including the string "kindlegen", then epubmaker hasn't finished, and you should wait a few more seconds.
- Rename the second of these to "No title.images.mobi" (ignoring the warning about changing a file extension).
- Either transfer the appropriate file to the appropriate e-reader (epub to epub reader, or mobi to Kindle), or open with an epub or Kindle viewer on your computer (see below).
I don't have an e-reader!
All is not lost! You can download an epub or Kindle viewer to use on your computer.
The Adobe Digital Editions software for PC or Mac displays epubs in just the same way as many epub viewers. If it looks fine in ADE, it will most likely be fine for the majority of epub-based ereaders.
To view the Kindle file, the best option appears to be the Kindle Previewer which allows you to see how the book will appear on a range of different Kindles. Amazon also have Kindle viewers for a range of platforms, including PC and Mac as well as iPad, Android, etc.
For volunteers using Linux the best Previewer seems to be Calibre, the free Linux download is at http://calibre-ebook.com/download_linux although it is also available for Windows and Mac.
Warning! Browser add-ons, extensions or plug-ins, e.g. EPUBReader for Firefox, are not the best way to view epubs. They may display the epub quite differently to what you would see on an e-reader, masking any issues.