Skip to content

Instantly share code, notes, and snippets.

@nabijaczleweli
Last active April 6, 2024 08:33
Show Gist options
  • Save nabijaczleweli/0c37fb1ee92a0a6cb23a to your computer and use it in GitHub Desktop.
Save nabijaczleweli/0c37fb1ee92a0a6cb23a to your computer and use it in GitHub Desktop.
Conversion script
#!/usr/bin/awk -f
BEGIN {
place = 1
}
/{/ {
sub(/[\[ ] { /, "")
sub(/ ]/, "")
gsub(/},/, "")
$0 = gensub(/'(.*)',/, "\\1", "g")
$0 = gensub(/'(.*)'/, "\\1", "g")
$0 = gensub(/([0-9]+),/, "\\1", "g")
print "<a href=\"http://chat.stackoverflow.com/users/" $2 "\">" $6 "</a> has " $4 " stars and is at place #" place "<br />"
++place
}
@nabijaczleweli
Copy link
Author

Now with place numbers!

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