PHP Classes

Praise and feature request

Recommend this page to a friend!

      EPub  >  All threads  >  Praise and feature request  >  (Un) Subscribe thread alerts  
Subject:Praise and feature request
Summary:I love this script but would like to see an addition
Messages:7
Author:Andy Ward
Date:2011-03-29 17:40:14
Update:2011-04-14 05:55:40
 

  1. Praise and feature request   Reply   Report abuse  
Picture of Andy Ward Andy Ward - 2011-03-29 17:40:14
After looking around for something like this, I was thinking I would have to create something from scratch, then I found this project. Fantastic work, thank you very much.

If I were going to make an improvement in this script I would like to see something that handles audio and video files in much the same way that images are handled now.

Also a TOC, while not important in ePUB files, is important when I convert ePUB to mobi format. Therefore it would be a nice feature if I had the option of generating a TOC on the fly just like it creates the opf file.

  2. Re: Praise and feature request   Reply   Report abuse  
Picture of Asbjorn Grandt Asbjorn Grandt - 2011-03-29 17:52:13 - In reply to message 1 from Andy Ward
You can add audio and video with the $epub->addFile function.
But I guess you are after having the script generate the page containing the media as well?

ePub's are not really geared for multimedia, but I'll see what I can do.

As for the TOC, I'll see what I can do.

Cheers
A.Grandt

  3. Re: Praise and feature request   Reply   Report abuse  
Picture of Andy Ward Andy Ward - 2011-03-29 19:55:03 - In reply to message 2 from Asbjorn Grandt
What I was hoping for was support for inline media. So for example this tag inserted into my HTML should work in iBooks <audio src="../media/linda.mp3" controls="" preload="auto" autobuffer=""/>. The way your script works with images, using EXTERNAL_REF_ADD, works great for me, I just dump in the entire HTML page and EPub sorts out the images in there and adds them to the file. It would be great if it could do the same with inline audio and video files, the trouble is it doesn't add the audio file to the epub package.

I will see what I can do to write the function to handle these, then you can do with it as you please. I just hate to make too many alterations to your code, then when you release a new version I have to go through and make it all work again.

  4. Re: Praise and feature request   Reply   Report abuse  
Picture of Asbjorn Grandt Asbjorn Grandt - 2011-03-29 20:23:15 - In reply to message 3 from Andy Ward
Ok, I see what you mean. I'll have a look at it.

  5. Re: Praise and feature request   Reply   Report abuse  
Picture of Asbjorn Grandt Asbjorn Grandt - 2011-03-31 16:54:21 - In reply to message 4 from Asbjorn Grandt
I have a beta you might want to test out.

You can find it at http://www.grandt.com/ePub/EPub_php.txt

Just rename it back to EPub.php.
---
Changelog:
Rev. 2.05 - 2011-03-31
* Changed: referenced media now attemps to include audio and video.

* Added: function createTOC, to generate and add a Table of Contents to the book.

* Fixed: setCoverImage: The default assumption that filenames were absolute as seen from the document root was ... ill advised.

* Fixed: If the HTML added is not utf-8 the class could produce books which would fail with invalid encoding.

* Fixed: Cover page added to the Navigation Map, it shouldn't.

* Fixed: The Coverpage HTML generated by addCoverImage was not compliant with the XHTML 1.1 sppecification.

* Added: funciton addReferencePage. Reference pages is usually one or two pages for items such as Table of Contents, reference lists, Author notes or Acknowledgements. These do not show up in the regular navigation list.

* Added: Constants REFERENCE_* for use with the new addReferencePage.

* Changes: Code cleanup.

  6. Re: Praise and feature request   Reply   Report abuse  
Picture of Asbjorn Grandt Asbjorn Grandt - 2011-03-31 16:55:56 - In reply to message 5 from Asbjorn Grandt
Addendum: I have not tested the new media functions yet.

  7. Re: Praise and feature request   Reply   Report abuse  
Picture of Asbjorn Grandt Asbjorn Grandt - 2011-04-14 05:55:40 - In reply to message 6 from Asbjorn Grandt
Andy Ward, I posted an update and link some time ago, please respond if the beta solves your problems.