2017 © Pedro Peláez
 

library mobi

Parse .mobi files.

image

choccybiccy/mobi

Parse .mobi files.

  • Monday, September 19, 2016
  • by martinph
  • Repository
  • 1 Watchers
  • 4 Stars
  • 23 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 4 Open issues
  • 4 Versions
  • 21 % Grown

The README.md

.mobi

Handle .mobi files with ease., (*1)

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., (*2)

Installation

composer require choccybiccy/mobi

Usage

Reading .mobi files

use Choccybiccy;

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

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

.mobi headers

use Choccybiccy;

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

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

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

./vendor/bin/phpunit

Todo

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

Thanks

  • http://wiki.mobileread.com/wiki/MOBI

The Versions

19/09 2016

dev-master

9999999-dev

Parse .mobi files.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Martin Hughes

19/09 2016

0.1.2

0.1.2.0

Parse .mobi files.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Martin Hughes

19/09 2016

0.1.1

0.1.1.0

Parse .mobi files.

  Sources   Download

MIT

The Development Requires

by Martin Hughes

19/09 2016

0.1.0

0.1.0.0

Parse .mobi files.

  Sources   Download

MIT

The Development Requires

by Martin Hughes