From 5cb1bea1a6c08e7ef6ea4cf868e6bf538eff1a76 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Mon, 8 Oct 2018 17:45:27 -0400 Subject: [PATCH] Add a warning to the bucket docs (fix #3045) --- docs/plugins/bucket.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/plugins/bucket.rst b/docs/plugins/bucket.rst index 627831ad3..99975968f 100644 --- a/docs/plugins/bucket.rst +++ b/docs/plugins/bucket.rst @@ -21,7 +21,7 @@ Then, define your ranges in the ``bucket:`` section of the config file:: bucket_alpha: ['A-F', 'G-M', 'N-Z'] bucket_year: ['1980s', '1990s', '2000s'] -The ``bucket_year`` parameter is used for all substitutions occuring on the +The ``bucket_year`` parameter is used for all substitutions occurring on the ``$year`` field, while ``bucket_alpha`` takes care of textual fields. The definition of a range is somewhat loose, and multiple formats are allowed: @@ -35,6 +35,13 @@ The definition of a range is somewhat loose, and multiple formats are allowed: (unless a later range is defined). For example, *1975* encompasses all years from 1975 until now. +The `%bucket` template function guesses whether to use alpha- or year-style +buckets depending on the text it receives. It can guess wrong if, for example, +an artist or album happens to begin with four digits. Provide `alpha` as the +second argument to the template to avoid this automatic detection: for +example, use `%bucket{$artist,alpha}`. + + Configuration -------------