Python的简单短代码。
shrtcodes的Python项目详细描述
shrtcodes公司
pip install shrtcodes
Python的简单短代码。在
示例
包含短代码的文本。在
img
-一个短代码。在details
-成对的短代码。在
Foo bar baz. {% img "https://images.com/cutedog.jpg", "A cute dog!" %} {% details "Some extra info" %} This is some extra info. {% end_details %} Foo bar baz.
构建你的短代码:
^{pr2}$使用您的快捷方式:
fromshortcodesimportshortcodestext=shortcodes.process('...')
输出:
Foo bar baz. <img src="https://images.com/cutedog.jpg" alt="A cute dog!"/> <details><summary>Some extra info</summary>This is some extra info.</details> Foo bar baz.
更多示例
看测试。在
- 项目
标签: