Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs #51

Merged
merged 2 commits into from
Sep 15, 2023
Merged

docs #51

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ _Supports Linux, macOS and Windows._

> **Note**
>
> This package favors eBooks in open formats such as `.epub` or `.cbz` and which be parsed with native PHP, so for the best possible experience we recommend converting the eBooks you use. If you want to know more about eBook ecosystem, you can read [documentation](https://github.com/kiwilan/php-ebook/blob/main/docs/README.md).
> This package favors eBooks in open formats such as `.epub` (from [IDPF](https://en.wikipedia.org/wiki/International_Digital_Publishing_Forum)) or `.cbz` (from [CBA](https://en.wikipedia.org/wiki/Comic_book_archive)) and which be parsed with native PHP, so for the best possible experience we recommend converting the eBooks you use. If you want to know more about eBook ecosystem, you can read [documentation](https://github.com/kiwilan/php-ebook/blob/main/docs/README.md).

## About

Expand All @@ -29,7 +29,7 @@ This package was built for [`bookshelves-project/bookshelves`](https://github.co
- [`phar`](https://www.php.net/manual/en/book.phar.php) (native, optional) for `.CBT`
- [`rar`](https://www.php.net/manual/en/book.rar.php) (optional) for `.CBR`
- [`imagick`](https://www.php.net/manual/en/book.imagick.php) (optional) for `.PDF`
- [`intl`](https://www.php.net/manual/en/book.intl.php) (native, optional) for `Transliterator`
- [`intl`](https://www.php.net/manual/en/book.intl.php) (native, optional) for `Transliterator` for better slugify
- [`fileinfo`](https://www.php.net/manual/en/book.fileinfo.php) (native, optional) for better detection of file type

| Type | Supported | Requirement | Uses |
Expand Down Expand Up @@ -63,13 +63,31 @@ This package was built for [`bookshelves-project/bookshelves`](https://github.co

### Roadmap

- [ ] Add `.mobi`, `.azw`, `.azw3` support
- https://stackoverflow.com/questions/11817047/php-library-to-parse-mobi
- https://wiki.mobileread.com/wiki/MOBI
- [ ] Add `.djvu` support
- [ ] Add `.fb2`, `.lrf`, `.pdb`, `.snb` support
- [ ] More formats support: `.mobi`, `.azw`, `.azw3`, `.djvu`, `.fb2`
- [ ] Better `.epub` creation support
- [ ] Add `.epub` metadata update support

### Formats

There is a lot of different formats for eBooks and comics, if you want to know more about:

- [Comparison of e-book formats](https://en.wikipedia.org/wiki/Comparison_of_e-book_formats) for eBooks
- [Comic book archive](https://en.wikipedia.org/wiki/Comic_book_archive) for comics
- Amazing [MobileRead wiki](https://wiki.mobileread.com/wiki/Category:Formats)

| Name | Extensions | Supported | Notes |
| :--------------: | :-----------------------------: | :-------: | :-----------: |
| EPUB (IDPF) | `.epub` | ✅ | |
| Kindle (Amazon) | `.azw`, `.azw3`, `.kf8`, `.kfx` | ❌ | _proprietary_ |
| Mobipocket (KF8) | `.mobi`, `.prc` | ❌ | _deprecated_ |
| PDF | `.pdf` | ✅ | |
| iBook (Apple) | `.ibooks` | ❌ | _proprietary_ |
| DjVu | `.djvu`, `.djv` | ❌ | |
| Rich Text Format | `.rtf` | ❌ | |
| FictionBook | `.fb2` | ❌ | |
| Broadband eBooks | `.lrf`, `.lrx` | ❌ | |
| Palm Media | `.pdb` | ❌ | |

## Installation

You can install the package via composer:
Expand Down
4 changes: 4 additions & 0 deletions src/Formats/Mobi/MobiMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
use Kiwilan\Ebook\Tools\BookAuthor;
use Kiwilan\Ebook\Tools\BookIdentifier;

/**
* @docs https://stackoverflow.com/questions/11817047/php-library-to-parse-mobi
* @docs https://wiki.mobileread.com/wiki/MOBI
*/
class MobiMetadata extends EbookModule
{
protected ?MobiParser $parser = null;
Expand Down