Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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`)