From 3c2abb01f01667eb551de7a64bfed63852931296 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Tue, 8 Jun 2021 15:07:44 +0800 Subject: [PATCH] update docs for combiner [skip ci] --- docs/usage.rst | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/usage.rst b/docs/usage.rst index 2e1430c..b06ecbf 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -762,6 +762,37 @@ strip_release provided Instead of the package version, return the version this package provides. Its value is what the package provides, and ``strip_release`` takes effect too. This is best used with libraries. +Combine others' results +~~~~~~~~~~~~~~~~~~~~~~~ +:: + + source = "combiner" + +This source can combine results from other entries. + +from + A list of entry names to wait results for. + +format + A format string to combine the results into the final string. + +Example: + +.. code-block:: toml + + [entry-1] + source = "cmd" + cmd = "echo 1" + + [entry-2] + source = "cmd" + cmd = "echo 2" + + [entry-3] + source = "combiner" + from = ["entry-1", "entry-2"] + format = "$1-$2" + Manually updating ~~~~~~~~~~~~~~~~~ ::