add class to read all contacts' emails

This commit is contained in:
2023-07-27 14:10:02 +02:00
parent 1ae84725df
commit f441a2796f
2 changed files with 27 additions and 11 deletions
+13
View File
@@ -0,0 +1,13 @@
from src.db.mongo_manager import MONGO_STORE_MANAGER
from src.utils.excel_reader import ExcelHelper
def upload_contacts_list():
excel_helper = ExcelHelper()
contacts_to_book = excel_helper.read_contacts("/Users/lpan/Desktop/yahoo_aol.xlsx")
return contacts_to_book
if __name__ == '__main__':
contacts_to_book = upload_contacts_list()
MONGO_STORE_MANAGER.upload_contact_list(contacts_to_book)
+13 -10
View File
@@ -1,18 +1,21 @@
from mrz.generator.td1 import TD1CodeGenerator
first_name = "yihan"
last_name = "CHEN"
document_number = "XKJ0WSK30"
birth_day = "980829"
first_name = "Zhen"
last_name = "XU"
document_number = "E10805074"
birth_day = "990620"
sex = "F"
# optinal_data = "MFMLMANK<<<<A9" #14位
nationality = "CHN"
country_code = "FRA"
optinal_data = "<991643034" # 14位
country_code = "HUN"
# optinal_data = "<E10805074" # 14位
optinal_data = None
document_prefix = "IR"
expire_date = "230515"
code = TD1CodeGenerator(document_prefix, country_code, document_number, birth_day, sex, expire_date, nationality,
expire_date = "240801"
if optinal_data is not None:
code = TD1CodeGenerator(document_prefix, country_code, document_number, birth_day, sex, expire_date, nationality,
last_name, first_name, optional_data1=optinal_data)
else:
code = TD1CodeGenerator(document_prefix, country_code, document_number, birth_day, sex, expire_date, nationality,
last_name, first_name)
print(code)