[pmwiki-users] pmwiki to epub ebooks
john.rankin at affinity.co.nz
Mon Mar 10 19:44:14 CDT 2014
On 11/03/14 7:58 AM, Oliver Betz wrote:
> John Rankin wrote:
>> Is this of interest to others and if so, would anyone like to help test
>> it? In particular, the CSS needs testing and refining with a range of
> ys, I'm alsways looking for an "offline" version of my personal wiki.
Initial results are looking good, given the constraints of epub and
current epub readers.
>> inputs. Testers would need:
>> - time and patience (it's experimental and not as plug-and-play as one
>> would like)
>> - calibre <http://manual.calibre-ebook.com/cli/ebook-convert.html> (it
>> uses the ebook-convert command line capability)
> calibre on the server? I would prefer all the processing on the
That is an interesting thought. I did it on the server within pmwiki so
I can generate an epub from any computer with access to the site, and
store it in the wiki. The epub standard essentially defines a fully
self-contained web site, stored as a zip archive. I use pmwiki's uploads
directory to store the epub (and various temporary files).
The way Calibre works presented a few problems, which would need to be
considered for a client-side solution. For example:
- use php's get function to retrieve all the images and make temporary
- modify the html pmwiki generates to reference the relative paths to
these (Calibre ignores url references)
- get and make a temporary local copy of the css file (you have to pass
the css path as a parameter)
It would be possible to write a php implementation of epub conversion as
a pmwiki recipe (replicating Calibre's ebook-convert functionality), but
this is beyond my capabilities.
How did you envisage a client-side solution would work? For example, the
recipe could easily generate suitable html, which you could save for
further local processing. I do this for testing the skin and css anyway.
What for you are the advantages of a client-side solution?
More information about the pmwiki-users