mirror of
https://github.com/beetbox/beets.git
synced 2026-01-03 22:42:44 +01:00
Usage of %ifdef in more detail, closes #2925
This commit is contained in:
parent
24d5188147
commit
85df4f513d
1 changed files with 5 additions and 3 deletions
|
|
@ -83,9 +83,11 @@ These functions are built in to beets:
|
|||
``%first{text,count,skip,sep,join}`` where ``sep`` is the separator, like
|
||||
``;`` or ``/`` and join is the text to concatenate the items.
|
||||
* ``%ifdef{field}``, ``%ifdef{field,truetext}`` or
|
||||
``%ifdef{field,truetext,falsetext}``: If ``field`` exists, then return
|
||||
``truetext`` or ``field`` (default). Otherwise, returns ``falsetext``.
|
||||
The ``field`` should be entered without ``$``.
|
||||
``%ifdef{field,truetext,falsetext}``: Checks if an flexible attribute
|
||||
``field`` is defined. If it exists, then return ``truetext`` or ``field``
|
||||
(default). Otherwise, returns ``falsetext``. The ``field`` should be entered
|
||||
without ``$``. Note that this doesn't work with built-in :ref:`itemfields`, as
|
||||
they are always defined.
|
||||
|
||||
.. _unidecode module: http://pypi.python.org/pypi/Unidecode
|
||||
.. _strftime: http://docs.python.org/2/library/time.html#time.strftime
|
||||
|
|
|
|||
Loading…
Reference in a new issue