update readme
This commit is contained in:
+2
-6
@@ -53,15 +53,11 @@ if [[ $1 == "db" || $1 == "res" ]]; then
|
|||||||
adb pull $MM_DIR/MicroMsg/$chooseUser/EnMicroMsg.db
|
adb pull $MM_DIR/MicroMsg/$chooseUser/EnMicroMsg.db
|
||||||
[[ -f EnMicroMsg.db ]] && \
|
[[ -f EnMicroMsg.db ]] && \
|
||||||
echo "Database successfully downloaded to EnMicroMsg.db" || {
|
echo "Database successfully downloaded to EnMicroMsg.db" || {
|
||||||
>&2 echo "Failed to pull database by adb"
|
>&2 echo "Failed to pull database by adb!"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
adb pull $MM_DIR/MicroMsg/$chooseUser/sfs/avatar.index
|
adb pull $MM_DIR/MicroMsg/$chooseUser/sfs/avatar.index
|
||||||
[[ -f avatar.index ]] && \
|
[[ -f avatar.index ]] && echo "Avatar index successfully downloaded to avatar.index"
|
||||||
echo "Avatar index successfully downloaded to avatar.index" || {
|
|
||||||
>&2 echo "Failed to pull avatar index by adb, are you using latest version of wechat?"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Usage: $0 <res|db>"
|
echo "Usage: $0 <res|db>"
|
||||||
|
|||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
class MessageSlicerByTime(object):
|
class MessageSlicerByTime:
|
||||||
""" Separate messages into slices by time,
|
""" Separate messages into slices by time,
|
||||||
for time display in html.
|
for time display in html.
|
||||||
A new day always begins a new slice.
|
A new day always begins a new slice.
|
||||||
@@ -28,11 +28,11 @@ class MessageSlicerByTime(object):
|
|||||||
assert len(msgs) == sum([len(k) for k in ret])
|
assert len(msgs) == sum([len(k) for k in ret])
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
class MessageSlicerBySize(object):
|
class MessageSlicerBySize:
|
||||||
""" Separate messages into slices by max slice size,
|
""" Separate messages into slices by max slice size,
|
||||||
to avoid too large html.
|
to avoid too large html.
|
||||||
"""
|
"""
|
||||||
def __init__(self, size=2000):
|
def __init__(self, size=1500):
|
||||||
""" a slice will have <= 1.5 * cnt messages"""
|
""" a slice will have <= 1.5 * cnt messages"""
|
||||||
self.size = size
|
self.size = size
|
||||||
assert self.size > 1
|
assert self.size > 1
|
||||||
|
|||||||
Reference in New Issue
Block a user