aboutsummaryrefslogtreecommitdiffstats
path: root/src/extract.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/extract.sh')
-rwxr-xr-xsrc/extract.sh13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/extract.sh b/src/extract.sh
index 6422694..07346fc 100755
--- a/src/extract.sh
+++ b/src/extract.sh
@@ -80,17 +80,8 @@ git ls-files --cached --exclude-standard --other |
head -n 1)
created_at=$(git show $first_commit --no-patch --format=%ad)
- heading=$(echo "$text" | sed '/^$/Q' | sed 's/.*TODO //')
- # TODO body is not extracted in shell scripts
- #
- # @assigned aforemny
- # @assigned kirchner@posteo.de
- # @scheduled 2023-10-03
- body=$(echo "$text" | tail -n +$(($(echo "$heading" | wc -l) + 2)) | \
- awk -F '[^ ]' '
- NR == 1 {n = length($1)}
- {sub("^ {1,"n"}", ""); print}'
- )
+ heading=$(echo "$text" | sed -n '0,/^$/p')
+ body=$(echo "$text" | tail -n +$(($(echo "$heading" | wc -l) + 2)))
echo "$item" | jq -c \
--arg body "$body" \