Application icon

Create Album/Track Database

Typically these functions are used to accumulate per album or track information and output it as a comma separated values (CSV) or tab separated values (TSV) file. This can be imported into a database, spreadsheet or capable viewers so that you can browse all or part of your collection. A Field delimiter of Comma specifies that a CSV file should be produced. A field delimiter of Tab specifies that a TSV file should be produced.

If you specify the Create only option, an empty database will be created and no attempt will be made to accumulate information. This is the only means of programmatically creating a Query Database. Query databases will often specify the standalone option as well.

In non batch mode, the function operates on the currently selected files. In batch mode the function accumulates the information for every folder traversed. Note that in batch mode the files are written prior to executing the optional Batch End inline action. This means that created databases can be opened for querying inside Batch End.

You must enter or choose an Export Set which specifies the fields to be accumulated. Preferences - Export Sets has additional information on these sets and the special fields which can be accumulated. Note that in Album databases, fields which are not the same for all tracks in an album will be output as ???. The export set field may contain any of the escape sequences described in Escape Sequences. At runtime the export set must exist.

When databases files are created a sidecar file is created with the same filename and a .plist filename extension. This file contains information on the column layout, the current sort order and various other preserved attributes. If you want to preserve an existing copy of a sidecar file so as not to lose any information, set the Preserve sidecar option. Note that this option only works if an existing sidecar file has exactly the same column names, types and order as in the specified Export Set. Further the standalone status must be the same. If the conditions are not met, the sidecar file will be overwritten and only visual settings will be preserved.

An Album database has minimum field requirements (Album and Folder) which will be verified when the statement is constructed and when the action is run. A Track database has a minimum field of a File Path which also will be verified when the statement is constructed and when the action is run. If you want to create a file which does not contain all of the required fields, select the Standalone option. Typically standalone databases are created with the Create Track Database variant as it will not attempt to accumulate per album information.

You can elect to be prompted for the path of the file or you can specify an absolute path. While you can elect to receive a prompt for the file name while batch processing, the prompt will only be issued the first time the action step is executed. Due to the folder traversing algorithm used by the batch processor, it may take a while before the prompt is issued. If an absolute path to an existing file is supplied, it will be overwritten. When batch processing, it may be a better solution to prompt for the path in a Batch Start inline action.

The supplied path may contain any of the escape sequences described in Escape Sequences. At runtime, the path to a database must be absolute (/) or relative to the home folder (~/). If the specified path does not exist, it will be created.

When the field delimiter is Comma, the filename extension must resolve at runtime to .csv. When the field delimiter is Tab the filename extension must resolve at runtime to .tsv or .tab.

If you select the Auto open option, the file will automatically be opened after it is written. Note that the auto-open option is not available when the Create only option is specified.

Certain fields in Yate support multiple lines of text in the same field. You can handle these fields as: Unchanged, Truncate in which case only the first non blank line will be retained, or Use alternate delimiter in which case you can replace the line terminators with a delimiter. Note that not all readers of csv files will be able to handle the Unchanged case.

Many fields in Yate support multiple items in the same field. You can handle these fields as: Unchanged in which case the current multi-field delimiter will appear in the text, Only Retain First Item in which case only the first item will be retained, or Use Alternate Delimiter in which case you can replace the default multi-field delimiter with another.

Unless Write a header row is unchecked, Yate will output a line describing the names of the column headers. This option must be selected if you are opening the produced file in Yate.

The Encoding option describes the encoding of the text being output to the file. Unless you have some dire need to save a file in a specific format, you should not change the default of UTF-8. When a CSV file is saved a lossy write is performed. Some of the available encodings may not be able to represent all of the contained data. Note: When a file is saved, the in-memory image of the data is not reloaded. If you change the character encoding you may not be seeing what was written to the file. When a file is read, if the OS cannot determine the encoding of the file, the specified encoding will be attempted.

The Line terminators option specifies how you want to terminate lines of text in the output file.

Unless you are going to open the produced files in an application other that Yate, there is no reason to change any of the default values for the options discussed below. A field delimiter of Comma with the default options allows for the most accurate representation of data.

Note that album databases cannot be created during grouped execution. If you are creating a track database while grouped, remember that the statement will be executed for each track. Ensure that the filename is constructed accordingly to ensure unique databases. The creation of track databases while grouped only makes sense when running the Batch Processor, as you can then conditionally write tracks to a single database. Running grouped when an action runs interactively makes no sense as the database will be recreated for each file.