In class assignment, 8/29 Homework due on 9/3: Create EPUB file from your HTML file
|August 29, 2013||Posted by johnmjones under Uncategorized|
After we have discussed the various parts of an EPUB package (the final, zipped EPUB file), follow the directions below to turn your HTML file into an EPUB.
(Note: from this point on, we will be working with multiple files in the specific folder structure required by the EPUB format. To make this feasible, you must begin using either a USB drive or a service like Dropbox to access your files in class.)
To convert your HTML file into an EPUB:
- Download the example EPUB files here. Unzip the folder.
- Copy your files (HTML, CSS, image and video) into the OEBPS folder
- Add the XHTML header to your HTML file.
- It is now an XHTML file. Change the file extension to .xhtml.
- Make sure that the name of the CSS file in the new header matches the name of your CSS file
- Delete any duplicate entries of <HTML>, <head> or <body>
- Edit the content.opf file
- Change meta info (see the notes in the <!–comments–>)
- Get at UUID and paste it into the file
- Google “Get a UUID”
- Get it
- Edit the manifest to add your files
- Change the href entry for the CSS file so that it matches the name of your CSS file
- Change the href for the “book” entry so that it matches the name of your XHTML file
- Create manifest entries for all of the files associated with your XHTML file, including the image file(s) and video (MIME types for image formats can be found here; MIME types for video formats can be found here)
- Add your XHTML file to the spine (just the XHTML file; only XHTML files are listed in the spine)
- Edit the toc.ncx file
- Paste in your UUID from the content.opf file
- Add book title
- Add TOC entry or entries for the files in your book
- On the Mac: You can zip your EPUB by selecting the mimetype file and the META-INF and OEBPS folders, then right click on all three and select Compress. This will create a file with the extension .zip.
- On Windows: Select the mimetype file and the META-INF and OEBPS folders, then right click on all three and select Send To, and then click Compressed (zipped) Folder.
- Rename the zip file, changing the extension to .EPUB
- Open your EPUB in Calibre and Adobe Digital Editions to see if it displays correctly
- Note: the online validator will only accept files that are smaller than 10MB. If your video is larger than 10MB, you should either replace it with a smaller video for testing purposes or remove it from the file so you can see how the validator works.
- Another note: you will get an error from the validator that refers to the placement of the mimetype file. This is a product of how we zipped the files that we will address later; for now, your EPUB should work. You may also get errors about not having declared files in your manifest. If those files have odd characters in their name like “._” that you didn’t put there, you can ignore them.