diff options
| -rwxr-xr-x | gist | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -321,7 +321,7 @@ _parse_gists() { | |||
| 321 | raw = json.load(sys.stdin) | 321 | raw = json.load(sys.stdin) |
| 322 | for gist in raw: | 322 | for gist in raw: |
| 323 | print(gist["html_url"], end=" ") | 323 | print(gist["html_url"], end=" ") |
| 324 | print([file["raw_url"] for file in gist["files"].values()], end=" ") | 324 | print(",".join(file["raw_url"] for file in gist["files"].values()), end=" ") |
| 325 | print(gist["public"], end=" ") | 325 | print(gist["public"], end=" ") |
| 326 | print(len(gist["files"]), end=" ") | 326 | print(len(gist["files"]), end=" ") |
| 327 | print(gist["comments"], end=" ") | 327 | print(gist["comments"], end=" ") |
| @@ -335,7 +335,7 @@ for gist in raw: | |||
| 335 | # Parse response from 'gist fetch' to the format for index file | 335 | # Parse response from 'gist fetch' to the format for index file |
| 336 | _parse_response() { | 336 | _parse_response() { |
| 337 | _parse_gists \ | 337 | _parse_gists \ |
| 338 | | tac | sed -e 's/, /,/g' | nl -s' ' \ | 338 | | tac | nl -s' ' \ |
| 339 | | while read -r "${INDEX_FORMAT[@]:0:2}" file_url_array public "${INDEX_FORMAT[@]:3:6}"; do | 339 | | while read -r "${INDEX_FORMAT[@]:0:2}" file_url_array public "${INDEX_FORMAT[@]:3:6}"; do |
| 340 | local blob_code; blob_code=$(echo "$file_url_array" | tr ',' '\n' | sed -E -e 's#.*raw/(.*)/.*#\1#' | sort | cut -c -7 | paste -s -d '-' -) | 340 | local blob_code; blob_code=$(echo "$file_url_array" | tr ',' '\n' | sed -E -e 's#.*raw/(.*)/.*#\1#' | sort | cut -c -7 | paste -s -d '-' -) |
| 341 | local prefix=$mark; [[ $public == 'False' ]] && prefix=p | 341 | local prefix=$mark; [[ $public == 'False' ]] && prefix=p |