Synthèse 2025

This commit is contained in:
Alex38Lyon
2026-01-07 21:08:15 +01:00
parent ce332fd020
commit cc6b472720
56 changed files with 220276 additions and 186057 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
"""
#############################################################################################
!#############################################################################################
# #
# general_fonctions.py for pyCreateTh.py #
# #
#############################################################################################
!#############################################################################################
Alex 2025 06 09
"""
+31 -9
View File
@@ -1,7 +1,9 @@
"""
#############################################################################################
!#############################################################################################!
global_data.py for pyCreateTh.py
#############################################################################################
!#############################################################################################!
"""
Version = "2026.01.07"
@@ -37,12 +39,31 @@ parse_tro_files_by_explo = True
#################################################################################################
THERION_KEYWORDS = {
"centerline", "end centerline",
"date", "units", "flags", "team",
"calibrate", "data", "declination",
"fix", "station", "equate",
"cs", "extend", "infer",
"instrument", "grade", "clino", "compass", "length", "reverse", "topofil", "duplicate", "not",
"centerline",
"endcenterline",
"date",
"units",
"flags",
"team",
"calibrate",
"data",
"declination",
"fix",
"station",
"equate",
"cs",
"extend",
"infer",
"explo-team",
"instrument",
"grade",
"clino",
"compass",
"length",
"reverse",
"topofil",
"duplicate",
"not",
}
#################################################################################################
@@ -153,7 +174,8 @@ endscrap
#################################################################################################
datumToEPSG = {
# Datums globaux
"wgs84": "326", # UTM Nord (WGS84) - EPSG:326XX
"wgs84": "326", # UTM Nord (WGS84) - EPSG:326XX
"wgs1984": "326", # UTM Nord (WGS84) - EPSG:326XX
"etrs89": "258", # UTM Nord (ETRS89) - Europe
# Datums européens
@@ -190,12 +190,21 @@ def writecenterlineheader(file, entrance, settings, comments, data, coordsyst, c
elif thlang == u'en':
file.write(u'\t\t# If date is used, comment the ligne "declination", '
u'the date will be use to compute it\n')
file.write(u'\t\tdeclination %s %s \n'% (str(settings[5]), angleU[settings[2]]))
# file.write(u'\t\t\tteam "G.S. Vulcain" \n')
if str(settings[9]) == "":
file.write(u'\t\tdeclination %s %s \n'% (str(settings[5]), angleU[settings[2]]))
else :
file.write(u'\t\t# declination %s %s \n'% (str(settings[5]), angleU[settings[2]]))
# file.write(u'\t\t\tteam "G.S. Vulcain" \n')
file.write(u'\t\t# team "%s" \n' % club)
file.write(u'\t\t#explo-date %s\n'% str(settings[9]))
file.write(u'\t\t# explo-date %s\n'% str(settings[9]))
# file.write(u'\t\t\texplo-team "G.S. Vulcain" \n')
file.write(u'\t\t# explo-team "%s" \n' % club)
if club.count(' ') >= 2:
_club = club.replace(' ', '/', 1)
else :
_club = club
file.write(u'\t\texplo-team "%s" \n' % _club)
if icomments:
if thlang == u'en': file.write(u'\t\t# (to be completed, add many lines as you need) \n')
elif thlang == u'fr': file.write(u'\t\t# (peut être complété en ajoutant le nombre de lignes nécessaires) \n')
+5 -7
View File
@@ -16,6 +16,7 @@
TODOS : -....
"""
#################################################################################################
@@ -29,18 +30,15 @@ import pandas as pd
pd.set_option('future.no_silent_downcasting', True)
from datetime import datetime
from collections import defaultdict
from copy import deepcopy
from alive_progress import alive_bar # https://github.com/rsalmei/alive-progress
from contextlib import redirect_stdout
from Lib.survey import SurveyLoader, NoSurveysFoundException
from Lib.therion import compile_template, compile_file, get_stats_from_log
from Lib.general_fonctions import setup_logger, Colors, safe_relpath, colored_help
from Lib.general_fonctions import load_config, select_file_tk_window, release_log_file, sanitize_filename
from Lib.general_fonctions import copy_template_if_not_exists, add_copyright_header, copy_file_with_copyright, update_template_files, load_text_file_utf8
from Lib.general_fonctions import Colors, safe_relpath
from Lib.general_fonctions import sanitize_filename
from Lib.general_fonctions import copy_template_if_not_exists, copy_file_with_copyright, update_template_files, load_text_file_utf8
import Lib.global_data as globalData
from Lib.pytro2th.tro2th import convert_tro #Version local modifiée
from Lib.trox2th import analyse_xml_balises
log = logging.getLogger("Logger")
+4 -2
View File
@@ -1,7 +1,9 @@
"""
#############################################################################################
!#############################################################################################
therion.py for pyCreateTh.py
#############################################################################################
!#############################################################################################
"""
import tempfile, shutil, os, re, logging, threading, subprocess, time