litlife/book-converter

Converter of various book formats

0.0.2 2024-11-28 11:15 UTC

This package is auto-updated.

Last update: 2025-02-28 11:52:58 UTC


README

With this package, you can convert various formats of e-books

Installation

Use the package manager composer to install.

composer require litlife/book-converter

For the Calibre driver to work, you need to install Calibre

sudo apt install calibre

For the Abiword driver to work, you need to install Abiword

sudo apt install abiword

Usage

Generate new sitemap and add new url

use Litlife\BookConverter\BookConverter;

$outputFile = (new BookConverter())
  ->with('calibre')
  ->open(__DIR__ . '/files/test.txt')
  ->convertToFormat('fb2');
  
print_r($outputFile->getFilePath());  
print_r($outputFile->getExtension());
print_r($outputFile->getStream());

Testing

composer test

License

MIT