
On 10/4/2011 2:51 PM, Bowerbird@aol.com wrote:
i'm not going to show how to generate the .ncx and .opf files. that's because it cost me days and days of time and frustration to find out just exactly what was required in these stupid files.
I, however, am not so parsimonious. For slightly over the past year I've been working on a program that can be used to compile all the parts of an ePub file. I've finally gotten to the point where I'm willing to let other people see what I have created. On Oct 7, 2011 I registered the project "ePubEditor" with SourceForge.net, and uploaded all my code there (http://epubeditor.sourceforge.net/). ePubEditor allows a person to create a new electronic publication, then add HTML, JPEG, and other OEB "core" media type files to the ePub's manifest. Once "manifested," these files can be added to the reading order of the publication (the content, or "spine") where the content can be reordered. Metadata such as author identities and subject matter identifiers can be added, and the compiled document can be saved as an ePub. ePubEditor includes some minimal editing functions, such as the ability to globally replace one HTML element with another, or insert new HTML elements. It also can trigger a "clean" function, that runs XSL transformation scripts against the entire publication content; the XSL files themselves are named after the publication publishers, and can be added and edited by the user. ePubEditor can build an HTML Table of Contents according to user-specified HTML elements, and can generate an ePub 2.x .ncx file based upon an HTML Table of Contents. ePubEditor can generate a report of all styles used in a publication, excluding those set in the ursers own CSS file, and can also invoke the epubchecker program to check the ePub before it is generated. From the Manifest view large HTML files can be split into multiple parts, and external editors can be invoked to edit any file in the manifest. ePubEditor is a Java "Swing" application, which means you must have the Java Runtime Environment version 1.5 or greater installed on your computer before it will run. It is officially classified as "pre-alpha" on the SourceForge web site, but that classification is probably generous. It /will/ run, but there is no guarantee that it will not crash. At the time of this writing, it is totally undocumented. Everyone is welcome to download and try the program. I will try to be responsive to questions so long as they are asked in a public forum such as this one. Feel free to enter bugs and RFEs at the SourceForge web site. I would welcome any help with the project, especially someone who might be willing to write some documentation.