View Single Post
Old 04-14-2009, 02:59 PM   #1
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
on-the-fly epub creation

Need some (major) help...

I have a modified PHP script (based on FLAG) that dynamically creates a Stanza catalog for my favorite FanFiction.Net categories. It basically allows me to browse FanFiction.Net in real-time and creates epub-format ebooks on the fly using Calibre for reading in Stanza iPhone. The script currently runs on my Windows PC running XAMPP.

I have a shared Linux hosting account on 1and1 and I wish to upload the script there. My current dilemma is the epub creation part. I'm currently researching what methods I can use to create epub files using utilities/etc already installed or are user-installable on the shared account. The Linux host has Perl, Python and PHP installed and the operating system is CentOS, iirc.

Options I'm considering:
  1. Install Calibre on Linux Host
    Pros:
    • no changes to the PHP script required
    Cons:
    • no idea how to do this or if it's even feasible
  2. BookGlutton API
    Pros:
    • seems like this might be the easiest to implement
    Cons:
    • dependent on another website
    • don't know how I'm supposed to handle the post request
  3. DocBook+XSLT
    Pros:
    • seems like the dependencies should already be installed or are user-installable (no admin rights required)
    Cons:
    • don't know a thing about docbook
    • don't know a thing about xslt
  4. Code my own PHP script to create epubs
    Pros:
    • highly customizable
    Cons:
    • I might be able to finish this in 2 years if I'm lucky
Right now, I'm thinking using the BookGlutton API might be the best option for me (unless, of course, it's possible to install Calibre or at least html2epub on a shared host). I'm just not sure how I'm supposed to handle the post requests via PHP. Currently, I have an epub.php script that calls html2epub and returns the epub file. I guess I could modify this to send a post request to BookGlutton instead. I just don't know how, particularly the part where you upload the html file.

Anyway, not really looking for a discussion on the merits of the different methods. Just asking for help on the how. If you know of another way to do this (preferably something even an inexperienced coder can do), please post it here.

Thanks!
ilovejedd is offline   Reply With Quote