list chats

This commit is contained in:
Yuxin Wu
2016-01-21 00:53:53 -05:00
parent 06c37f0b63
commit 90f2b47ca5
Executable
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# File: list-chats.py
# Author: Yuxin Wu <[email protected]>
from wechat.parser import WeChatDBParser
import sys
db_file = sys.argv[1]
parser = WeChatDBParser(db_file)
chats = parser.msgs_by_chat.keys()
for k in chats:
print k.encode('utf-8'), parser.contacts_rev[k].encode('utf-8')