diff --git a/app/majles_gn_tree.py b/app/majles_gn_tree.py index a76be4d..791610e 100644 --- a/app/majles_gn_tree.py +++ b/app/majles_gn_tree.py @@ -294,17 +294,17 @@ def import_option_base_list(elastic): "main_key": "qasection_before_info_commission", "main_label": "پروند - عنوان کمیسیونها", }, - {"main_key": "rgsection_tsref", "main_label": "مقررات - مرجع تصویب ها"}, - {"main_key": "qasection_tsref", "main_label": "قانون - مرجع تصویب ها"}, + {"main_key": "rgsection_tsref", "main_label": "شناسنامه مقررات - مرجع تصویب ها"}, + {"main_key": "qasection_tsref", "main_label": "شناسنامه قانون - مرجع تصویب ها"}, { "group_key": "majles_it_base", "main_key": "qasection_qanon_etebar", - "main_label": "وضعیت اعتبار قانون", + "main_label": "قانون - وضعیت اعتبار", }, { "group_key": "majles_it_base", "main_key": "qasection_state_etebar", - "main_label": "وضعیت اعتبار جزء قانون", + "main_label": "قانون - وضعیت اعتبار جزء", }, {"main_key": "qasection_doc_tags", "main_label": "انواع قانون برای فهرست سازی"}, {"main_key": "qasection_doc_states", "main_label": "صحت سنجی - وضعیت قانون"}, @@ -538,20 +538,7 @@ def import_option_parleman_members(elastic, index_name_o="gn_option"): elastic.es.index(index=index_name_o, id=eid, document=data) -if __name__ == "__main__": - - index_name_o="gn_option" - - - # ---مرحله اول - # import_tlist_projects() - - import_option_base_list(elastic) - - import_option_parleman_members(elastic) - - import_option_codes(elastic) - +def import_option_others(elastic, index_name_o="gn_option"): ###------------------------------------------- res = get_organs() @@ -607,7 +594,7 @@ if __name__ == "__main__": titles.append(title) eid = "mb_organ_1" - group_key = "عناوین انتخابی برنامه" + group_key = "عناوین انتخابی فرمها" main_key = "organ_defualt" main_label = "سازمانهای پیش فرض قانون جدید" @@ -621,3 +608,24 @@ if __name__ == "__main__": "titles": titles, } elastic.es.index(index=index_name_o, id=eid, document=data) + +if __name__ == "__main__": + + index_name_o="gn_option" + + + # ---مرحله اول + # import_tlist_projects() + + # import_option_base_list(elastic) + + # import_option_parleman_members(elastic) + + # import_option_codes(elastic) + + # import_option_others(elastic) + + + # elastic.backupIndexToZipfile("G:/Project2/111", "gn_tree", "gn_tree") + # elastic.backupIndexToZipfile("G:/Project2/111", "gn_option", "gn_option") + diff --git a/app/monir_gn_tree.py b/app/monir_gn_tree.py index 7844c35..000e039 100644 --- a/app/monir_gn_tree.py +++ b/app/monir_gn_tree.py @@ -28,8 +28,11 @@ load_dotenv(dotenv_path="config.env") # host = os.getenv("HOST_160_LOCAL") # password = os.getenv("HOST_160_PASS") -host = os.getenv("HOST_60") -password = os.getenv("HOST_60_PASS") +# host = os.getenv("HOST_60") +# password = os.getenv("HOST_60_PASS") + +host = os.getenv("HOST_133") +password = os.getenv("HOST_133_PASS") # print(host) # print(password) @@ -403,5 +406,10 @@ if __name__ == "__main__": # import_option_base_list(elastic) - import_option_ostan_shahr(elastic) + # import_option_ostan_shahr(elastic) + + # elastic.backupIndexToZipfile("G:/Project2/111", "mn_sanad_temp", "mn_sanad") + # elastic.backupIndexToZipfile("G:/Project2/111", "mn_steps_temp", "mn_steps") + elastic.backupIndexToZipfile("G:/Project2/111", "gn_calendar", "gn_calendar") +