bbcondeparser-1.1.0
توضیحات
parser for Conde Nast BBCode
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | bbcondeparser-1.1.0 |
| نام | bbcondeparser |
| نسخه کتابخانه | 1.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Conde Nast Digital UK |
| ایمیل نویسنده | condenet.technical@condenast.co.uk |
| آدرس صفحه اصلی | https://github.com/cnduk/bbcondeparser |
| آدرس اینترنتی | https://pypi.org/project/bbcondeparser/ |
| مجوز | MIT |
BB Condé Parser
===============
A portable, extensible BB Code parser written by Condé Nast Britain
Hello, World!
-------------
.. code-block:: python
from bbcondeparser import BaseTag, BaseTreeParser
class ExcitedTag(BaseTag):
tag_name = 'excite'
def _render(self):
child_text = self.render_children()
return '<b><i>{}</i></b>'.format(child_text)
class Parser(BaseTreeParser):
tags = [ExcitedTag]
parsed = Parser("[excite]Hello, World![/excite]")
print(parsed.render())
.. code-block:: shell
>>> python hello_world.py
<b><i>Hello, World!</i></b>
>>>
Documentation
-------------
Further documentation is in the works, and will be present on the
`github page <https://github.com/cnduk/bbcondeparser>`_.
نحوه نصب
نصب پکیج whl bbcondeparser-1.1.0:
pip install bbcondeparser-1.1.0.whl
نصب پکیج tar.gz bbcondeparser-1.1.0:
pip install bbcondeparser-1.1.0.tar.gz