From 1d5ef7ed4c63c22ccceed392539ba785e85928cd Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 1 Oct 2023 18:50:26 +0200 Subject: Change configuration format to .yml. --- gis-observation-map | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gis-observation-map b/gis-observation-map index a1ce006..c9de278 100755 --- a/gis-observation-map +++ b/gis-observation-map @@ -23,7 +23,7 @@ import sys import json import re import requests -import configparser +import yaml import tempfile from datetime import datetime from requests.exceptions import HTTPError @@ -56,9 +56,9 @@ gpkg_drv = ogr.GetDriverByName('GPKG') geojson_drv = ogr.GetDriverByName('GeoJSON') programName = 'gis-observation-map' +with Path(xdg_config_home()).joinpath(programName).joinpath('config.yml').open(mode='r') as fp: + config = yaml.load(fp, Loader=yaml.FullLoader) -config = configparser.ConfigParser() -config.read(Path(xdg_config_home()).joinpath(programName).joinpath('config')) if 'QGIS' not in config.keys() or config['QGIS'] is None: config['QGIS'] = {} -- cgit v1.2.3