4 Star 7 Fork 1

SleepySoft / History

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
indexer.py 1012 Bytes
一键复制 编辑 原始数据 按行查看 历史
import sys
import traceback
from core import *
def main():
indexer = HistoricalRecordIndexer()
if len(sys.argv) > 1:
for arg in sys.argv[1:]:
indexer.index_path(arg)
else:
depot_path = HistoricalRecordLoader.join_local_depot_path('China_CN')
indexer.index_path(depot_path)
indexer.dump_to_file('depot/history.index')
# ----------------------------------------------------------------------------------------------------------------------
def exception_hook(type, value, tback):
# log the exception here
print('Exception hook triggered.')
print(type)
print(value)
print(tback)
# then call the default handler
sys.__excepthook__(type, value, tback)
if __name__ == "__main__":
sys.excepthook = exception_hook
try:
main()
except Exception as e:
print('Error =>', e)
print('Error =>', traceback.format_exc())
exit()
finally:
pass
1
https://gitee.com/SleepySoft/History.git
git@gitee.com:SleepySoft/History.git
SleepySoft
History
History
master

搜索帮助