Export open github issues - NCIEVS/nci-protege5 GitHub Wiki

Keep having to look for this in my PC when I need it. . .

curl "https://api.github.com/repos/ncievs/nci-protege5/issues?state=open&per_page=1000" | jq -c '.[] | {description: .body, title: .title, created: .created_at, type: [(.labels[].name // "")], milestone: (.milestone.title // ""), status: .state, number: .number}' | sed -e 's/{\"description\"://g' -e 's/,\"title\":/\t/g' -e 's/,\"created\":/\t/g' -e 's/,\"type\":\[\(.*\)\]/\t\1/g' -e 's/,\"milestone\":/\t/g' -e 's/,\"status\":/\t/g' -e 's/,\"number\":\(.*\)}/\t\1/g' -e 's/\",\"/, /g' -e 's/\\r\\n/\r\n/g' -e 's/\\"/\x27/g' > git-issues-$(date +%Y%m%d-%H%M).tsv

To import into a spreadsheet select tab as the delimiter, double-quote as the string delimiter (none will be embedded), and utf-8 as the encoding.

For folks landing here, fetches open issues from github and outputs to a text tsv file. Strings are quoted though to allow for embedded CRs when importing to a spreadsheet. Uses jq and various standard programs (curl, sed). If you don't want the embedded CRs eliminate the next to last sed action and they will be retained escaped.