Commit 9aa408da authored by Dorian's avatar Dorian
Browse files

added layout doc

parent 50434ae2
......@@ -6,13 +6,15 @@ Information on the API can be found here:
* https://data.gov.be/fr/dataset/01593a26-ed57-498e-bec0-13011a75a773
* https://api.brussels/store/apis/info?name=fixmystreet&version=1.0.0&provider=admin
## extraction
If you want to run the script you'll need:
* python3
* sqlite3 (```sudo apt install sqlite3```)
* **sqlite3** (```sudo apt install sqlite3```)
## extracting
This will extract all the potelets incidents from the fixmystreet API and put them in a sqlite db ```potelets.db```.
**Note:** extracting all the potelets and write them in the db with the python script takes approximatelly 4h.
*Note: extracting all the potelets and write them in the db with the python script takes approximatelly 4h, it will also replace the current db.*
```
cd db
......@@ -30,4 +32,16 @@ To look at db:
## layout
next step
If you want to run the script you'll need:
* python3
* **jinja** (```pip3 install jinja2```)
```
cd layout
python3 layout.py
```
This will generate the ```potelets.html``` file, by filling the ```template.html``` with the data from the ```potelets.db```.
The layout uses **paged.js** for pagination, which need to be on a server in order to work.
Open the server in a web browser and you can get your .pdf from here.
Note that you have to rerun python script every time you make a change to the template, then the server should update automatically.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment