2017 © Pedro Peláez
 

symfony-bundle funstafftikabundle

FunstaffTikaBundle: Wrapper for tika.

image

funstaff/funstafftikabundle

FunstaffTikaBundle: Wrapper for tika.

  • Tuesday, April 2, 2013
  • by emgiezet
  • Repository
  • 1 Watchers
  • 0 Stars
  • 83 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

This bundle work with Apache Tika., (*2)

Configuration

File config.yml, (*3)

funstaff_tika:
    tika_path:       /path/to/tika-app-1.0.jar
    output_format:   ~  # default: xml
    output_encoding: ~  # default: UTF-8
    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., (*4)

The Versions