chiark / gitweb /
docs: wip document shapelibs, move from shapelib-toml
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 May 2021 01:10:29 +0000 (02:10 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 May 2021 01:10:29 +0000 (02:10 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
docs/shapelibs.rst
src/shapelib-toml.rs

index fe729a37005fffc71a5b4f016df046ea999264b9..e20bfe546040511c74a73e540c5d4bb3f1d4f356 100644 (file)
@@ -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.)
index 4380e796a9620ee41bbdd7d5bc945784a671854e..b05f43eba424ec1132f5ccc1d163d2a5f6cd1609 100644 (file)
@@ -28,10 +28,6 @@ pub struct GroupDetails {
   #[serde(default)] pub back: Option<Box <dyn PieceSpec>>,
   #[serde(default="num_traits::identities::One::one")] pub scale: f64,
   #[serde(default)] pub colours: HashMap<String, RecolourData>,
-
-  /// If specified, provides a template for the description.  The
-  /// description previously calculated replaces `_desc` in this
-  /// string.
   pub desc_template: Option<String>,
 
   /// If specified, pieces in this group can be occulted.