DSL#

The doit-specific language provides some declarative shortcuts to techniques that usually require more complex Python or shell.

${} Get Environment Variables#

Get the value of an environment variable. Usually executed before any other parsers. All config sources share the same namespace.

Environment variables are shared across all doitoml configuration files.

Examples#

TODO

:get Get File Data#

Read a piece of data from a path in a structured file: the result is usally cast to a JSON string, if neccessary.

Use this to get data from a predictable location in a structured data file, such as a software package version.

Examples#

Get a version number.

[project]
version = "0.1.0"

[tool.doitoml.env]
PY_VERSION = ":get::toml::pyproject.toml::project::version"

Get a version number.

{
  "version": "0.1.0",
  "doitoml": {
    "env": {
      "JS_VERSION": ":get::json::package.json::version"
    }
  }
}

:: Reference a path or token#

Get the value of any paths or tokens, either in the same doitoml configuration file, or with a named prefix (including fnmatch wildcards).

Examples#

TODO

:glob Find files#

Examples#

TODO