brainite/fileconverter
Composer 安装命令:
composer require brainite/fileconverter
包简介
Standardized file converter library.
关键字:
README 文档
README
This PSR-4 library provides a unified interface for various file conversion utilities.
Engines Currently Supported
Convert Engines
- AbiWord
- Catdoc
- Docverter
- GhostScript
- Htmldoc
- ImageMagick
- LibreOffice
- MsgConvert
- Pandoc
- PhantomJs
- Ted
- Unoconv
- Unrtf
- WkHtmlToPdf
- Xhtml2Pdf
Optimize Engines
- JpegOptim
- Pdftk
ReplaceString
- Native (custom for FileConverter!)
Getting Started
Installation
Option 1: Add the "brainite/fileconverter" requirement to your composer.json configuration.
Option 2: From the command-line, execute: composer create-project brainite/fileconverter
Option 3: Download the source code from Github and then run `composer update`.
CLI: Command Line Example
<path>/bin/fileconverter <source> <dest>
PHP Example with Composer Autoload
<?php $fc = \Brainite\FileConverter\FileConverter::factory(); $fc->convertFile($source, $destination);
CLI: STDIN/STDOUT
Use a hyphen to indicate STDIN (for input) or STDOUT (for output).
prompt> echo "## hi ##" | fileconverter - - --conversion=md:html <h2 id="hi">hi</h2>
Default Configured Converters
This table shows the number of converters configured by default between file extensions. This markdown is generated from the command-line:
fileconverter list extension-table
| source | asciidoc | context | dbk | docbook | docx | eml | epub | epub3 | fb2 | html | jpg | latex | man | markdown | md | mediawiki | mobi | odt | opml | org | pdf/grayscale | ps | rtf | texinfo | textile | txt | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bib | 1 | ||||||||||||||||||||||||||
| dbk | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||||||||
| doc | 1 | 1 | |||||||||||||||||||||||||
| docbook | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||||||
| html | 1 | 1 | 1 | 1 | 2 | 1 | 2 | 1 | 1 | 4 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 9 | 2 | 1 | 1 | 1 | ||
| jpg | 1 | ||||||||||||||||||||||||||
| latex | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||||||
| ltx | 1 | ||||||||||||||||||||||||||
| markdown | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||||||
| md | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||||||||
| opml | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||||||||
| pdb | 1 | ||||||||||||||||||||||||||
| 1 | 1 | 1 | |||||||||||||||||||||||||
| ps | 1 | ||||||||||||||||||||||||||
| psw | 1 | ||||||||||||||||||||||||||
| rst | 1 | 1 | 1 | 1 | 2 | 2 | 1 | 1 | 2 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 2 | 1 | 1 | 1 | ||||
| rtf | 4 | 2 | |||||||||||||||||||||||||
| sdw | 1 | ||||||||||||||||||||||||||
| sxw | 1 | ||||||||||||||||||||||||||
| tex | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||||||||
| textile | 1 | 1 | 1 | 1 | 2 | 2 | 1 | 1 | 2 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 2 | 1 | 1 | 1 | ||||
| txt | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 1 | 1 | ||||||||||||||
| vor | 1 | ||||||||||||||||||||||||||
| wiki | 1 | 1 | 1 | 1 | 1 | 2 | 1 | 2 | 1 | 1 | 1 | 1 | 1 |
brainite/fileconverter 适用场景与选型建议
brainite/fileconverter 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 670 次下载、GitHub Stars 达 21, 最近一次更新时间为 2020 年 02 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「converter」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 brainite/fileconverter 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 brainite/fileconverter 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 brainite/fileconverter 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Tools to convert between .NET and PHP date formats
Encode integer IDs using a preset or customized symbol set
TCMB Currenct Converter
Immutable PHP currency converter that's data-agnostic.
Emails converter addon for Bear Framework
A PDF builder using HTML or DOCX templates.
统计信息
- 总下载量: 670
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 21
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-02-27