diff --git a/android-interact.sh b/android-interact.sh index 28065d7..7bc8526 100755 --- a/android-interact.sh +++ b/android-interact.sh @@ -1,6 +1,6 @@ #!/bin/bash -e # File: android-interact.sh -# Date: Sun Apr 12 21:19:07 2015 +0900 +# Date: Fri Jun 26 10:38:07 2015 +0800 # Author: Yuxin Wu source compatibility.sh @@ -78,7 +78,7 @@ elif [[ $1 == "db_decrypt" ]]; then echo "Getting db..." $0 db echo "Decrypting db..." - ./decrypt_db.sh EnMicroMsg.db $( @@ -8,7 +8,7 @@ import sys if len(sys.argv) != 5: sys.exit("Usage: {0} ".format(sys.argv[0])) -from wechat.utils import ensure_unicode +from common.textutil import ensure_unicode from wechat.parser import WeChatDBParser from wechat.res import Resource from wechat.render import HTMLRender @@ -24,7 +24,9 @@ res = Resource(resource_dir) try: msgs = parser.msgs_by_talker[name] except: - sys.exit("Couldn't find that contact: valid contacts: " . parser.msgs_by_talker.keys); + sys.stderr.write(u"Valid Contacts: {}\n".format(u'\n'.join(parser.msgs_by_talker.keys()))) + sys.stderr.write(u"Couldn't find that contact {}.".format(name)); + sys.exit(1) render = HTMLRender(parser, res) htmls = render.render_msgs(msgs) diff --git a/dump-msg.py b/dump-msg.py index 1a01a1d..c9b502a 100755 --- a/dump-msg.py +++ b/dump-msg.py @@ -1,11 +1,11 @@ #!/usr/bin/env python2 # -*- coding: UTF-8 -*- -# File: dump_msg.py +# File: dump-msg.py # Date: Mon May 25 15:23:05 2015 +0800 # Author: Yuxin Wu from wechat.parser import WeChatDBParser -from wechat.utils import safe_filename +from common.textutil import safe_filename import sys, os if len(sys.argv) != 3: diff --git a/wechat/audio.py b/wechat/audio.py index 90ffb5f..8b9a8b4 100644 --- a/wechat/audio.py +++ b/wechat/audio.py @@ -1,7 +1,7 @@ #!/usr/bin/env python2 # -*- coding: UTF-8 -*- # File: audio.py -# Date: Thu Jun 18 00:01:49 2015 +0800 +# Date: Fri Jun 26 10:42:41 2015 +0800 # Author: Yuxin Wu import os