Skip to content

phreaknerd/FunstaffTikaBundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3bad528 · Nov 14, 2011

History

20 Commits
Nov 11, 2011
Nov 14, 2011
Nov 14, 2011
Nov 14, 2011
Nov 14, 2011
Nov 14, 2011
Nov 14, 2011
Nov 11, 2011
Nov 11, 2011
Nov 14, 2011
Nov 14, 2011

Repository files navigation

FunstaffTikaBundle: Wrapper for tika

Build Status

This bundle work with Apache Tika.

Configuration

File config.yml

funstaff_tika:
    tika_path:      /path/to/tika-app-1.0.jar
    output_format:  ~  # default: xml
    logging:        ~  # Use the Symfony2 default. Force the logging with this param.

Examples

Extract only the content:

$tika = $this->get('funstaff.tika')
        ->setOutputFormat('text')
        ->addDocument('foo', '/path/to/foo')
        ->extractContent();

Extract Only the metadata

$tika = $this->get('funstaff.tika')
        ...
        ->extractMetadata();

Extract content and metadata

$tika = $this->get('funstaff.tika')
        ...
        ->extractAll();

Work with data

foreach ($tika->getDocuments() as $document) {
    $content = $document->getContent();
    $metadata = $document->getMetadata();
    $author = $metadata->get('Author');
}

Credits

To all users that gave feedback and committed code https://github.com/Funstaff/FunstaffTikaBundle.

About

Tika Wrapper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages