Пример #1
0
 def __init__(self, root, extract_deleted, extract_source):
     self.root = root
     self.extract_deleted = extract_deleted
     self.extract_source = extract_source
     self.cache_db = self.__get_cache_db()
     self.eb = model_eb.EB(self.cache_db, JD_VERSION, u'Jingdong')
     self.model_im_col = self.eb.im
     self.need_parse = self.eb.need_parse
     self.jd_db_path, self.user_db_path = self.__get_data_db()
     self.jd_db_col = ColHelper(self.jd_db_path)
     self.user_db_col = ColHelper(self.user_db_path)
     if self.need_parse and all((self.jd_db_path, self.user_db_path)):
         self.eb.db_create()
     self.using_account = None
Пример #2
0
 def __init__(self, node, extract_deleted, extract_source, is_scripts = True):
     self.root = node
     self.extract_deleted = False
     self.extract_source = extract_source
     if is_scripts:
         self.cache = ds.OpenCachePath('Alipay')
     else:
         self.cache = "D:/cache"
     self.contacts_models = []
     self.eb = model_eb.EB(self.cache + '/Alipay', VERSION_APP_VALUE, 'Alipay')
     self.im = self.eb.im
     self.need_parse = self.eb.need_parse
     self.bcp_path = ds.OpenCachePath('tmp')
     if is_scripts:
         PA_runtime.save_cache_path(model_eb.WA_CODE_ALIPAY, self.cache + '/Alipay', self.bcp_path)
Пример #3
0
 def __init__(self, node, extract_source, extract_deleted):
     self.node = node
     self.extract_source = extract_source
     self.extract_deleted = extract_deleted
     self.cache = ds.OpenCachePath('taobao')
     self.hash = unity_c37r.md5(node.PathWithMountPoint.encode('utf-8'))
     self.eb = model_eb.EB(self.cache + '/{}'.format(self.hash), TB_VERSION,
                           u'淘宝')
     self.im = self.eb.im
     self.need_parse = self.eb.need_parse
     self.master_account = None  # 从Documents/../TBSettingsUserInfo.json(xml) 中获取
     if self.need_parse:
         self.eb.db_create()
         self.get_master_account()
     self.account = list()
     self.log = self.eb.log
     self.message_dict = dict()  # 放关于message对应的表
     self.avfs_message_dict = dict()
     self.log.set_level(1)  # 开启双重print
Пример #4
0
 def __load_eb_models(cache_db, app_version, app_name):
     eb = model_eb.EB(cache_db, app_version, app_name)
     im = eb.im
     return eb, im