From: Ian Jackson Date: Sun, 23 May 2021 01:10:29 +0000 (+0100) Subject: docs: wip document shapelibs, move from shapelib-toml X-Git-Tag: otter-0.6.0~32 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=13f9a0526949accda108fc13e913a6d223515542;p=otter.git docs: wip document shapelibs, move from shapelib-toml Signed-off-by: Ian Jackson --- diff --git a/docs/shapelibs.rst b/docs/shapelibs.rst index fe729a37..e20bfe54 100644 --- a/docs/shapelibs.rst +++ b/docs/shapelibs.rst @@ -233,3 +233,10 @@ Parameters recolouring automatically at build time. Each recolouring should hae a ``map`` entry which is a sub-sub-table mapping inputcolours (strings in ``#rrggbb`` format) to output colours. + + * ``desc``: [string: template]. If specified, provides a template + for the description, to allow formulaic descriptions of pieces in + thisf group. The string specified ``desc`` must contain ``_desc`` + exaclty once; it will be replaced with the description calculated + according to the other rules. (``_desc`` substitution happens + after ``_colour`` substitution.) diff --git a/src/shapelib-toml.rs b/src/shapelib-toml.rs index 4380e796..b05f43eb 100644 --- a/src/shapelib-toml.rs +++ b/src/shapelib-toml.rs @@ -28,10 +28,6 @@ pub struct GroupDetails { #[serde(default)] pub back: Option>, #[serde(default="num_traits::identities::One::one")] pub scale: f64, #[serde(default)] pub colours: HashMap, - - /// If specified, provides a template for the description. The - /// description previously calculated replaces `_desc` in this - /// string. pub desc_template: Option, /// If specified, pieces in this group can be occulted.