View Full Version : A program for converting HTML pages into EPUB on a server side

09-28-2012, 09:28 AM
I need a program which would be able to convert HTML pages into EPUB file on a server side on the fly. I guess the program I'm looking for is same or similar what these online epub converters use. Can you give me a hint where to start?

09-28-2012, 04:27 PM
If you are in a linux environment, epubs can be zipped from the command line or in bash:
zip -X0 "../$folder.epub" "mimetype"
zip -X9r "../$folder.epub" "META-INF"
zip -X9r "../$folder.epub" "OEBPS"

where $folder is a parameter in the bash script. Adjust the paths to your own folder structure. You first have to make the OEBPS folder with the html files (can be fetched from the internet using wget) and content.opf and toc.ncx, which can be created from the command line.

If you want to generate your own .ops and -ncx file you simply use something like this in your script:

"string to write to file" > content.opf

But if you're looking for a finished program to do it for you, I really have no idea. But it's possible to do it all from the command line or a bash script

09-28-2012, 05:08 PM
I forgot to mention eCub (see link here ( eCub seem to have a command line interface to be run from a terminal or bash script after you have downloaded your html files

09-28-2012, 05:14 PM
I believe some sites use Calibre in some form...

09-28-2012, 05:28 PM
Something along these lines may or may not be what you are looking for:

09-29-2012, 06:40 AM
I think you may mean this Epub creator?
support HTML input and get epub files.

09-29-2012, 11:59 AM
i really like dotepub mentioned above. is another but i haven't really tried it out. think there's a few more available as chrome extensions