diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-06-07 10:55:19 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-06-07 10:55:19 +0300 |
commit | 86a9f568c410bed2f4503a2e8d43e2dc2a0d70b8 (patch) | |
tree | ad676ee9e353131e7d0a04ef07c3ce83cfe8cb95 /templates | |
parent | bba22e1f86967feebf94ebac327f7489c1029afd (diff) | |
download | subplot-86a9f568c410bed2f4503a2e8d43e2dc2a0d70b8.tar.gz |
feat: supply source file name for functions files
The Python and Bash templates now insert the name of the source files
from where the function codes come from.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/bash/template.sh | 7 | ||||
-rw-r--r-- | templates/python/template.py | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/templates/bash/template.sh b/templates/bash/template.sh index 89958d4..1da4f5b 100644 --- a/templates/bash/template.sh +++ b/templates/bash/template.sh @@ -5,7 +5,12 @@ set -eu -o pipefail ############################################################################# # Functions that implement steps. -{{ functions }} +{% for func in functions %} +#---------------------------------------------------------------------------- +# This code comes from: {{ func.source }} + +{{ func.code }} +{% endfor %} ############################################################################# diff --git a/templates/python/template.py b/templates/python/template.py index 4ceeb51..af5b36e 100644 --- a/templates/python/template.py +++ b/templates/python/template.py @@ -1,7 +1,12 @@ ############################################################################# # Functions that implement steps. -{{ functions }} +{% for func in functions %} +#---------------------------------------------------------------------------- +# This code comes from: {{ func.source }} + +{{ func.code }} +{% endfor %} ############################################################################# |