PHPackages                             bagaskarawg/mobi - 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. bagaskarawg/mobi

ActiveLibrary

bagaskarawg/mobi
================

Parse .mobi files.

0.1(7y ago)18MITPHPPHP ^5.6 || ^7.0

Since Nov 30Pushed 7y agoCompare

[ Source](https://github.com/bagaskarawg/mobi)[ Packagist](https://packagist.org/packages/bagaskarawg/mobi)[ RSS](/packages/bagaskarawg-mobi/feed)WikiDiscussions master Synced 1mo ago

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

.mobi
=====

[](#mobi)

Handle .mobi files with ease.

Introduction
------------

[](#introduction)

This package was born out of frustration. There didn't seem to be a decent open source .mobi reader out there for PHP, so I wanted to create my own to give back to the community.

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

[](#installation)

```
composer require bagaskarawg/mobi

```

Usage
-----

[](#usage)

### Reading .mobi files

[](#reading-mobi-files)

```
use Bagaskarawg;

$mobi = new Mobi\Mobi('sherlock.mobi');

echo $mobi->getTitle(); # The Adventures of Sherlock Holmes by Doyle
echo $mobi->getAuthor(); # Doyle, Arthur Conan, Sir, 1859-1930

```

#### .mobi headers

[](#mobi-headers)

```
use Bagaskarawg;

$mobi = new Mobi\Mobi('sherlock.mobi');

$palmDb = $mobi->getPalmDbHeader();
$palmDoc = $mobi->getPalmDocHeader();
$mobi = $mobi->getMobiHeader();
$exth = $mobi->getExthHeader();

```

#### EXTH records

[](#exth-records)

```
echo $exth->getRecordByType(Mobi\Header\ExthHeader::TYPE_AUTHOR); # Doyle, Arthur Conan, Sir, 1859-1930
echo $exth->getRecordByType(Mobi\Header\ExthHeader::TYPE_PUBLISHER); # Mobipocket (an Amazon.com company)

```

Testing
-------

[](#testing)

```
./vendor/bin/phpunit

```

Todo
----

[](#todo)

- Parse .mobi files
- More tests
- EXTH record type constants
- Helper methods to get common attributes (title, author etc)

Thanks
------

[](#thanks)

-
-

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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

2716d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e5927acae90f390779a521faaa8564191f6cc245b8ee5d0eb6972feb8b63bf5?d=identicon)[bagaskarawg](/maintainers/bagaskarawg)

---

Top Contributors

[![martinph](https://avatars.githubusercontent.com/u/178519?v=4)](https://github.com/martinph "martinph (6 commits)")[![bagaskarawg](https://avatars.githubusercontent.com/u/25116290?v=4)](https://github.com/bagaskarawg "bagaskarawg (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bagaskarawg-mobi/health.svg)

```
[![Health](https://phpackages.com/badges/bagaskarawg-mobi/health.svg)](https://phpackages.com/packages/bagaskarawg-mobi)
```

PHPackages © 2026

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