adminarea-cli
Administrative Area CLI
Features
- Create db table
- Save a country
- Save the provinces of a country
- Save the cities/regencies of a country
- Save the districts of a country
- Save the villages of a country
Available Countries
- Indonesia (id)
Installation
To install the library and command line program, use the following:
go get -v github.com/ramadani/adminarea-cli/...Usage
Create adminarea_config.yml and fill it with following this values:
db:
driver: mysql
dsn: user:password@tcp(127.0.0.1:3306)/dbname?parseTime=trueAvailable Commands
setup Create administrative areas table
country Save a country province Save the provinces of a country
city Save the cities/regencies of a country
district Save the districts of a country
village Save the villages of a countryCreate DB table
To create administrative_areas table to your database, run this command:
adminarea-cli setupSave the country
// adminarea-cli country [COUNTRY_CODE_ID]
adminarea-cli country idSave the provinces of a country
// adminarea-cli province [COUNTRY_CODE_ID]
adminarea-cli province idSave the cities/regencies of a country
// adminarea-cli city [COUNTRY_CODE_ID]
adminarea-cli city idSave the districts of a country
// adminarea-cli district [COUNTRY_CODE_ID]
adminarea-cli district idSave the villages of a country
// adminarea-cli village [COUNTRY_CODE_ID]
adminarea-cli village idTODO
- Can create db table
- Config file can pass by argument
- Save a country
- Save provinces by country
- Save regencies by country
- Save districts by country
- Save villages by country
References
License
This library is distributed under the MIT license.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
