From db551e87883d848e1b18f8d2d3a87d6ee41bc7ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 27 Jul 2018 13:59:34 +0200 Subject: [PATCH] Add notice on YamlFSM jinja2 support --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a8e647..16acabf 100644 --- a/README.md +++ b/README.md @@ -207,7 +207,7 @@ A good state machine is the backbone of a good TFW challenge. There are two ways to define a state machine: - Using a YAML configuration file - - Implementing it in Python by hand + - Implementing it in Python The first option allows you to handle FSM callbacks and custom logic in any programming language (not just Python) and is generally really easy to work with (you can execute arbitrary shell commands on events). You should choose this method unless you have good reason not to. @@ -230,6 +230,8 @@ It is also possible to add preconditions to transitions. This is done by adding a `predicates` key with a list of shell commands to run. If you do this, the transition will only succeed if the return code of all predicates was `0` (as per unix convention for success). +Our `YamlFSM` implementation also supports jinja2 templates inside the `YAML` config file (examples in `test_fsm.yml`). + ## Baby steps When creating your own challenge the process should be the following: