Hello! New to Retrobatch. I like what I see! Is there an API for document, jsnode, and asset in the JS node callbacks? How can I read specific properties like lat/long in EXIF? The examples are a good start:
I’m still working on the JavaScript reference. I’m also in the progress of making a new interface for it, so you can write custom nodes in JavaScript, instead of pasting JS into a specific node…
At any rate- I’ve just added a public API to the latest version of Retrobatch for getting and setting metadata values in JavaScript. Here’s what it looks like:
function processAsset(document, jsnode, asset) {
// List all values and keys. asset.metaData() returns a dictionary.
console.log(asset.metaData());
// Or retrieve a specific metadata value.
console.log(asset.metaValueForPropertyName_inMetaDictionaryName_("CopyrightNotice", "{IPTC}"));
console.log(asset.metaValueForPropertyName_inMetaDictionaryName_("ColorModel", null));
// Or set a value:
asset.setMetaValue_forPropertyName_inMetaDictionaryName_("(c) Flying Meat Inc", "CopyrightNotice", "{IPTC}");
return true;
}