Last active
April 6, 2024 08:33
-
-
Save nabijaczleweli/0c37fb1ee92a0a6cb23a to your computer and use it in GitHub Desktop.
Conversion script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
} |
Now with place numbers!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pipe input in, for example with curl:
curl -s https://gist.githubusercontent.com/rlemon/d31b352f953b6b583960/raw/57beb33f85cf7a3a3c06532b813d1b8685b199bc/gistfile1.txt | awk -f maker.awk
output in "retarded html"