1.0.0 • Published 13 years ago
geonames-postal-codes-import-nodejs v1.0.0
geonames-postal-codes-import-nodejs
Using Node.js to import Postal Codes from GeoNames.org into a database. See http://download.geonames.org/export/zip/ for a complete list of available postal codes.
Currently, only mysql is supported. Please adapt functions dbConnect(), dbCreateTable(), dbDeleteTable() and dbInsert() in index.js to support other databases.
Unlike other tools, this tool only requires Node.js and no other libraries.
Installation
npm install geonames-postal-codes-import-nodejsUsage
cd node_modules/geonames-postal-codes-import-nodejs
node index.js [options]
Options:
-h, --help output usage information
-V, --version output the version number
-h, --host [host] DB Host
-u, --user [user] DB User
-p, --password [password] DB Password
-d, --database [database] DB Database
-t, --table [table] DB table
-c, --countries <keys> comma separated list of country codes
Country Codes: <keys>
see http://download.geonames.org/export/zip/
Examples:
index.js -h localhost -u root -p root123 -d geodb -t postal_codes -c DE,CH,ES
index.js -h localhost -u root -p root123 -d geodb -t postal_codes -c allCountries1.0.0
13 years ago