Docs refinements for #2581

This commit is contained in:
Adrian Sampson 2017-06-13 09:27:42 -04:00
parent 3f684455d2
commit 71d6dc3544
3 changed files with 12 additions and 18 deletions

View file

@ -6,10 +6,10 @@ Changelog
Features:
* It is now possible to set fields to certain values during import, using
either the `importer.set_fields` dictionary in the config file, or by
passing one or more `--set field=value` options on the command-line.
:bug: `1881`
* You can now set fields to certain values during :ref:`import-cmd`, using
either a ``--set field=value`` command-line flag or a new :ref:`set_fields`
configuration option under the `importer` section.
Thanks to :user:`bartkl`. :bug: `1881` :bug:`2581`
* :ref:`Date queries <datequery>` can now include times, so you can filter
your music down to the second. Thanks to :user:`discopatrick`. :bug:`2506`
:bug:`2528`

View file

@ -138,16 +138,13 @@ Optional command flags:
searching for other candidates by using the ``--search-id SEARCH_ID`` option.
Multiple IDs can be specified by simply repeating the option several times.
* You can supply ``--set`` options with ``field=value`` pairs to assign to
those fields the specified values on import, in addition to such field/value
pairs defined in the ``importer.set_fields`` dictionary in the configuration
file. Make sure to use an option per field/value pair, like so::
* You can supply ``--set field=value`` to assign `field` to `value` on import.
These assignments will merge with (and possibly override) the
:ref:`set_fields` configuration dictionary. You can use the option multiple
times on the command line, like so::
beet import --set genre="Alternative Rock" --set mood="emotional"
Note that values for the fields specified on the command-line override the
ones defined for those fields in the configuration file.
.. _rarfile: https://pypi.python.org/pypi/rarfile/2.2
.. only:: html

View file

@ -591,18 +591,15 @@ Default: ``no``.
set_fields
~~~~~~~~~~
A dictionary of field/value pairs, each one used to set a field to the
corresponding value during import.
Example: ::
A dictionary indicating fields to set to values for newly imported music.
Here's an example::
set_fields:
genre: 'To Listen'
collection: 'Unordered'
Note that field/value pairs supplied via ``--set`` options on the
command-line are processed in addition to those specified here. Those values
override the ones defined here in the case of fields with the same name.
Other field/value pairs supplied via the ``--set`` option on the command-line
override any settings here for fields with the same name.
Default: ``{}`` (empty).