From 13f9a0526949accda108fc13e913a6d223515542 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 23 May 2021 02:10:29 +0100 Subject: [PATCH] docs: wip document shapelibs, move from shapelib-toml Signed-off-by: Ian Jackson --- docs/shapelibs.rst | 7 +++++++ src/shapelib-toml.rs | 4 ---- 2 files changed, 7 insertions(+), 4 deletions(-) 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. -- 2.30.2