Skip to content

Commit

Permalink
TASK: Amend Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kdambekalns authored and daniellienert committed Aug 15, 2019
1 parent ac99429 commit 88ab671
Showing 1 changed file with 60 additions and 9 deletions.
69 changes: 60 additions & 9 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,80 @@
[![License](https://poser.pugx.org/neos/metadata-extractor/license)](https://packagist.org/packages/neos/metadata-extractor)

# Neos.MetaData.Extractor Package
This package handles extraction of meta data from assets.

The package provides the `ExtractorInterface`.
With `isSuitableFor()` the implementing classes decide if they will be used for a specific resource.
The `AbstractExtractor` implements a check by media type. Just extend and set `$compatibleMediaTypes` to the possible
media type range(s). Returned DTOs are added to a collection and forwarded to the central `MetaDataManger` of the
package *Neos.MetaData*.
This package handles extraction of meta data from assets.

## Extractors
The `ExtractionManager` itself generates the `Asset` DTO for every valid Asset.
## Installation

Install using composer:

composer require neos/metadata-extractor

Some related packages are:

- [`neos/metadata`](https://github.com/neos/metadata): Provides provides data types and interfaces
(and is automatically installed with this package)
- [`neos/metadata-contentrepositoryadapter`](https://github.com/neos/metadata-contentrepositoryadapter):
Handles the mapping of meta data DTOs to the Neos Content Repository

### Requirements

The package requires the `exif` PHP extension and uses the `iptcparse()` function (which
is available in PHP by default.)

## Configuration

This package provides realtime meta data extraction. This can be switched off, if needed, using:

```yaml
Neos:
MetaData:
Extractor:
realtimeExtraction:
enabled: false
```
## Usage
The package extracts IPTC and EXIF meta data from assets using a CLI command:
./flow metadata:extract
When creating assets, the extraction is run as well (unless realtime extraction is disabled.)
The exact effect of the extraction depends on the implementation. If only this package is
installed and no further functionality has been implemented, the data supported by the
`AssetModelMetaDataMapper` from *Neos.MetaData* is stored in `Asset` models.

*In other words: You will get title, caption and copyright notice extracted and stored out
of the box.*

For developers, the package provides the `ExtractorInterface`. Using `isSuitableFor()` the
implementing classes decide if they will be used for a specific resource. The `AbstractExtractor`
implements a check by media type. Just extend and set `$compatibleMediaTypes` to the possible
media type range(s). Returned DTOs are added to a collection and forwarded to the central
`MetaDataManger` of the *Neos.MetaData* package.

## Extractors

The `ExtractionManager` itself generates the `Asset` DTO for every valid asset.

### `ExifExtractor` ([EXIF](http://www.exif.org/))

#### Supported Media Types

#### Supported Media Types
* image/jpeg
* image/tiff
* video/jpeg

#### Generated DTOs

* EXIF

### `IptcIimExtractor` ([IPTC IIM](https://iptc.org/standards/iim/))

#### Supported Media Types

* application/octet-stream
* application/x-shockwave-flash
* image/bmp
Expand All @@ -44,4 +94,5 @@ The `ExtractionManager` itself generates the `Asset` DTO for every valid Asset.
* image/xbm

#### Generated DTOs

* IPTC

0 comments on commit 88ab671

Please sign in to comment.