Skip to content

Instantly share code, notes, and snippets.

@k-takata
Last active August 30, 2020 13:05
Show Gist options
  • Save k-takata/fd0615181e71c873c8fcb7dac517911f to your computer and use it in GitHub Desktop.
Save k-takata/fd0615181e71c873c8fcb7dac517911f to your computer and use it in GitHub Desktop.
List of releases on vim-win32-installer
@k-takata
Copy link
Author

$ (for i in `seq 1 13`; do curl "https://api.github.com/repos/vim/vim-win32-installer/releases?per_page=100&page=$i"; done) > releases.json
$ jq '.[].html_url' releases.json | sed -e 's/"//g' -e 's/^/* /' | sort > releases.md

@k-takata
Copy link
Author

Script to create separate *.md files:

#!/bin/sh

for y in $(seq 2016 2020); do
	f=Releases-in-$y.md
	for m in $(seq -f %02.f 12); do
		echo "## $y-$m" >> $f
		jq '.[] | [.html_url,.created_at] | select(.[1] | startswith("'$y-$m'")) | .[0]' releases.json | sort | sed -e 's/"//g' -e 's/^.*\/\(v[0-9.]*\)$/* [\1](&)/' >> $f
	done
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment