定制 hans-thomas/epub 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

hans-thomas/epub

最新稳定版本:v1.0.1

Composer 安装命令:

composer require hans-thomas/epub

包简介

A PHP library for reading and manipulating contents and metadata of EPUB files.

README 文档

README

PHP library for reading metadata, document structure, and plain text contents from EPUB files.

Origin

This PHP EPUB library is a fork of splitbrain/php-epub-meta. The original code was changed quite a bit to fit our more conventional PHP coding standards in a symfony environment. Additional functionality includes reading the TOC/spine structure of EPUBs and extracting contents from contained XML files.

Installation

Using composer:

composer require hans-thomas/epub

Usage

<?php

// Open an EPUB file
$epub = new Epubli\Epub\Epub('/path/to/your/book.epub');
// and read some of its metadata
$title = $epub->getTitle();
$authors = $epub->getAuthors();
$desc = $epub->getDescription();

// Get the EPUB’s structural elements
$toc = $epub->getToc();
$spine = $epub->getSpine();

// Iterate over the EPUB structure
foreach ($spine as $spineItem) {
    // Get some text from the EPUB
    $chapterText = $spineItem->getContents();

    // Or find all navigation points pointing to that spine item
    $navPoints = $toc->findNavPointsForFile($spineItem->getHref());

    // Do something useful with the NavPoints.
    
    // At the end, don't forget to close the spine item
    $spineItem->close();
}

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固