(English below)
El directori data conté un script en Python necessari per a obtenir les dades, extretes de webs de la Generalitat.
Cal instal·lar els requeriments (dins d'un virtualenv):
pip install -r requirements.txt
Per veure les comandes disponibles:
python scraper.py --help
- Actualizar la variable
YEARascraper.py - Crear manualment l'arxiu
data/festes_catalunya_{year}.csv - Executar
python scraper.py places-idsper obtenir totes les localitats - Executar
python scraper.py all-placesper obtenir les festes - Executar
python scraper.py web-filesper obtenir els nous arxius de producció - Actualitzar la constant
yearsa l'arxiusapp.jsTODO: automatitzar - Reemplaçar l'any anterior pel nou any a l'arxiu
index.htmlTODO: automatitzar - Actualitzar redirecció a l'arxiu
netlify.toml
El directori web conté l'aplicació web. Per desenvolupar-la localment:
npm install
npm run dev
Les dades generades estan subjectes a la Llicència oberta d'ús d'informació - Catalunya.
El codi font contingut en aquest repositori té una llicència MIT (vegeu LICENSE.txt)
The data folder contains the Python script used to scrape the data from the Catalan governement sites.
Install requirements (in your own virtualenv):
pip install -r requirements.txt
To show available commands:
python scraper.py --help
- Update the
YEARvariable inscraper.py - Manually create the file
festes_catalunya_{year}.csv - Run
python scraper.py places-idsto get the updated locations - Run
python scraper.py all-placesto get all holidays - Run
python scraper.py web-filesto get the new production files - Update the constant
yearsin fileapp.jsTODO: automate - Replace all occurences of the previous year with the new one in file
index.htmlTODO: automate - Update redirect in
netlify.toml
The web folder contains the web application. To develop it locally, run:
npm install
npm run dev
Generated datasets are subject to Llicència oberta d'ús d'informació Catalunya.
The source code of this repository is released under the MIT license (see LICENSE.txt)