From 001183ec545b40c07cca47de775ce46d031b8859 Mon Sep 17 00:00:00 2001 From: Carl Suster Date: Sun, 2 Jun 2019 16:01:10 +1000 Subject: [PATCH 1/4] docs: add cron import recipe --- docs/guides/advanced.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/guides/advanced.rst b/docs/guides/advanced.rst index ba7ca12b6..3bee05261 100644 --- a/docs/guides/advanced.rst +++ b/docs/guides/advanced.rst @@ -151,3 +151,31 @@ differently. Put something like this in your configuration file:: Used together, flexible attributes and path format conditions let you sort your music by any criteria you can imagine. + + +Automatically add new music to your library +------------------------------------------- + +As a command-line tool, beets is perfect for automated operation via a cron job +or the like. To use it this way, you might want to use these options in your +`config file`_:: + + [beets] + import_incremental: yes + import_quiet: yes + import_log: /path/to/log.txt + +The ``import_incremental`` option will skip importing any directories that have +been imported in the past. +``import_quiet`` avoids asking you any questions (since this will be run +automatically, no input is possible). +You might also want to use the ``import_quiet_fallback`` options to configure +what should happen when no near-perfect match is found -- this option depends +on your level of paranoia. +Finally, ``import_log`` will make beets record its decisions so you can come +back later and see what you need to handle manually. + +The last step is to set up cron or some other automation system to run +``beet import /path/to/incoming/music``. + +.. _config file: http://beets.readthedocs.org/page/reference/config.html From 8bea1cc7f55c5069eb709cd1d9676ca7b7eac50b Mon Sep 17 00:00:00 2001 From: Carl Suster Date: Sun, 2 Jun 2019 16:07:07 +1000 Subject: [PATCH 2/4] docs: add report recipe --- docs/guides/advanced.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/guides/advanced.rst b/docs/guides/advanced.rst index 3bee05261..845e0f33b 100644 --- a/docs/guides/advanced.rst +++ b/docs/guides/advanced.rst @@ -179,3 +179,31 @@ The last step is to set up cron or some other automation system to run ``beet import /path/to/incoming/music``. .. _config file: http://beets.readthedocs.org/page/reference/config.html + + +Useful reports +-------------- + +Since beets has a quite powerful query tool, this list contains some useful and +powerful queries to run on your library. + +* See a list of all albums which have files which are 128 bit rate:: + + beet list bitrate:128000 + +* See a list of all albums with the tracks listed in order of bit rate:: + + beet ls -f '$bitrate $artist - $title' | sort -n + +* See a list of all albums with the tracks listed in order of sample rate:: + + beet ls -f '$samplerate $artist - $title' | sort -n + +* See a list of albums and their formats:: + + beet ls -f '$albumartist $album $format' | sort | uniq + + Note that ``beet ls --album -f '... $format'`` doesn't do what you want, + because there is no notion of an album format. + If an album's tracks exist in multiple formats, the album will appear in the + list once for each format. From aa9e39327d38fa9ec4f573f8eb1610d5c3fa62ef Mon Sep 17 00:00:00 2001 From: Carl Suster Date: Sun, 2 Jun 2019 22:25:12 +1000 Subject: [PATCH 3/4] docs: document 'quiet' config item --- docs/reference/config.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/reference/config.rst b/docs/reference/config.rst index 4d3d6fff1..a96e3dfb3 100644 --- a/docs/reference/config.rst +++ b/docs/reference/config.rst @@ -522,6 +522,17 @@ Either ``yes`` or ``no`` (default), controlling whether existing metadata is discarded when a match is applied. This corresponds to the ``--from_scratch`` flag to ``beet import``. +.. _quiet: + +quiet +~~~~~ + +Either ``yes`` or ``no`` (default), controlling whether to ask for a manual +decision from the user when the importer is unsure how to proceed. This +corresponds to the ``--quiet`` flag to ``beet import``. + +.. _quiet_fallback: + quiet_fallback ~~~~~~~~~~~~~~ From 176fac781f09d37d8f11eb243122833f0f2c67ad Mon Sep 17 00:00:00 2001 From: Carl Suster Date: Sun, 2 Jun 2019 22:24:49 +1000 Subject: [PATCH 4/4] docs: update cookbook for modern beets --- docs/guides/advanced.rst | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/docs/guides/advanced.rst b/docs/guides/advanced.rst index 845e0f33b..38cc31d0c 100644 --- a/docs/guides/advanced.rst +++ b/docs/guides/advanced.rst @@ -158,28 +158,28 @@ Automatically add new music to your library As a command-line tool, beets is perfect for automated operation via a cron job or the like. To use it this way, you might want to use these options in your -`config file`_:: +:doc:`config file `: - [beets] - import_incremental: yes - import_quiet: yes - import_log: /path/to/log.txt +.. code-block:: yaml -The ``import_incremental`` option will skip importing any directories that have + import: + incremental: yes + quiet: yes + log: /path/to/log.txt + +The :ref:`incremental` option will skip importing any directories that have been imported in the past. -``import_quiet`` avoids asking you any questions (since this will be run +:ref:`quiet` avoids asking you any questions (since this will be run automatically, no input is possible). -You might also want to use the ``import_quiet_fallback`` options to configure +You might also want to use the :ref:`quiet_fallback` options to configure what should happen when no near-perfect match is found -- this option depends on your level of paranoia. -Finally, ``import_log`` will make beets record its decisions so you can come +Finally, :ref:`import_log` will make beets record its decisions so you can come back later and see what you need to handle manually. The last step is to set up cron or some other automation system to run ``beet import /path/to/incoming/music``. -.. _config file: http://beets.readthedocs.org/page/reference/config.html - Useful reports -------------- @@ -193,17 +193,13 @@ powerful queries to run on your library. * See a list of all albums with the tracks listed in order of bit rate:: - beet ls -f '$bitrate $artist - $title' | sort -n - -* See a list of all albums with the tracks listed in order of sample rate:: - - beet ls -f '$samplerate $artist - $title' | sort -n + beet ls -f '$bitrate $artist - $title' bitrate+ * See a list of albums and their formats:: beet ls -f '$albumartist $album $format' | sort | uniq Note that ``beet ls --album -f '... $format'`` doesn't do what you want, - because there is no notion of an album format. + because ``format`` is an item-level field, not an album-level one. If an album's tracks exist in multiple formats, the album will appear in the list once for each format.