Skip to main content
Skip table of contents

ExifTool - Metadata mapping

Synchronize metadata between image files and asset properties.

Overview

Users can restore edited metadata into (additional) storage items. ExifTool functionality (Extract and write file meta data) can be used in context with the censhare Client application and monitored folders on the server. When files are imported or exported with other tools (e.g. XSLT commands, content export, etc.), metadata mapping exists from within XSLT.

This enables users to download images from the Online Channel with the latest metadata updates. Other use cases include the sending of images via e-mail or download link. Make ExifTool calls using the all enhanced censhare.api-Interface

ExifTool extensions in the API

  • Reading file meta data of the specified file and return the result as XML 

    CODE
    <cs:command name="com.censhare.api.exiftool.read" returning=":resultVariable">
    <cs:param name="source" select="$source"/>
    </cs:command>

    • @param source references to a file

    • @return Result of ExifTool as XML

  • Write the specified parameters (using string syntax of ExifTool) to the given source file and save in specified target file 

    CODE
    <cs:command name="com.censhare.api.exiftool.write"> <cs:param name="source" select="$source"/>
    <cs:param name="dest" select="$dest"/> <cs:param name="parameters" select="$parameters"/> </cs:command>
    • @param source references to a file

    • @param dest references to the target file

      @param parameters results in a string containing all tag parameters (result of the XSLT 'getExifToolWriteParameters')

      @return nothing

  • Update the source asset based on the passed parameters (ExifTool readout) and the JavaScript mapping file 

    CODE
    <cs:command name="com.censhare.api.exiftool.updateAssetFromExifToolResult" returning=":resultVariable">
    <cs:param name="source" select="$source"/>
    <cs:param name="file-metadata" select="$parameters"/>
    <cs:param name="javascript" select="$javascript"/>
    </cs:command>
    • @param source stands for the asset

    • @param file-metadata the ExifTool readout

    • @param optional file reference to JavaScript mapping or Default under "censhare-Server/app/modules/asset/metadata-mapping.js" if not defined. The JavaScript modifies the given asset with the XML data read by ExifTool

    • @return changed asset XML

  • Get ExifTool write parameters using given JavaScript of given source asset 

    CODE
    <cs:command name="com.censhare.api.exiftool.getExifToolWriteParameters" returning=":resultVariable">
    <cs:param name="source" select="$source"/>
    <cs:param name="storageitem" select="$storageitem"/>
    <cs:param name="javascript" select="$source"/>
    </cs:command>

    • @param source stands for the asset

    • @param storageitem is the storage item XML of the given asset

    • @param optional file reference to the JavaScript mapping or default under "censhare-Server/app/modules/asset/metadata-mapping.js" if not defined. The JavaScript produces the write syntax for ExifTool for a given asset

    • @return ExifTool write parameters as a string

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.