Tag patterns allow more complex string representation of tags, with a notion of if-null defaulting; whilst this sounds complex (and it can be!) it’s very useful where libraries have wildly varying tags.
Tag patterns can include strings (e.g. tag names) enclosed in angled brackets like this
<artist> - <title> (<album>)
Which might produce:
The Beatles - Drive My Car (Rubber Soul)
Tag patterns in QL can be used to change the information displayed in various places, like the playing song area, columns in the song list and the album list in the album browser.
They can be used to group songs in the paned and the album collection browser in more complex ways.
And, of course, tag renaming based on tags uses tag patterns to create the file names and folder structure.
In some situations the resulting text will be displayed in the user interface like for example the album list or the area which displays information about the currently playing song. To style the resulting text you can use the following tags in combination with the tag patterns.
span tag can define many more text attributes like size and color:
[span size='small' color='blue']..[/span]. See the Pango Markup
Language page for a complete list of available attributes and values.
A complete example might look like this:
[span weight='bold' size='large']<title>[/span]<~length| (<~length>)> : [b]<~rating>[/b]<version| [small][b]<version>[/b][/small]><~people| by <~people>><album| <album><tracknumber| : track <tracknumber>>>
Note also the literal newlines.