A chrome-edit-server插件,允许用户编辑Gmail消息
项目描述
将一小部分HTML转换为文本并返回。根据经验,这应该足够编辑Gmail新compose窗口中的“纯文本”,但可能会有些脆弱。
>>> c = GmailCodec() >>> content = ("3<div><br></div><div><br></div><div><br></div><div>" ... "2</div><div><br></div><div><br></div><div>" ... "1</div><div><br></div><div>" ... "0</div><div>" ... "EOF</div>")
>>> plaintext = c.decode(content) >>> print plaintext 3 <BLANKLINE> <BLANKLINE> <BLANKLINE> 2 <BLANKLINE> <BLANKLINE> 1 <BLANKLINE> 0 EOF >>> html = c.encode(plaintext) >>> print html 3<br><br><br><br>2<br><br><br>1<br><br>0<br>EOF
此外,对于实体和未知标签的保留
>>> print c.encode(c.decode('<<foo x="1">foo!</foo>')) <<foo x="1">foo!</foo>
实体
>>> print repr(c.decode(" ")) ' ' >>> print repr(c.encode(c.decode(" "))) ' '
制表符
>>> print repr(c.encode('\t')) ' '
间距
>>> print c.encode('> 1') > 1
需求
安装
运行以下命令从PyPI安装
pip install chrome-edit-server-gmail-filter
下次您从Gmail使用“编辑服务器”兼容的chrome插件(如“TextAid”或“Edit With Emacs”)时,此过滤器将自动调用。
项目详情
关闭
chrome-edit-server-gmail-filter-0.3.1.tar.gz的散列值
算法 | 散列摘要 | |
---|---|---|
SHA256 | 5e23d9ceb67eb6aea60db43caa80b183e72a461e84295e6b673a6aff70ba2746 |
|
MD5 | 3096aebc5a7369394b056c3c8ed0eb7e |
|
BLAKE2b-256 | 48c7ca05ee3f1657c46f8bf8d6f1179e26db093572ea38a0db9804f3395bcbae |