From 49ba23c3cd3f10111ea09b08fd958165dd0a9adf Mon Sep 17 00:00:00 2001 From: Jakukyo Friel Date: Wed, 27 Jul 2016 07:56:38 +0800 Subject: [PATCH] Refine README: (#31) * Add commands to install dependencies on debian. * README: mention `requests` in dependencies. Thanks @h82k to point out this in #29 * README: fix broken link. * Improve instructions on uncompress emoji.cache. See #29 * README: remove unnecessary unpack command. > unpacking emoji should not be necessary. > I think things should work without running emoji-cache-tool.py. > That tool is mainly for me to see what's in the cache. -- @ppwwyyxx in #29 * README: fix `dump-html.py` command line. See #29 --- README.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 878fe86..b6d7d6e 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ If it doesn't work, please leave an issue together with your phone/OS/wechat ver ### How to use: #### Dependencies: + ++ requests + python-PIL + [PyQuery](https://pypi.python.org/pypi/pyquery/1.2.1) + [pysox](https://pypi.python.org/pypi/pysox/0.3.6.alpha) @@ -32,6 +34,14 @@ If it doesn't work, please leave an issue together with your phone/OS/wechat ver + Silk audio decoder (included; just run `./third-party/compile_silk.sh`) + gnu-sed +On Debian/Ubuntu systems, these dependencies can be installed via: + +```sh +sudo apt-get install python-requests python-pil python-pyquery python-numpy libsox-dev +sudo pip install pysqlcipher csscompressor +sudo pip install --pre pysox +``` + #### Get Necessary Data: Note that commands involving `./android-interact.sh` are meant to be run on the computer. @@ -79,8 +89,11 @@ Note that commands involving `./android-interact.sh` are meant to be run on the + What you'll need in the end is a `resource` directory with the following subdir: `emoji,image2,sfs,video,voice2`. -+ (Optional) Download uncompress the emoji cache from [here](https://github.com/ppwwyyxx/wechat-dump/releases/download/0.1/emoji.cache) - and put it under `wechat-dump`. This will avoid downloading lots of emojis in rendering. ++ (Optional) Download uncompress the emoji cache from [here](https://github.com/ppwwyyxx/wechat-dump/releases/download/0.1/emoji.cache.tar.bz2) + and put it under `resource/emoji`. This will avoid downloading lots of emojis in rendering. + + wget -c https://github.com/ppwwyyxx/wechat-dump/releases/download/0.1/emoji.cache.tar.bz2 + tar xf emoji.cache.tar.bz2 #### Run: + Parse and dump text messages of __every__ chat (requires `decrypted.db`): @@ -104,9 +117,13 @@ Note that commands involving `./android-interact.sh` are meant to be run on the + Dump messages of one contact to html, containing voice messages, emojis, and images (requires `decrypted.db`, `avatar.index`, and `resource`): ``` - ./dump-html.py decrypted.db avatar.index resource "" output.html + ./dump-html.py "" ``` + The output file is `output.html`. + + Check `./dump-html.py -h` for using different paths. + ### Examples: See [here](http://ppwwyyxx.com/static/wechat/example.html) for an example html.