by tsm · 13y ago · 0 comments
But the gist of it is dead simple.
For this author (hodgesmr) you just go to:
https://api.github.com/users/hodgesmr
... and if it's not shown there (author doesn't want to make it public?) then you look for it here:
https://api.github.com/users/hodgesmr/events/public
Aaaaand this is why I have a dozen different mail accounts.
curl -s https://api.github.com/users/$2/events/public |
grep "\"gravatar_id\":" |
sed -e's/[,|"]//g' |
head -n 1 |
awk '{print $(NF)}'
can be curl -sS https://api.github.com/users/$2/events/public |
sed -n '/"gravatar_id":/!d; s/",//; s/.*"//p; q'
and so on. | I could easily imagine writing a hundred lines
| of a "better" language
You could easily do much of the same things (probably in a similar number of lines) using system calls in other languages.