refactor folders py 3

This commit is contained in:
hsafaei
2025-09-02 13:04:48 +03:30
parent 5a6647bbf2
commit 4b449268d3
13 changed files with 21 additions and 11 deletions
+50
View File
@@ -0,0 +1,50 @@
import os
from dotenv import load_dotenv
from common.text_normalizer import TextNormalizer
# from general import *
from common.general_functions import *
from common.elastic_helper import ElasticHelper
from create_relation_tags import *
from temp_refactor_gn_dataset import *
from temp_LawSection_content import *
# cursor, cnxn = create_cursor()
# import_law_section_to_elastic(cursor)
load_dotenv(dotenv_path='config.env')
host=os.getenv('HOST_160')
password=os.getenv('HOST_160_PASS')
print(host)
# print(password)
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
def import_prev_qanon_info(elastic, file_excel, index_name_o):
# خواند اکسل file_excel
list = []
for item in list :
# item ....
eid = 0 ### ??
data = {
}
try:
resp = elastic.update_index_doc(True, index_name_o, eid, data)
except Exception as e:
save_error(id, e)
file_excel = ''
import_prev_qanon_info(elastic, file_excel, "mj_qa_section" )