Skip to content

Instantly share code, notes, and snippets.

@JoshCheek
Created December 17, 2023 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshCheek/f147892b6017afd06525818959d80446 to your computer and use it in GitHub Desktop.
Save JoshCheek/f147892b6017afd06525818959d80446 to your computer and use it in GitHub Desktop.
CT36 banners and relics
curl -s 'https://sciplypandora.github.io/static/json/configs/CT36.json' |
ruby -r json -e '
puts JSON.parse($stdin.read, symbolize_names: true)
.[](:tiles)
.reject { |code, tile| tile[:tile_type] == "regular" }
.map { |code, tile|
tile_type = tile[:tile_type]
game_type = tile[:game_type].sub("least_cash", "lc").sub("least_tiers", "lt")
boss = tile[:boss] || " "
relic = tile[:relic]
[code, tile_type, game_type, boss, relic]
}
.sort_by { |columns| columns.drop 1 }
.map { |columns| columns.join ":" }
' |
column -s : -t |
ruby -pe '
gsub /\b(?:lt|lc|race|boss|relic|banner|lych|phayze|vortex|dreadbloon)\b/ do
"\e[3#{($&.hash % 7) + 1}m#$&\e[0m"
end'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment