Giter Site home page Giter Site logo

metadata-extractor's Introduction

StyleCI Build Status Latest Stable Version Total Downloads License

Neos.MetaData.Extractor Package

This package handles extraction of meta data from assets.

Installation

Install using composer:

composer require neos/metadata-extractor

Some related packages are:

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:

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)

Supported Media Types

  • image/jpeg
  • image/tiff
  • video/jpeg

Generated DTOs

  • EXIF

IptcIimExtractor (IPTC IIM)

Supported Media Types

  • application/octet-stream
  • application/x-shockwave-flash
  • image/bmp
  • image/gif
  • image/iff
  • image/jp2
  • image/jpeg
  • image/png
  • image/psd
  • image/tiff
  • image/vnd.microsoft.icon
  • image/vnd.wap.wbmp
  • image/xbm

Generated DTOs

  • IPTC

metadata-extractor's People

Contributors

comir avatar daniellienert avatar gerdemann avatar gjwnc avatar jonnitto avatar kdambekalns avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

metadata-extractor's Issues

Not possible to "delete" metadata that is realtime-extracted

When using realtime extraction, deleting e.g. the caption of an asset is not possible. The setting of caption: '${asset.Caption || iptc.Description}' will always fill in the extracted IPTC data again, when the caption has been deleted via the media management.

One possible solution could be this:

  • make realtime extraction setup more fine-grained, and extract only when an asset is created
  • updates would then be allowed to "remove" data
  • offer a way to re-extract, e.g. using a button in the media management

Did you have that issue already, @daniellienert–and if yes, how did you solve it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.