mirror of
https://github.com/LukeSmithxyz/based.cooking.git
synced 2025-03-27 03:59:15 +00:00
Added Flag Emojis
This commit is contained in:
parent
57687f6918
commit
a7539b4b02
4
Makefile
4
Makefile
@ -73,7 +73,7 @@ blog/index.html: index.md $(ARTICLES) $(TAGFILES) $(addprefix templates/,$(addsu
|
|||||||
first=true; \
|
first=true; \
|
||||||
for t in $(shell cat $(TAGFILES) | sort -u); do \
|
for t in $(shell cat $(TAGFILES) | sort -u); do \
|
||||||
"$$first" || envsubst < templates/tag_separator.html; \
|
"$$first" || envsubst < templates/tag_separator.html; \
|
||||||
NAME="$$t" \
|
NAME="$$(./getTagEmoji.sh "$$t")$$t" \
|
||||||
URL="@$$t.html" \
|
URL="@$$t.html" \
|
||||||
envsubst < templates/tag_entry.html; \
|
envsubst < templates/tag_entry.html; \
|
||||||
first=false; \
|
first=false; \
|
||||||
@ -152,7 +152,7 @@ blog/%.html: $(BLOG_SRC)/%.md $(addprefix templates/,$(addsuffix .html,header ar
|
|||||||
sed -e '/^;/d' < $< | markdown -f fencedcode >> $@; \
|
sed -e '/^;/d' < $< | markdown -f fencedcode >> $@; \
|
||||||
envsubst < templates/tag_link_header.html >> $@; \
|
envsubst < templates/tag_link_header.html >> $@; \
|
||||||
for i in $${TAGS} ; do \
|
for i in $${TAGS} ; do \
|
||||||
TAG_NAME="$$i" \
|
TAG_NAME="$$(./getTagEmoji.sh "$$i")$$i" \
|
||||||
TAG_LINK="./@$$i.html" \
|
TAG_LINK="./@$$i.html" \
|
||||||
envsubst < templates/tag_link.html >> $@; \
|
envsubst < templates/tag_link.html >> $@; \
|
||||||
done; \
|
done; \
|
||||||
|
267
getTagEmoji.sh
Executable file
267
getTagEmoji.sh
Executable file
@ -0,0 +1,267 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
tagFileName="$1"
|
||||||
|
|
||||||
|
if [ -z "$tagFileName" ]; then
|
||||||
|
exit;
|
||||||
|
fi
|
||||||
|
|
||||||
|
tagFileName="$(echo "$tagFileName" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
|
||||||
|
emojiMapping="$(cat <<EOF
|
||||||
|
🇦🇫 afghan
|
||||||
|
🇦🇽 alandic
|
||||||
|
🇦🇱 albanian
|
||||||
|
🇩🇿 algerian
|
||||||
|
🇦🇸 american-samoan
|
||||||
|
🇦🇩 andorran
|
||||||
|
🇦🇴 angolan
|
||||||
|
🇦🇮 anguillian
|
||||||
|
🇦🇶 antarctic
|
||||||
|
🇦🇬 barbudan
|
||||||
|
🇦🇷 argentine
|
||||||
|
🇦🇲 armenian
|
||||||
|
🇦🇼 aruban
|
||||||
|
🇦🇺 australian
|
||||||
|
🇦🇹 austrian
|
||||||
|
🇦🇿 azerbaijani
|
||||||
|
🇧🇸 bahamian
|
||||||
|
🇧🇭 bahrain
|
||||||
|
🇧🇩 bangladesh
|
||||||
|
🇧🇧 barbados
|
||||||
|
🇧🇾 belarus
|
||||||
|
🇧🇪 belgian
|
||||||
|
🇧🇿 belize
|
||||||
|
🇧🇯 benin
|
||||||
|
🇧🇲 bermuda
|
||||||
|
🇧🇹 bhutan
|
||||||
|
🇧🇴 bolivia
|
||||||
|
🇧🇶 bonaire
|
||||||
|
🇧🇦 bosnia-and-herzegovina
|
||||||
|
🇧🇼 botswana
|
||||||
|
🇧🇻 bouvet-island
|
||||||
|
🇧🇷 brazilian
|
||||||
|
🇮🇴 british-indian-ocean-territory
|
||||||
|
🇧🇳 brunei-darussalam
|
||||||
|
🇧🇬 bulgaria
|
||||||
|
🇧🇫 burkina-faso
|
||||||
|
🇧🇮 burundi
|
||||||
|
🇰🇭 cambodia
|
||||||
|
🇨🇲 cameroon
|
||||||
|
🇨🇦 canadian
|
||||||
|
🇨🇻 cape-verde
|
||||||
|
🇰🇾 cayman-islands
|
||||||
|
🇨🇫 central-african-republic
|
||||||
|
🇹🇩 chad
|
||||||
|
🇨🇱 chile
|
||||||
|
🇨🇳 chinese
|
||||||
|
🇨🇽 christmas-island
|
||||||
|
🇨🇨 cocos-keeling-islands
|
||||||
|
🇨🇴 colombia
|
||||||
|
🇰🇲 comoros
|
||||||
|
🇨🇬 congo
|
||||||
|
🇨🇰 cook-islands
|
||||||
|
🇨🇷 costa-rica
|
||||||
|
🇨🇮 cote-d-ivoire
|
||||||
|
🇭🇷 croatia
|
||||||
|
🇨🇺 cuba
|
||||||
|
🇨🇼 curacao
|
||||||
|
🇨🇾 cyprus
|
||||||
|
🇨🇿 czech-republic
|
||||||
|
🇩🇰 denmark
|
||||||
|
🇩🇯 djibouti
|
||||||
|
🇩🇲 dominican
|
||||||
|
🇩🇴 dominican-republicn
|
||||||
|
🇳🇱 dutch
|
||||||
|
🇪🇨 ecuador
|
||||||
|
🇪🇬 egypt
|
||||||
|
🇸🇻 el-salvador
|
||||||
|
🇬🇧 english
|
||||||
|
🇬🇶 equatorial-guinea
|
||||||
|
🇪🇷 eritrea
|
||||||
|
🇪🇪 estonia
|
||||||
|
🇪🇹 ethiopia
|
||||||
|
🇫🇰 falkland-islands-malvinas
|
||||||
|
🇫🇴 faroe-islands
|
||||||
|
🇫🇯 fiji
|
||||||
|
🇵🇭 filipino
|
||||||
|
🇫🇮 finland
|
||||||
|
🇫🇷 french
|
||||||
|
🇬🇫 french-guiana
|
||||||
|
🇵🇫 french-polynesia
|
||||||
|
🇹🇫 french-southern-territories
|
||||||
|
🇬🇦 gabon
|
||||||
|
🇬🇲 gambia
|
||||||
|
🇬🇪 georgia
|
||||||
|
🇩🇪 german
|
||||||
|
🇬🇭 ghana
|
||||||
|
🇬🇮 gibraltar
|
||||||
|
🇬🇷 greek
|
||||||
|
🇬🇱 greenland
|
||||||
|
🇬🇩 grenada
|
||||||
|
🇬🇵 guadeloupe
|
||||||
|
🇬🇺 guam
|
||||||
|
🇬🇹 guatemala
|
||||||
|
🇬🇬 guernsey
|
||||||
|
🇬🇳 guinea
|
||||||
|
🇬🇼 guinea-bissau
|
||||||
|
🇬🇾 guyana
|
||||||
|
🇭🇹 haiti
|
||||||
|
🇭🇲 heard-mcdonald-islands
|
||||||
|
🇭🇳 honduras
|
||||||
|
🇭🇰 hong-kong
|
||||||
|
🇭🇺 hungarian
|
||||||
|
🇮🇸 iceland
|
||||||
|
🇮🇳 indian
|
||||||
|
🇮🇩 indonesia
|
||||||
|
🇮🇷 iran
|
||||||
|
🇮🇶 iraq
|
||||||
|
🇮🇪 irish
|
||||||
|
🇮🇲 isle-of-man
|
||||||
|
🇮🇱 israel
|
||||||
|
🇮🇹 italian
|
||||||
|
🇯🇲 jamaica
|
||||||
|
🇯🇵 japanese
|
||||||
|
🇯🇪 jersey
|
||||||
|
🇯🇴 jordan
|
||||||
|
🇰🇿 kazakhstan
|
||||||
|
🇰🇪 kenya
|
||||||
|
🇰🇮 kiribati
|
||||||
|
🇰🇵 north-korea
|
||||||
|
🇰🇷 south-korea
|
||||||
|
🇽🇰 kosovo
|
||||||
|
🇰🇼 kuwait
|
||||||
|
🇰🇬 kyrgyzstan
|
||||||
|
🇱🇦 laos
|
||||||
|
🇱🇻 latvia
|
||||||
|
🇱🇧 lebanese
|
||||||
|
🇱🇸 lesotho
|
||||||
|
🇱🇷 liberia
|
||||||
|
🇱🇾 libya
|
||||||
|
🇱🇮 liechtenstein
|
||||||
|
🇱🇹 lithuania
|
||||||
|
🇱🇺 luxembourg
|
||||||
|
🇲🇴 macao
|
||||||
|
🇲🇰 macedonia
|
||||||
|
🇲🇬 madagascar
|
||||||
|
🇲🇼 malawi
|
||||||
|
🇲🇾 malaysia
|
||||||
|
🇲🇻 maldives
|
||||||
|
🇲🇱 mali
|
||||||
|
🇲🇹 malta
|
||||||
|
🇲🇭 marshall-islands
|
||||||
|
🇲🇶 martinique
|
||||||
|
🇲🇷 mauritania
|
||||||
|
🇲🇺 mauritius
|
||||||
|
🇾🇹 mayotte
|
||||||
|
🇲🇽 mexican
|
||||||
|
🇫🇲 micronesia
|
||||||
|
🇲🇩 moldova
|
||||||
|
🇲🇨 monaco
|
||||||
|
🇲🇳 mongolia
|
||||||
|
🇲🇪 montenegro
|
||||||
|
🇲🇸 montserrat
|
||||||
|
🇲🇦 morocco
|
||||||
|
🇲🇿 mozambique
|
||||||
|
🇲🇲 myanmar
|
||||||
|
🇳🇦 namibia
|
||||||
|
🇳🇷 nauru
|
||||||
|
🇳🇵 nepal
|
||||||
|
🇳🇨 new-caledonia
|
||||||
|
🇳🇿 new-zealand
|
||||||
|
🇳🇮 nicaragua
|
||||||
|
🇳🇪 niger
|
||||||
|
🇳🇬 nigeria
|
||||||
|
🇳🇺 niue
|
||||||
|
🇳🇫 norfolk-island
|
||||||
|
🇲🇵 northern-mariana-islands
|
||||||
|
🇳🇴 norway
|
||||||
|
🇴🇲 oman
|
||||||
|
🇵🇰 pakistan
|
||||||
|
🇵🇼 palau
|
||||||
|
🇵🇸 palestinian-territory
|
||||||
|
🇵🇦 panama
|
||||||
|
🇵🇬 papua-new-guinea
|
||||||
|
🇵🇾 paraguay
|
||||||
|
🇵🇪 peruvian
|
||||||
|
🇵🇳 pitcairn
|
||||||
|
🇵🇱 polish
|
||||||
|
🇵🇹 portuguese
|
||||||
|
🇵🇷 puerto-rico
|
||||||
|
🇶🇦 qatar
|
||||||
|
🇷🇪 reunion
|
||||||
|
🇷🇴 romania
|
||||||
|
🇷🇺 russian
|
||||||
|
🇷🇼 rwanda
|
||||||
|
🇧🇱 saint-barthelemy
|
||||||
|
🇸🇭 saint-helena
|
||||||
|
🇰🇳 saint-kitts-and-nevis
|
||||||
|
🇱🇨 saint-lucia
|
||||||
|
🇲🇫 saint-martin-french
|
||||||
|
🇵🇲 saint-pierre-and-miquelon
|
||||||
|
🇻🇨 saint-vincent-and-grenadines
|
||||||
|
🇼🇸 samoa
|
||||||
|
🇸🇲 san-marino
|
||||||
|
🇸🇹 sao-tome-and-principe
|
||||||
|
🇸🇦 saudi-arabia
|
||||||
|
🇬🇧 scottish
|
||||||
|
🇸🇳 senegal
|
||||||
|
🇷🇸 serbia
|
||||||
|
🇸🇨 seychelles
|
||||||
|
🇸🇱 sierra-leone
|
||||||
|
🇸🇬 singapore
|
||||||
|
🇸🇽 sint-maarten-dutch
|
||||||
|
🇸🇰 slovakia
|
||||||
|
🇸🇮 slovenia
|
||||||
|
🇸🇧 solomon-islands
|
||||||
|
🇸🇴 somalia
|
||||||
|
🇿🇦 south-africa
|
||||||
|
🇬🇸 south-georgia-and-south-sandwich-islands
|
||||||
|
🇸🇸 south-sudan
|
||||||
|
🇪🇸 spanish
|
||||||
|
🇱🇰 sri-lanka
|
||||||
|
🇸🇩 sudan
|
||||||
|
🇸🇷 suriname
|
||||||
|
🇸🇯 svalbard-and-jan-mayen
|
||||||
|
🇸🇿 swaziland
|
||||||
|
🇸🇪 swedish
|
||||||
|
🇨🇭 swiss
|
||||||
|
🇸🇾 syria
|
||||||
|
🇹🇼 taiwanese
|
||||||
|
🇹🇯 tajikistan
|
||||||
|
🇹🇿 tanzania
|
||||||
|
🇹🇭 thai
|
||||||
|
🇹🇱 timor-leste
|
||||||
|
🇹🇬 togo
|
||||||
|
🇹🇰 tokelau
|
||||||
|
🇹🇴 tonga
|
||||||
|
🇹🇹 trinidad-and-tobago
|
||||||
|
🇹🇳 tunisia
|
||||||
|
🇹🇷 turkish
|
||||||
|
🇹🇲 turkmenistan
|
||||||
|
🇹🇨 turks-and-caicos-islands
|
||||||
|
🇹🇻 tuvalu
|
||||||
|
🇺🇬 uganda
|
||||||
|
🇺🇦 ukrainian
|
||||||
|
🇦🇪 united-arab-emirates
|
||||||
|
🇬🇧 united-kingdom
|
||||||
|
🇺🇸 american
|
||||||
|
🇺🇲 u.s.-minor-outlying-islands
|
||||||
|
🇺🇾 uruguay
|
||||||
|
🇺🇿 uzbek
|
||||||
|
🇻🇺 vanuatu
|
||||||
|
🇻🇦 vatican-holy-see
|
||||||
|
🇻🇪 venezuela
|
||||||
|
🇻🇳 vietnamese
|
||||||
|
🇻🇬 virgin-islands-british
|
||||||
|
🇻🇮 virgin-islands-u.s.
|
||||||
|
🇼🇫 wallis-and-futuna
|
||||||
|
🇬🇧 welsh
|
||||||
|
🇪🇭 western-sahara
|
||||||
|
🇾🇪 yemen
|
||||||
|
🇿🇲 zambia
|
||||||
|
🇿🇼 zimbabwe
|
||||||
|
EOF
|
||||||
|
)";
|
||||||
|
|
||||||
|
echo "$emojiMapping " | awk -F"\t" -v tagFileName="$tagFileName" '$2 == tagFileName { print $1 " " }'
|
Loading…
x
Reference in New Issue
Block a user