Skip to content

Commit

Permalink
Merge branch '4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Grandt committed May 14, 2015
2 parents a4bf4fd + 6d5479e commit 0321a8b
Show file tree
Hide file tree
Showing 48 changed files with 7,931 additions and 3,749 deletions.
266 changes: 0 additions & 266 deletions EPub.HtmlEntities.php

This file was deleted.

782 changes: 0 additions & 782 deletions EPub.NCX.php

This file was deleted.

1,226 changes: 0 additions & 1,226 deletions EPub.OPF.php

This file was deleted.

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions README

This file was deleted.

74 changes: 74 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# PHP ePub generator

PHPePub allows a php script to generate ePub Electronic books on the fly, and send them to the user as downloads.

PHPePub support most of the ePub 2.01 specification, and enough of the new ePub3 specification to make valid ePub 3 books as well.

The projects is also hosted on PHPClasses.org at the addresses:
http://www.phpclasses.org/package/6115

PHPePub is meant to be easy to use for small projects, and still allow for comples and complete e-books should the need arise.

The Zip.php class in this project originates from http://www.phpclasses.org/package/6110

or on Github: git://github.com/Grandt/PHPZip.git

See the examples for example usage. The php files have "some" doumentation in them in the form of Javadoc style function headers.

## Installation

### Import
Add this requirement to your `composer.json` file:
```json
"grandt/phpepub": ">=4.0.0"
```

### Composer
If you already have Composer installed, skip this part.

[Packagist](https://packagist.org/), the main composer repository has a neat and very short guide.
Or you can look at the guide at the [Composer site](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx).

The easiest for first time users, is to have the composer installed in the same directory as your composer.json file, though there are better options.

Run this from the command line:
```
php -r "readfile('https://getcomposer.org/installer');" | php
```

This will check your PHP installation, and download the `composer.phar`, which is the composer binary. This file is not needed on the server though.

Once composer is installed you can create the `composer.json` file to import this package.
```json
{
"require": {
"grandt/phpepub": ">=4.0.0"
"php": ">=5.3.0"
}
}
```

Followed by telling Composer to install the dependencies.
```
php composer.phar install
```

this will download and place all dependencies defined in your `composer.json` file in the `vendor` directory.

Finally, you include the `autoload.php` file in the new `vendor` directory.
```php
<?php
require 'vendor/autoload.php';
.
.
.
```

## TODO:
* The goal being to encompass the majority of the features in the ePub 2.0 and 3.0 specifications, except the Daisy type files.
* Add better handling of Reference structures.
* Improve handling of media types and linked files.
* A/V content is allowed, but definitely not recommended, and MUST have a fallback chain ending in a valid file. If no such chain is provided, the content should not be added.
* Documentation, no one reads it, but everyone complains if it is missing.
* Better examples to fully cover the capabilities of the EPub classes.
* more TODO's.
7 changes: 6 additions & 1 deletion REVISION.TXT
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---------------------------------------------------------------------
Rev. 4.0.0 - 2015-04-29
* Added: Support for resizing animated gifs for use in ePub3 books.
* Added: Function to remove HTML comments.
* Changed: Now using composer. Structure and layout changed accordingly.
---------------------------------------------------------------------
Rev. 3.20 - 2014-01-01
* Fixed: Issue #15, where name space declarations were erroneously stripped off the html tag of added chapters.
* Fixed: An issue, where PNG images exceeding the maximum specified sizes were broken during resizing.
Expand Down Expand Up @@ -145,4 +150,4 @@ EPubChapterSplitter Class:
* Added: Split HTML files by search string, for instance chapters. Note, chapter search disables size checks. Returned chapter have the matched line from the HTML returned as the key of the returned array. This can be used to generate the correct chapter name entry in the book, see the updated EPub.Example1.php.
---------------------------------------------------------------------
Rev. 1.00
Initial release
Initial release
Loading

0 comments on commit 0321a8b

Please sign in to comment.