brainite / fileconverter
Standardized file converter library.
v0.0.6
2018-08-14 20:49 UTC
Requires
- php: >=5.5
- drush/drush: 7.*
- ensepar/html2pdf: dev-master
- mpdf/mpdf: ^5.7
- symfony/console: 2.4.*
- wittiws/htmlawed: dev-master
- wittiws/phpquery: dev-master
- wittiws/quipxml: dev-master
- wittiws/splash: dev-master
- zendframework/zend-mail: 2.7.*
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