Created
December 6, 2018 08:56
-
-
Save raine/f975f8441763be3ffe3290743efe9600 to your computer and use it in GitHub Desktop.
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/env bash | |
curl -s https://restcountries.eu/rest/v2/all | \ | |
html-table -o \ | |
--cols flag,code,name,population,area,capital,tld,languages \ | |
--col.flag.cell '<div style="text-align: center"><img src="${flag}" height="20" /></div>' \ | |
--col.flag.header '' \ | |
--col.flag.width 50 \ | |
--col.code.width 40 \ | |
--col.code.cell '${alpha2Code}' \ | |
--col.code.header '' \ | |
--col.name.cell '<span>${name} (${nativeName})</span>' \ | |
--col.name.filterable \ | |
--col.tld.cell '<code>${topLevelDomain[0]}</code>' \ | |
--col.tld.header 'TLD' \ | |
--col.tld.width 50 \ | |
--col.languages.cell '<span>${languages.map(x => x.name).join(", ")}</span>' \ | |
--col.languages.header 'Languages' \ | |
--col.population.cell '${population.toLocaleString()}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment