Application icon

Generic Text Importer

 

If you have fixed format metadata saved in a text file or the system clipboard, this action can be used to import the metadata.

The metadata in the supplied content can occupy any number of lines.

The format of the metadata for any one record in the content is specified in a File to Tag Template. By specifying a \n escape sequence in the template you can easily parse multiple lines of input. Note that you do not need, and should not place a \n sequence at the end of the template, unless you want a blank line. If the content contains a full path or a filename with or without an extension in a particular field, use a ❨Variable 0❩ token in the File to tag Template to represent the field.

Each time the action is run the previously used File to Tag template will be displayed as the initial value.

There are two modes of applying the text content. In linear mode, successive records in the content are applied to selected files. Unused records or selected files are ignored.

In match mode, the supplied template contained a ❨Variable 0❩ token identifying a field with identifying information. An attempt is first made to match the identifying field against a file's full path. If no match is made an attempt is made to match the filename with filename extension. If no match is made an attempt is made to match the filename without extension.

The following sample File to Tag templates are provided:

Title
A template to handle a single Title field on every line of text.

Track (Space|Comma|Period) Title
A template to handle a single line of text where each line consists of a track number followed by a space, comma or period followed by a title.

Generic Text Importer Multi Line Sample
A template specifying a four line record. The first line is a filename or full path to an audio file. The second line is a title. The third line is an artist. The fourth line is a year.

The action run as follows:

After running the action, if you are not satisfied with the results, you can return all files to the exact previous state via Edit>Revert to Editing State.



Calling Generic Text Importer from another action


The Generic Text Importer action can be called from others. A sample calling action is included and is named Sample Caller: Append Imported Text to Title.

When calling the action, the following named variables can optionally be used to pre-configure the functionality:

Template
The name of a File to Tag Template.

Using Clipboard
When true the clipboard will be pre-set as the source of the text.

File
A full path to the text file. If Using Clipboard is omitted or false, and file is not empty, it will be used as the path to the text file.

Track variables 10, 11, 12 and 13 are available to be used by the caller or the File to Tag template. All other track variables except 15 can be used but must be preserved before calling Generic Text Importer and restored after the call.





Content List:

Actions:

Folder: Generic Text Importer

Generic Text Importer

Helper: Generic Text Importer (Main)

Sample Caller: Append Imported Text to Title


File to Tag Templates:

Generic Text Importer: Track (Space|Comma|Period) Title

Generic Text Importer: Title

Generic Text Importer: Multi Line Sample

Generic Text Importer: Variable 10


File List Filters:

Generic Text Importer

Requirements:

Yate v6.16

History:


Date Version Information
2019-03-25 First release.
2020-02-03 Updated to support the clipboard and default templates.
2020-07-07 Updated for Yate v6.0.
2020-09-13 v3.1 Added documentation link.
2020-09-24 v3.2 Provided missing filter.
2022-06-10 v3.3 Cleanup.
2022-06-10 v4.0 Merged into one action.
2022-06-11 v4.1 Introduced a bug in v4.0 where the linear mode was not being set correctly.
2022-06-14 v5.0 Better front end analysis of record and file counts. Improved workflow.
2023-06-30 v6.0 Tweaked the actions to support calling by others. Added a sample caller.

Download


Back to Yate Resources