-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ee30c8
commit b681a94
Showing
3 changed files
with
10 additions
and
13 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Make clean | ||
rm -f cities15000.csv | ||
rm -f cities15000.txt | ||
rm -f cities15000.zip | ||
rm -f cities.csv | ||
TMP=$(mktemp -d) | ||
|
||
wget http://download.geonames.org/export/dump/cities15000.zip | ||
# Change zip download to change what cities are taken in. | ||
# http://download.geonames.org/export/dump/ | ||
# Using 5000 pop gives about an extra meg to the binary, and 3ms to execution, over 150000. | ||
wget http://download.geonames.org/export/dump/cities15000.zip -O "$TMP"/cities.zip | ||
|
||
unzip cities15000.zip | ||
rm cities15000.zip | ||
mv cities15000.txt cities15000.csv | ||
./scripts/trim_csv.py > static/cities.csv | ||
rm cities15000.csv | ||
./scripts/trim_csv.py <(unzip -p "$TMP"/cities.zip) > static/cities.csv | ||
rm -rf "$TMP" |
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