Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rey26/settlement-reader
Feeds database by reading external website about cities and villages in Slovakia, consolidate the data and provide as API
https://github.com/rey26/settlement-reader
easyadmin phpunit symfony6
Last synced: 3 days ago
JSON representation
Feeds database by reading external website about cities and villages in Slovakia, consolidate the data and provide as API
- Host: GitHub
- URL: https://github.com/rey26/settlement-reader
- Owner: rey26
- License: gpl-3.0
- Created: 2023-08-27T05:15:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-24T04:28:42.000Z (about 1 year ago)
- Last Synced: 2024-10-17T13:51:36.670Z (19 days ago)
- Topics: easyadmin, phpunit, symfony6
- Language: PHP
- Homepage:
- Size: 678 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Settlement reader
Reads data about cities and villages in Slovakia from website [e-obce.sk](https://www.e-obce.sk) and stores structured data in DB. The data can be viewed in admin view provided by EasyAdmin bundle and accessed by API in future releases.
## Installation
1. `docker-compose up -d --build` inside main directory
## Usage
### ImportSettlementsCommand
This command downloads data from external site, maps it to project entities and stores to DB. In order to also download coat of arms of each available city/village, run the command with option `coa-download`.
The option to delete all settlements is also available.```sh
docker-compose exec php /bin/bash
php bin/console app:import-settlements
# download coat of arms locally
php bin/console app:import-settlements --coa-download
# delete settlements
php bin/console app:import-settlements --delete-settlements
```## Testing
1. run `php bin/phpunit` inside php container (`docker-compose exec php /bin/bash`)