summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2019-12-26 14:16:40 +0800
committertypebrook <typebrook@gmail.com>2019-12-26 14:16:40 +0800
commitc232f0b4b8c1c8e0e4d9c2471d30c1a7f7c07b2e (patch)
treec864441e72be2dc560d094948aab367bb2907fa5
parentfcc6f6631121721b5b88d5c63bfcf2990b76af42 (diff)
update
-rwxr-xr-xscripts/gist7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/gist b/scripts/gist
index 152c079..cde4ec7 100755
--- a/scripts/gist
+++ b/scripts/gist
@@ -13,10 +13,11 @@ index=$folder/index
13# get the list of gists 13# get the list of gists
14_update() { 14_update() {
15 curl -s -H "$auth_header" $github_api/users/$user/gists |\ 15 curl -s -H "$auth_header" $github_api/users/$user/gists |\
16 jq '.[] | "\( .html_url ) \(.files | keys | length) \( .description )"' |\ 16 tee keep |\
17 jq '.[] | "\( .html_url ) \(.files | keys | length) \(.comments) \( .description )"' |\
17 tr -d '"' | tac | nl |\ 18 tr -d '"' | tac | nl |\
18 while read line_num link file_num description; do 19 while read line_num link file_num comment_num description; do
19 echo $line_num $link $file_num $(echo $description | cut -c -70) 20 echo $line_num $link $file_num $comment_num $(echo $description | cut -c -70)
20 done | tee $index 21 done | tee $index
21} 22}
22 23