monitoring/scripts/readpolyhoods.py
Adrian Schmutzler bb61351fbf Polyhoods: Introduce database support and read functions
Polyhoods need to be read manually. Running
scripts/readpolyhoods.py will erase both tables and reread data.

At the moment, the URL points to a test setup.

This requires changes to the MySQL database!

This is meant for later use and does NOT add any data to the
Monitoring at the moment.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-05-11 23:50:03 +02:00

16 lines
306 B
Python
Executable File

#!/usr/bin/python3
# Execute manually
import os
import sys
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__) + '/' + '..'))
from ffmap.hoodtools import update_hoods_poly
from ffmap.mysqltools import FreifunkMySQL
mysql = FreifunkMySQL()
update_hoods_poly(mysql)
mysql.commit()
mysql.close()