aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/gist
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-01-13 11:20:39 +0800
committertypebrook <typebrook@gmail.com>2020-01-13 11:20:39 +0800
commitd3a16443ad46083a3310da630e29fb886d5345af (patch)
tree32e825f604d62b4f15f52607f2b158ffb72d75ce /scripts/gist
parent48c94d770dbd51500c5a2d1841e536a4d5fbb9d3 (diff)
update
Diffstat (limited to 'scripts/gist')
-rwxr-xr-xscripts/gist4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/gist b/scripts/gist
index 3f511e5..380a369 100755
--- a/scripts/gist
+++ b/scripts/gist
@@ -66,8 +66,8 @@ _update() {
66 tee jojo |\ 66 tee jojo |\
67 jq '.[] | "\(.html_url) \([.files[] | .raw_url]) \(.files | keys | length) \(.comments) \(.description)"' |\ 67 jq '.[] | "\(.html_url) \([.files[] | .raw_url]) \(.files | keys | length) \(.comments) \(.description)"' |\
68 tac | nl |\ 68 tac | nl |\
69 while read line_num link blobs file_num comment_num description; do 69 while read line_num link file_url_array file_num comment_num description; do
70 blob_code=$(echo $blobs | jq -r '.[]' | sed -r 's#.*raw/(.*)/.*#\1#' | sort | cut -c -7 | paste -sd '-') 70 blob_code=$(echo $file_url_array | jq -r '.[]' | sed -r 's#.*raw/(.*)/.*#\1#' | sort | cut -c -7 | paste -sd '-')
71 echo $line_num $link $blob_code $file_num $comment_num $(echo $description | cut -c -70) | tr -d '"' 71 echo $line_num $link $blob_code $file_num $comment_num $(echo $description | cut -c -70) | tr -d '"'
72 done > $index && \ 72 done > $index && \
73 _show_list 73 _show_list