Filename mapping - Add metadata through your naming standard

If you already have a strong naming standard for your files, why not automate the tagging by mapping your naming standard to certain properties in QBank.

This feature, "filename mapping" is a great tool to use especially if you are working with technical documentations already following a strong naming convention. You can map different parts of the filename to populate different properties of the file in QBank.

if you're uploading files of animals named "Dog_123.jpg" and "Cat_345.jpg", you can use filename mapping to put "Dog" and "Cat" into the respective medias "Type of animal" property. "123/345" and any other values that you might find in the filename can of course also be put into a "Animal ID" property for example.

NOTE: You need to be an Administrator in QBank to have access to the feature "Filename Mapping". 

TIP: Some JSON coding knowledge is helpful to get max value out of the feature

Let us show you how this can be done

The feature is part of the data mapping function on Qbank administrator page. The mapping 

  • Go to administrator tab in QBank
  • Click data mapping --> filename mapping in the left menu

Add new filename mapping

Name: Descriptive name
Comment: Short description of the mapping to help others working in the tool
Categories: Leave empty if the mapping should be applied in all categories otherwise choose what categories it should be applied for. You can select more than one category. 
Pattern: If the naming standard is Dog_123.jpg you could add following pattern:
<Type of animal>_<Animal ID>.jpg
If a part of the naming is not relevant you can also add ignore, for example
<Type of animal>_<ignore>.jpg

NOTE: Filenames must match the pattern exactly in order for data values to be extracted!

Complementing the filename mapping with JSON

Specify a pattern and optionally a complementing JSON that contains a lexicon for values that you want to convert before saving into the respective property. The basic syntax for a pattern is: "<systemname>[delimiter]<systemname>.<extension>"

  • <systemname> Represents a simple value extraction point. Any delimiter between values is acceptable, but the extension is expected to be preceded by a period
  • <extension/ext> Can be used as a wildcard to indicate the end of the pattern. If you want your pattern to match a specific extension, use that extension instead of the wildcard.
  • <json:key=systemname> This is the syntax for when you want to convert a value before entering into the given systemname. If you want all occurances of 'dog.jpg' to be replaced with 'Cat' before being entered into the 'type_of_animal' property, this would be the pattern; "<json:animals=type_of_animal>.jpg". 

    Your JSON map would need to look like this: '{"animals": {"dog": "Cat"} }'. Note that the pattern is case insensitive. You can use '_default' as a key to catch non-mapped values, for example: {"mood": {"1": "happy", "2": "sad", "_default": "neutral"} }