2 # vim:fileencoding=utf-8
5 from google
.appengine
.api
import urlfetch
11 # 除了 Unicode 分类为“字母”的字符外,昵称里还允许哪些字符。注意即使指定空白
13 allowedSymbolInNick
= u
'+-_@.™'
15 nick_can_change
= True
18 # Gtalk 官方中文版使用非加密的协议。检测到 Gtalk 官方中文版用户时要不要提示之。
21 root
= 'lilydjwg@gmail.com'
26 blocked_away_messages
= (
27 "I'm currently away and will reply as soon as I return to eBuddy on my iPod touch",
28 'This is an autoreply: I am currently not available. Please leave your message, and I will get back to you as soon as possible.',
32 '''将代码贴到网站,返回 URL 地址 或者 None(失败)'''
33 form_data
= urllib
.urlencode({
34 'vimcn': msg
.encode('utf-8'),
37 result
= urlfetch
.fetch(url
='http://p.vim-cn.com/',
40 headers
={'Content-Type': 'application/x-www-form-urlencoded'})
41 return result
.content
.strip() + '/text' # 默认当作纯文本高亮
42 except urlfetch
.DownloadError
: