Skip to content

Commit 802fab2

Browse files
committed
tttt
1 parent 9f2e491 commit 802fab2

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

mdict/mdict_utils/mdict_utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ def check_xapian():
268268
import xapian
269269
database = xapian.Database()
270270
except Exception:
271+
print('xapian does not exists!')
271272
return False
272273

273274
return True

mdict/mdict_utils/mdict_utils2.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def extract_index(idx_list):
121121
except Exception as e:
122122
print_log_info(e)
123123
t2 = time.perf_counter()
124-
print_log_info('all indexes extracting completed.', start=t1, end=t2)
124+
print_log_info('all xapian indexes of zim has been extracted.', start=round(t1, 2), end=round(t2, 2))
125125

126126

127127
def extract_index_from_zim(root, zim):
@@ -148,4 +148,4 @@ def __init__(self, mdx, mdd_list, g_id, icon, num):
148148
self.mdd_list = mdd_list
149149
self.g_id = g_id
150150
self.icon = icon
151-
self.num = num
151+
self.num = num

script/mdict_es.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def create_es_with_pk(dic_pk):
364364

365365
create_es(dic, mdx, md5)
366366
t2 = time.perf_counter()
367-
print(t2 - t1, mdx.get_fname(), mdx.get_len())
367+
print(round(t2 - t1, 2), mdx.get_fname(), mdx.get_len())
368368
else:
369369
print(dic.pk, dic.mdict_name, 'not exists in cache. maybe the mdict root path is not correct.')
370370
else:
@@ -445,7 +445,7 @@ def create_all_es(pk_list=[]):
445445
print(mdx.get_fname(), 'not exists in database.')
446446

447447
t3 = time.perf_counter()
448-
print('indexing time', t3 - t0)
448+
print('indexing time', round(t3 - t0, 2))
449449

450450

451451
if __name__ == '__main__':
@@ -473,6 +473,6 @@ def create_all_es(pk_list=[]):
473473
create_all_es()
474474
elif deleteall_param:
475475
delete_all_es()
476-
print('index operation has completed.')
476+
print('es index operation has completed.')
477477
except ConnectionError as e:
478478
print(e)

0 commit comments

Comments
 (0)