Skip to content

Commit 54de82e

Browse files
dr5hnclaude
andcommitted
docs(readme,export): add 'Total Postcodes' line to stats block
- README stats block now includes 'Total Postcodes : 660,381 (79 countries)'. - export.yml: new postcode_country_count env var (DISTINCT country_code from world.postcodes) and a sed line that auto-updates the new README entry on every export run, mirroring the existing Total Regions / Cities / etc. patterns. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c051558 commit 54de82e

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/export.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ jobs:
151151
echo "state_count=$(mysql -uroot -proot -e 'SELECT COUNT(*) FROM world.states;' -s)" >> $GITHUB_ENV
152152
echo "city_count=$(mysql -uroot -proot -e 'SELECT COUNT(*) FROM world.cities;' -s)" >> $GITHUB_ENV
153153
echo "postcode_count=$(mysql -uroot -proot -sN -e 'SELECT COUNT(*) FROM world.postcodes;' 2>/dev/null || echo 0)" >> $GITHUB_ENV
154+
echo "postcode_country_count=$(mysql -uroot -proot -sN -e 'SELECT COUNT(DISTINCT country_code) FROM world.postcodes;' 2>/dev/null || echo 0)" >> $GITHUB_ENV
154155
echo "current_date=$(date +'%B %d, %Y')" >> $GITHUB_ENV
155156
156157
- name: Composer Dependencies
@@ -435,6 +436,7 @@ jobs:
435436
sed -i "s/Total Countries : [0-9]* <br>/Total Countries : $country_count <br>/" README.md
436437
sed -i "s/Total States\/Regions\/Municipalities : [0-9]* <br>/Total States\/Regions\/Municipalities : $state_count <br>/" README.md
437438
sed -i "s/Total Cities\/Towns\/Districts : [0-9]* <br>/Total Cities\/Towns\/Districts : $city_count <br>/" README.md
439+
sed -i "s/Total Postcodes : [0-9,]* ([0-9]* countries) <br>/Total Postcodes : $postcode_count ($postcode_country_count countries) <br>/" README.md
438440
sed -i "s/Last Updated On: .*$/Last Updated On: $current_date/" README.md
439441
440442
- name: Create GitHub Release with exports

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Total Sub Regions : 22 <br>
1919
Total Countries : 250 <br>
2020
Total States/Regions/Municipalities : 5,299 <br>
2121
Total Cities/Towns/Districts : 153,765 <br>
22+
Total Postcodes : 660,381 (79 countries) <br>
2223
Total Timezones : 427 (100% IANA coverage) <br>
2324
Last Updated On: April 28, 2026
2425

0 commit comments

Comments
 (0)