diff options
Diffstat (limited to 'src/extract.sh')
-rwxr-xr-x | src/extract.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/extract.sh b/src/extract.sh index 800cb8f..1e8440d 100755 --- a/src/extract.sh +++ b/src/extract.sh @@ -100,6 +100,29 @@ git ls-files --cached --exclude-standard --other | {sub("^ {1,"n"}", ""); print}' ) + echo "$item" | jq -c \ + --arg body "$body" \ + --arg created_at "$created_at" \ + --arg first_commit "$first_commit" \ + --arg heading "$heading" \ + --argjson end_row "$end_row" \ + --argjson start_row "$start_row" \ + '. + { + "body": $body, + "created_at": $created_at, + "end_row": $end_row, + "first_commit": $first_commit, + "heading": $heading, + "start_row": $start_row + }' + done | while read -r item; do + created_at=$(echo "$item" | jq -r .created_at) + file=$(echo "$item" | jq -r .file) + heading=$(echo "$item" | jq -r .heading) + body=$(echo "$item" | jq -r .body) + start_row=$(echo "$item" | jq -r .start_row) + end_row=$(echo "$item" | jq -r .end_row) + GREEN='\033[0;32m' BOLD=$(tput bold) NORMAL=$(tput sgr0) |