diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/extract.sh | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/extract.sh b/src/extract.sh index 2584552..678104e 100755 --- a/src/extract.sh +++ b/src/extract.sh @@ -1,5 +1,52 @@ #!/usr/bin/env bash +# TODO Add support for ammendments +# +# The user can ammend more information to an issue which is located at +# a different place by referencing the issue's id. Example: +# +# ```bash +# #!/usr/bin/env bash +# +# set -efu +# +# ls -al +# # TODO Original issue +# # +# # @id original-issue +# +# ls +# # @original-issue more information on the issue +# ``` + +# TODO Only one issue per comment block +# +# Only the first TODO/FIXME inside a comment block should be considered +# as the start of an issue. + +# TODO Add support for other keywords +# +# Additionally to TODO, also FIXME should start an issue. There might +# be more interesting keywords. + +# TODO Add tags +# +# Users can add tags inside issue title and description. Tags are slugs +# and start with @ + +# TODO Add filter by tags +# +# Users can filter issues for tags with the option -t/--tag @tag. + +# TODO Add command line modes list and show +# +# `anissue list` lists all issues in the current directory +# `anissue show <issue>` shows an issue using it's id or automatically +# assigned identifier + +# TODO Generate and show hash for each issue + + set -efu git ls-files --cached --exclude-standard --other | @@ -36,6 +83,7 @@ git ls-files --cached --exclude-standard --other | 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 body=$(echo "$text" | tail -n +$(($(echo "$heading" | wc -l) + 2)) | \ awk -F '[^ ]' ' NR == 1 {n = length($1)} |