PHPackages                             hans-thomas/ashei - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. hans-thomas/ashei

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

hans-thomas/ashei
=================

ashei is an epub parser for php.

v1.0.0(2y ago)414↓100%MITPHPPHP ^8.1

Since May 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/hans-thomas/ashei)[ Packagist](https://packagist.org/packages/hans-thomas/ashei)[ RSS](/packages/hans-thomas-ashei/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Ashei
=====

[](#ashei)

[![ashei banner](assets/ashei-banner.png)](assets/ashei-banner.png)

[![codecov](https://camo.githubusercontent.com/5e392bb227687e8a572bcf19745840f208fb4e333887412ec2552c401dbd98ad/68747470733a2f2f636f6465636f762e696f2f67682f68616e732d74686f6d61732f61736865692f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d5831443649304a4c535a)](https://codecov.io/gh/hans-thomas/ashei)[![GitHub Workflow Status](https://camo.githubusercontent.com/0520be2c049813a8f811cd15d8dc30861e742915a18ce1425c672e8616115b9b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f68616e732d74686f6d61732f61736865692f7068702e796d6c)](https://camo.githubusercontent.com/0520be2c049813a8f811cd15d8dc30861e742915a18ce1425c672e8616115b9b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f68616e732d74686f6d61732f61736865692f7068702e796d6c)[![GitHub top language](https://camo.githubusercontent.com/652c7bd2c708bffeed63271d1b02badb2e6cfb9cc35f93d50739463e04738b49/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f746f702f68616e732d74686f6d61732f6173686569)](https://camo.githubusercontent.com/652c7bd2c708bffeed63271d1b02badb2e6cfb9cc35f93d50739463e04738b49/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f746f702f68616e732d74686f6d61732f6173686569)[![GitHub release (latest by date)](https://camo.githubusercontent.com/d63f674868b3c74ee7b1fb327ed2dcaf545fa1e16dd901d6c59e09587915419d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f68616e732d74686f6d61732f6173686569)](https://camo.githubusercontent.com/d63f674868b3c74ee7b1fb327ed2dcaf545fa1e16dd901d6c59e09587915419d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f68616e732d74686f6d61732f6173686569)[![StyleCi](https://camo.githubusercontent.com/058781dcb6d4e0e44c97a929bd310714ba84087445ed3213364ac60540f7fb0e/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3634363337323833352f736869656c643f7374796c653d706c6173746963)](https://camo.githubusercontent.com/058781dcb6d4e0e44c97a929bd310714ba84087445ed3213364ac60540f7fb0e/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3634363337323833352f736869656c643f7374796c653d706c6173746963)

Ashei is a epub parser that allows you to get epub books content.

Installation
------------

[](#installation)

Clone latest release via cURL.

```
composer require hans-thomas/ashei
```

then, publish config file.

```
php artisan vendor:publish --tag ashei-config
```

Usage
-----

[](#usage)

### read

[](#read)

To get whole content at once.

```
use Hans\Ashei\Facades\Ashei;

Ashei::read( '/path/to/ebook.epub' );
```

It will return an array like [this](https://github.com/hans-thomas/ashei/blob/master/tests/resources/chapter-one.php).

### iterator

[](#iterator)

To get a large epub file's content, you can use `iterator` method to get one limited part of the epub file in each iteration.

```
use Hans\Ashei\Facades\Ashei;

foreach ( Ashei::iterator( '/path/to/ebook.epub' ) as $number => $page ) {
    // ...
}
```

### setParagraphLength

[](#setparagraphlength)

Before getting content, you can set your idle paragraph length using `setParagraphLength` method. the default amount is `2000`.

```
use Hans\Ashei\Facades\Ashei;

Ashei::setParagraphLength( 50 )->read( '/path/to/ebook.epub' );
```

Contributing
------------

[](#contributing)

1. Fork it!
2. Create your feature branch: git checkout -b my-new-feature
3. Commit your changes: git commit -am 'Add some feature'
4. Push to the branch: git push origin my-new-feature
5. Submit a pull request ❤️

Support
-------

[](#support)

- [Report bugs](https://github.com/hans-thomas/ashei/issues)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1084d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/39920372?v=4)[Mohammad Mortazavi](/maintainers/hans-thomas)[@hans-thomas](https://github.com/hans-thomas)

---

Top Contributors

[![hans-thomas](https://avatars.githubusercontent.com/u/39920372?v=4)](https://github.com/hans-thomas "hans-thomas (25 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (2 commits)")

---

Tags

epubepub-parserparserphp

### Embed Badge

![Health badge](/badges/hans-thomas-ashei/health.svg)

```
[![Health](https://phpackages.com/badges/hans-thomas-ashei/health.svg)](https://phpackages.com/packages/hans-thomas-ashei)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
