add class to read all contacts' emails
This commit is contained in:
@@ -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
@@ -1,18 +1,21 @@
|
|||||||
from mrz.generator.td1 import TD1CodeGenerator
|
from mrz.generator.td1 import TD1CodeGenerator
|
||||||
|
|
||||||
first_name = "yihan"
|
first_name = "Zhen"
|
||||||
last_name = "CHEN"
|
last_name = "XU"
|
||||||
document_number = "XKJ0WSK30"
|
document_number = "E10805074"
|
||||||
birth_day = "980829"
|
birth_day = "990620"
|
||||||
sex = "F"
|
sex = "F"
|
||||||
# optinal_data = "MFMLMANK<<<<A9" #14位
|
# optinal_data = "MFMLMANK<<<<A9" #14位
|
||||||
nationality = "CHN"
|
nationality = "CHN"
|
||||||
country_code = "FRA"
|
country_code = "HUN"
|
||||||
optinal_data = "<991643034" # 14位
|
# optinal_data = "<E10805074" # 14位
|
||||||
|
optinal_data = None
|
||||||
document_prefix = "IR"
|
document_prefix = "IR"
|
||||||
expire_date = "230515"
|
expire_date = "240801"
|
||||||
|
if optinal_data is not None:
|
||||||
code = TD1CodeGenerator(document_prefix, country_code, document_number, birth_day, sex, expire_date, nationality,
|
code = TD1CodeGenerator(document_prefix, country_code, document_number, birth_day, sex, expire_date, nationality,
|
||||||
last_name, first_name, optional_data1=optinal_data)
|
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)
|
print(code)
|
||||||
|
|||||||
Reference in New Issue
Block a user