- hardcode the name in your custom format
- use pattern matching and replacement
- use character replacement
- use a custom lookup table
- use a custom lookup table read from an external TSV or CSV file
- use a custom function
Let's say we prefer acronyms:
"Deep Space 9" => "DS9"
"How I Met Your Mother" => "HIMYM"
e.g. hardcode the name in your custom format
Format: Select all
DS9 - {s00e00} - {t}
e.g. use pattern matching and replacement
Format: Select all
{
n.match(
'Deep Space 9' : 'DS9',
'How I Met Your Mother' : 'HIMYM'
) ?: n
}
e.g. use character replacement
Format: Select all
{
n.replace(
'Deep Space 9' : 'DS9',
'How I Met Your Mother' : 'HIMYM'
)
}
e.g. use a custom lookup table
Format: Select all
{
[
'Deep Space 9' : 'DS9',
'How I Met Your Mother' : 'HIMYM'
][n] ?: n
}
Format: Select all
{
[
580 : 'DS9',
1100 : 'HIMYM'
][id] ?: n
}
e.g. use a custom lookup table read from an external TSV or CSV file
Format: Select all
{
csv('/path/to/names.tsv')[n] ?: n
}
Console Output: Select all
$ cat ~/names.tsv
Deep Space 9 DS9
How I Met Your Mother HIMYM



e.g. use a custom function
Alternatively, you can use code to generically derive the series names you want from the series names you get from your chosen database."The IT Crowd (UK)" => "The IT Crowd"
Format: Select all
{ n.replaceTrailingBrackets() }
Format: Select all
{ n.acronym() }