aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-09-18 15:06:45 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-09-18 15:06:45 +0200
commitabab5051391b7f8a212539400433eb1db0bb4f06 (patch)
tree0fa5c98676f2d2ddc95a739cb7f9dd198b452f8c /scripts
parent0027f5df316892f121bb9f4b5b6b641646273ff0 (diff)
abbreviate requirement field labels after first occurrence on every page
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/reqs2tex.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/reqs2tex.py b/scripts/reqs2tex.py
index ff9f3bb..e5f063d 100755
--- a/scripts/reqs2tex.py
+++ b/scripts/reqs2tex.py
@@ -132,9 +132,14 @@ def fmt_tex(data):
tex.cmd('label', ['requirement'], label2ref(item[KEY.LABEL])),
tex.cmd('parbox', tex.cmd('linewidth'),
tex.env('description', tex.join(
- tex.cmd('item', ['Priority']) + item[KEY.PRIORITY].title(),
- tex.cmd('item', ['Requirement']) + item[KEY.DESCRIPTION],
- (tex.cmd('item', ['Definition of done']) + item[KEY.DONE] if item[KEY.DONE] is not None else ""),
+ tex.cmd('item', [tex.cmd('reqlabel', 'priority')]),
+ item[KEY.PRIORITY].title(),
+ tex.cmd('item', [tex.cmd('reqlabel', 'description')]),
+ item[KEY.DESCRIPTION],
+ *([
+ tex.cmd('item', [tex.cmd('reqlabel', 'done')]),
+ item[KEY.DONE]
+ ] if item[KEY.DONE] is not None else []),
)),
)
)