Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BillLi
ItChat
提交
75a6324a
I
ItChat
项目概览
BillLi
/
ItChat
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
ItChat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
75a6324a
编写于
2月 29, 2016
作者:
L
LittleCoder
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Classification
上级
b7da4ad3
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
49 addition
and
11 deletion
+49
-11
.gitignore
.gitignore
+3
-0
ItChat.py
ItChat.py
+5
-5
itchat/README.md
itchat/README.md
+0
-0
itchat/__init__.py
itchat/__init__.py
+0
-0
itchat/argparser.py
itchat/argparser.py
+0
-0
itchat/client.py
itchat/client.py
+2
-2
itchat/config.py
itchat/config.py
+0
-0
itchat/log.py
itchat/log.py
+0
-0
itchat/out.py
itchat/out.py
+0
-0
itchat/plugin/QRCode.py
itchat/plugin/QRCode.py
+0
-0
itchat/plugin/__init__.py
itchat/plugin/__init__.py
+1
-0
itchat/storage.py
itchat/storage.py
+0
-0
itchat/tools.py
itchat/tools.py
+0
-0
plugin/ChatLikeCMD.py
plugin/ChatLikeCMD.py
+2
-2
plugin/QRCode.py
plugin/QRCode.py
+33
-0
plugin/__init__.py
plugin/__init__.py
+1
-0
plugin/tuling.json
plugin/tuling.json
+0
-0
plugin/tuling.py
plugin/tuling.py
+0
-0
robot.py
robot.py
+2
-2
未找到文件。
.gitignore
0 → 100644
浏览文件 @
75a6324a
*.pyc
log/*
storage/*
ItChat.py
浏览文件 @
75a6324a
#coding=utf8
import
time
import
storage
,
out
,
argparser
,
robot
from
client
import
WeChatClient
from
ChatLikeCMD
import
ChatLikeCMD
import
itchat.storage
,
itchat
.
out
,
itchat
.
argparser
,
robot
from
itchat.
client
import
WeChatClient
from
plugin.
ChatLikeCMD
import
ChatLikeCMD
ROBOT
=
False
...
...
@@ -14,7 +14,7 @@ def demo_robot(s, msgList, client): # ONLY FOR DEMO
if
s
.
find_nickname
(
msg
[
'FromUserName'
]):
robot
.
deal_with_msg
(
msg
,
s
,
client
)
time
.
sleep
(.
1
)
if
__name__
==
'__main__'
:
client_s
=
storage
.
Storage
()
client_s
=
itchat
.
storage
.
Storage
()
if
ROBOT
:
client
=
WeChatClient
(
client_s
,
robot
=
True
)
else
:
...
...
@@ -29,4 +29,4 @@ if __name__ == '__main__':
front
=
ChatLikeCMD
(
header
=
str
(
client_s
.
find_nickname
(
client_s
.
userName
)),
symbol
=
'>'
,
inPip
=
msgList
)
cmdList
=
front
.
get_command_pip
()
front
.
start
()
argparser
.
startCommandLine
(
client_s
,
client
,
msgList
,
front
,
cmdList
)
itchat
.
argparser
.
startCommandLine
(
client_s
,
client
,
msgList
,
front
,
cmdList
)
README.md
→
itchat/
README.md
浏览文件 @
75a6324a
文件已移动
__init__.py
→
itchat/
__init__.py
浏览文件 @
75a6324a
文件已移动
argparser.py
→
itchat/
argparser.py
浏览文件 @
75a6324a
文件已移动
client.py
→
itchat/
client.py
浏览文件 @
75a6324a
...
...
@@ -6,12 +6,12 @@ from urllib import unquote
import
config
,
storage
,
out
,
log
,
tools
try
:
from
QRCode
import
QRCode
from
plugin.
QRCode
import
QRCode
CMD_QRCODE
=
True
except
:
CMD_QRCODE
=
False
CMD_QRCODE
=
False
#
CMD_QRCODE = False
BASE_URL
=
config
.
BASE_URL
DEBUG
=
False
...
...
config.py
→
itchat/
config.py
浏览文件 @
75a6324a
文件已移动
log.py
→
itchat/
log.py
浏览文件 @
75a6324a
文件已移动
out.py
→
itchat/
out.py
浏览文件 @
75a6324a
文件已移动
QRCode.py
→
itchat/plugin/
QRCode.py
浏览文件 @
75a6324a
文件已移动
itchat/plugin/__init__.py
0 → 100644
浏览文件 @
75a6324a
__version__
=
'0.1b'
storage.py
→
itchat/
storage.py
浏览文件 @
75a6324a
文件已移动
tools.py
→
itchat/
tools.py
浏览文件 @
75a6324a
文件已移动
ChatLikeCMD.py
→
plugin/
ChatLikeCMD.py
浏览文件 @
75a6324a
...
...
@@ -143,10 +143,10 @@ class ChatLikeCMD():
self
.
reprint_input
()
self
.
outPip
.
append
(
c
)
time
.
sleep
(
0.02
)
if
fitc1
in
dir
():
if
'fitc1'
in
dir
():
self
.
process_char
(
fitc1
)
self
.
cursor
+=
1
if
fitc2
in
dir
():
if
'fitc2'
in
dir
():
self
.
process_char
(
fitc2
)
self
.
cursor
+=
1
elif
ord
(
c
)
==
3
:
# Ctrl+C
...
...
plugin/QRCode.py
0 → 100644
浏览文件 @
75a6324a
from
PIL
import
Image
import
sys
,
os
import
config
QR_DIR
=
config
.
QR_DIR
OS
=
config
.
OS
BLOCK
=
'
\xA1\xF6
'
if
OS
==
'Windows'
else
'MM'
class
QRCode
():
def
__init__
(
self
,
fileName
,
size
,
padding
=
0
,
background
=
'BLACK'
):
self
.
size
=
size
self
.
padding
=
padding
self
.
img
=
Image
.
open
(
fileName
)
self
.
times
=
self
.
img
.
size
[
0
]
/
(
size
+
padding
*
2
)
self
.
rgb
=
self
.
img
.
convert
(
'RGB'
)
self
.
white
=
BLOCK
if
background
==
'BLACK'
else
' '
self
.
black
=
' '
if
background
==
'BLACK'
else
BLOCK
def
print_qr
(
self
):
sys
.
stdout
.
write
(
' '
*
50
+
'
\r
'
)
sys
.
stdout
.
flush
()
print
self
.
white
*
(
self
.
size
+
2
)
startPoint
=
self
.
padding
+
0.5
for
y
in
range
(
self
.
size
):
sys
.
stdout
.
write
(
self
.
white
)
for
x
in
range
(
self
.
size
):
r
,
g
,
b
=
self
.
rgb
.
getpixel
(((
x
+
startPoint
)
*
self
.
times
,
(
y
+
startPoint
)
*
self
.
times
))
sys
.
stdout
.
write
(
self
.
white
if
r
>
127
else
self
.
black
)
print
self
.
white
print
self
.
white
*
(
self
.
size
+
2
)
if
__name__
==
'__main__'
:
q
=
QRCode
(
os
.
path
.
join
(
QR_DIR
,
'QR.jpg'
),
37
,
3
,
'BLACK'
)
q
.
print_qr
()
plugin/__init__.py
0 → 100644
浏览文件 @
75a6324a
__version__
=
'0.1b'
tuling.json
→
plugin/
tuling.json
浏览文件 @
75a6324a
文件已移动
tuling.py
→
plugin/
tuling.py
浏览文件 @
75a6324a
文件已移动
robot.py
浏览文件 @
75a6324a
import
out
import
itchat.
out
try
:
import
tuling
import
plugin.
tuling
TULING
=
True
except
:
TULING
=
False
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录