forked from Olav63/outils_OSM
bug fixes et améliorations, paramétrages #1
4
rdoo.py
4
rdoo.py
@ -31,8 +31,8 @@ import os
|
|||||||
import argparse
|
import argparse
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
from osm_vc63 import errors
|
from rdoopy import errors
|
||||||
from osm_vc63.utils import Utils
|
from rdoopy.utils import Utils
|
||||||
|
|
||||||
OVERPASS_URL = "http://overpass-api.de/api/interpreter"
|
OVERPASS_URL = "http://overpass-api.de/api/interpreter"
|
||||||
GEO_API_URL = "https://api-adresse.data.gouv.fr"
|
GEO_API_URL = "https://api-adresse.data.gouv.fr"
|
||||||
|
@ -29,7 +29,7 @@ import csv
|
|||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
import requests
|
import requests
|
||||||
from pyexcel_ods3 import save_data
|
from pyexcel_ods3 import save_data
|
||||||
from osm_vc63 import errors
|
from rdoopy import errors
|
||||||
|
|
||||||
|
|
||||||
class Utils:
|
class Utils:
|
||||||
@ -44,7 +44,7 @@ class Utils:
|
|||||||
self.geo_api_url = geo_api_url
|
self.geo_api_url = geo_api_url
|
||||||
self.dossier_resultats = dossier_resultats
|
self.dossier_resultats = dossier_resultats
|
||||||
|
|
||||||
with open("traductions.json", encoding="utf-8") as trads:
|
with open("configuration/traductions.json", encoding="utf-8") as trads:
|
||||||
self.traductions = json.load(trads)
|
self.traductions = json.load(trads)
|
||||||
|
|
||||||
self.lecture_requetes()
|
self.lecture_requetes()
|
||||||
@ -271,10 +271,12 @@ class Utils:
|
|||||||
def lecture_requetes(self):
|
def lecture_requetes(self):
|
||||||
"""Lecture des requêtes dans les fichiers de configuration"""
|
"""Lecture des requêtes dans les fichiers de configuration"""
|
||||||
|
|
||||||
with open("requetes.json", encoding="utf-8") as reqs:
|
with open("configuration/requetes.json", encoding="utf-8") as reqs:
|
||||||
self.json_reqs = json.load(reqs)
|
self.json_reqs = json.load(reqs)
|
||||||
|
|
||||||
with open("champs_generiques.json", encoding="utf-8") as champs_generiques:
|
with open(
|
||||||
|
"configuration/champs_generiques.json", encoding="utf-8"
|
||||||
|
) as champs_generiques:
|
||||||
self.json_champs_generiques = json.load(champs_generiques)
|
self.json_champs_generiques = json.load(champs_generiques)
|
||||||
|
|
||||||
for req in self.json_reqs:
|
for req in self.json_reqs:
|
Loading…
x
Reference in New Issue
Block a user