Last Modified 2022.2.8
How to make an EPUB ebook with Eclipse
Create Static Web Project
Change WebContent to OEBPS
[Optional] Change to Static Web Perspective
Create folders and files that make up EPUB
Refer to the How to make EPUB ebook and create the files in the directory structure below.
MyFirstBook (ROOT Directory)
├── mimetype
├── META-INF
│ └── container.xml
└── OEBPS
├── content.opf
├── toc.ncx
├── css
| └── epub.css
├── images
| └── cover.jpg
└── xhtml
├── cover.xhtml
├── preface.xhtml
├── ch01.xhtml
└── ch02.xhtml
Configure Eclipse to edit the content.opf in an XML editor
Input *.opf
Configure Eclipse to edit the toc.ncx in an XML editor
Input *.ncx
Create a script to create and check the EPUB file in Linux
Create the following file in the root directory. --Modify the last line of epubcheck.jar and MyFirstBook.epub file paths to suit your environment--
makebook
#!/bin/sh rm MyFirstBook.epub zip -0Xq MyFirstBook.epub mimetype zip -Xr9Dq MyFirstBook.epub META-INF OEBPS java -jar /home/kim/epubcheck-4.2.2/epubcheck.jar /home/kim/EPUB/MyFirstBook/MyFirstBook.epub
Set up the makebook to run on a Linux system.
External Tools Configurations
Run MyFirstBook
See MyFirstBook Result.
Create a script to create and check EPUB in Windows
Create a makebook.bat file in the root directory. --Modify the last line of epubcheck.jar and MyFirstBook.epub file paths to suit your environment--
makebook.bat
del MyFirstBook.epub zip -0Xq MyFirstBook.epub mimetype zip -Xr9Dq MyFirstBook.epub META-INF OEBPS java -jar C:/epubcheck-4.1.1/epubcheck.jar C:/EPUB/MyFirstBook/MyFirstBook.epub
Refer to the Linux configuration above and set it as follows.
MyFirstBook Result