plan excel
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
from config_base import *
|
||||
from general_functions import *
|
||||
from text_normalizer import TextNormalizer
|
||||
# from excel_helper import ExcelHelper
|
||||
import pandas as pd
|
||||
import requests
|
||||
from config_base import *
|
||||
|
||||
text_normalizer = TextNormalizer()
|
||||
#
|
||||
|
||||
|
||||
ADD_LIST_ROUTE = "project/add"
|
||||
ADD_ITEM_ROUTE = "subject/add"
|
||||
GET_H = lambda x: x["HIERARCHY"]
|
||||
|
||||
def insertProejct(title):
|
||||
# ایجاد فهرست جدید
|
||||
|
||||
ADD_LIST_QUERY = {
|
||||
"title": title,
|
||||
"type": 3,
|
||||
"item_state": 1,
|
||||
"ispublic" : 1,
|
||||
}
|
||||
|
||||
requests.post(BASE_URL + 'list/' + ADD_LIST_ROUTE, data=ADD_LIST_QUERY, headers = HEADERS)
|
||||
projectid = 6
|
||||
return projectid
|
||||
|
||||
|
||||
def import_excel(elastic, file_excel):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
insertProejct('آموزش و پرورش')
|
||||
|
||||
# load_dotenv(dotenv_path='config.env')
|
||||
|
||||
# host=os.getenv('HOST_160')
|
||||
# password=os.getenv('HOST_160_PASS')
|
||||
|
||||
# # host=os.getenv('HOST_112')
|
||||
# # password=os.getenv('HOST_112_PASS')
|
||||
|
||||
|
||||
# path_base_map = "G:/Project2/gateway2_main/repo/_other/"
|
||||
# elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||
|
||||
|
||||
# import_excel(elastic, "./data/plan.xlsx")
|
||||
Reference in New Issue
Block a user