diff --git a/README.md b/README.md index e64e00b..a0de5be 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ Screenshots: ![byvoid](https://github.com/ppwwyyxx/wechat-dump/raw/master/screenshots/byvoid.jpg) ### TODO ++ Export all messages to libchat, and render messages from libchat + Search by uid/username + Skip existing files when copying android resources + Fix rare unhandled types: > 10000 and < 0 diff --git a/libchat/README.md b/libchat/README.md new file mode 100644 index 0000000..a38a3e6 --- /dev/null +++ b/libchat/README.md @@ -0,0 +1,19 @@ + +# A Universal Chat History Management + +## Fields + +Table Message: ++ source(enum): can be 0:wechat, ... ++ time(time) ++ sender: id of the sender. id follows the name convention of source ++ chatroom: id of the chatroom (can be a private chat with a sender, or a group chat) ++ text: text content. emojis are encoded according to the source ++ image: binary of the image. ++ sound: binary of an audio ++ extra_data: other possible data specific to the source. + +Table Wechat: ++ avatars ++ nicknames ++ emojis diff --git a/plot_num_msg_by_time.py b/plot_num_msg_by_time.py index 92ec33f..1e17c7b 100755 --- a/plot_num_msg_by_time.py +++ b/plot_num_msg_by_time.py @@ -1,7 +1,7 @@ #!/usr/bin/env python2 # -*- coding: UTF-8 -*- # File: plot_num_msg_by_time.py -# Date: Thu Dec 25 00:35:57 2014 +0800 +# Date: Tue Feb 03 21:12:30 2015 +0800 # Author: Yuxin Wu from lib.parser import WeChatDBParser @@ -17,7 +17,7 @@ if len(sys.argv) != 3: db_file = sys.argv[1] name = ensure_unicode(sys.argv[2]) -every_k_days = 3 +every_k_days = 2 parser = WeChatDBParser(db_file) msgs = parser.msgs_by_talker[name] @@ -26,7 +26,7 @@ start_time = times[0] diffs = [(x - start_time).days for x in times] max_day = diffs[-1] -width = 30 +width = 20 numbers = range((max_day / width + 1) * width + 1)[::width] labels = [(start_time + timedelta(x)).strftime("%m/%d") for x in numbers] plt.xticks(numbers, labels)