Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Funstaff/Tika
Wrapper for the Apache Tika
https://github.com/Funstaff/Tika
Last synced: 15 days ago
JSON representation
Wrapper for the Apache Tika
- Host: GitHub
- URL: https://github.com/Funstaff/Tika
- Owner: Funstaff
- License: mit
- Created: 2013-06-08T15:43:51.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-03-09T12:06:24.000Z (over 8 years ago)
- Last Synced: 2024-07-08T16:47:40.929Z (4 months ago)
- Language: PHP
- Homepage:
- Size: 72.3 KB
- Stars: 11
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tika
Master: [![Build Status](https://travis-ci.org/Funstaff/Tika.png?branch=master)](https://travis-ci.org/Funstaff/Tika)
A wrapper php for [Tika binary](http://tika.apache.org)
Installation
------------To install tika with Composer just run:
```bash
$ php composer.phar require funstaff/tika dev-master
```Usage
-----```php
setOutputFormat('html')
->setOutputEncoding('UTF-8');$wrapper = new Wrapper($config);
$wrapper
->addDocument(new Document('doc.pdf','/path/to/document.pdf'))
->addDocument(new Document('doc2.pdf','/path/to/document2.pdf'))
->execute();/* Get All documents */
$documents = $wrapper->getDocument();/* or only one document */
$document = $wrapper->getDocument('doc.pdf');/* Get Document content */
$content = $document->getContent();/* or raw content (output of Tika) */
$content = $document->getRawContent();/* Get All Metadata for document (only on xml and html output format) */
$metadata = $document->getMetadata();/* Get Value for metadata */
$author = $metadata->get('author');```
Credits
-------
To all users that gave feedback and committed code [https://github.com/Funstaff/Tika](https://github.com/Funstaff/Tika).© Bertrand Zuchuat - Funstaff