承接 jove4015/epub-to-text 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jove4015/epub-to-text

Composer 安装命令:

composer require jove4015/epub-to-text

包简介

Extract text from a epub - based on spatie/pdf-to-text

README 文档

README

This package provides a class to extract text from an epub.

 \jove4015\epub2txt\Epub::getText('book.epub'); //returns the text from the epub

Requirements

Behind the scenes this package leverages epub2txt. You can verify if the binary installed on your system by issueing this command:

which epub2txt

If it is installed it will return the path to the binary.

To install the binary you can follow the instructions here: (http://kevinboone.net/README_epub2txt.html)

Installation

You can install the package via composer:

$ composer require jove4015/epub-to-text

Usage

Extracting text from an epub is easy.

$text = (new Epub())
    ->setepub('book.epub')
    ->text();

Or easier:

 \jove4015\EpubToText\Epub::getText('book.epub')

By default the package will assume that the epub2txt is located at /usr/bin/epub2txt. If you're using the a different location pass the path to the binary in constructor

$text = (new Epub('/custom/path/to/epub2txt'))
    ->setepub('book.epub')
    ->text();

or as the second parameter to the getText-function:

 \jove4015\EpubToText\Epub::getText('book.epub', '/custom/path/to/epub2txt')

Testing

$ composer test

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 83
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 132
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-12-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固