Files
wechat-dump/list-chats.py
T
2016-04-21 18:13:06 -04:00

18 lines
434 B
Python
Executable File

#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# File: list-chats.py
# Author: Yuxin Wu <[email protected]>
from wechat.parser import WeChatDBParser
import sys
if len(sys.argv) != 2:
print "Usage: {} db_file".format(sys.argv[0])
sys.exit(1)
db_file = sys.argv[1]
parser = WeChatDBParser(db_file)
chats = parser.msgs_by_chat.keys()
for k in chats:
print k.encode('utf-8'), '\t', parser.contacts_rev[k].encode('utf-8')