rst2txt-1.1.0
توضیحات
Convert reStructuredText to plain text
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | rst2txt-1.1.0 |
| نام | rst2txt |
| نسخه کتابخانه | 1.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Stephen Finucane |
| ایمیل نویسنده | stephen@that.guru |
| آدرس صفحه اصلی | https://github.com/stephenfin/rst2txt |
| آدرس اینترنتی | https://pypi.org/project/rst2txt/ |
| مجوز | BSD |
=======
rst2txt
=======
.. image:: https://badge.fury.io/py/rst2txt.svg
:target: https://badge.fury.io/py/rst2txt
:alt: PyPi Status
.. image:: https://travis-ci.org/stephenfin/rst2txt.svg?branch=master
:target: https://travis-ci.org/stephenfin/rst2txt
:alt: Build Status
reStructuredText is pretty-damn consumable in its raw form, but extensive use
of directives and roles can hamper things or leave the document incomplete in
its raw form (cough, ``.. include``, cough).
*rst2txt* allows you to work around this by evaluating the reStructuredText
source and stripping it of most of its formatting. The end result is a document
that's more readable and has elements that don't make sense in a plain text
document, such as images, stripped.
*rst2txt* is based on the ``sphinx.writer.text.TextWriter`` writer used by
Sphinx's `TextBuilder
<https://www.sphinx-doc.org/en/1.8/usage/builders/index.html#sphinx.builders.text.TextBuilder>`__
but with the Sphinx-specific features stripped out.
Installation
------------
*rst2txt* is available on PyPI. To install, run:
.. code-block:: shell
$ pip install --user rst2txt
Usage
-----
Most users will want just the ``rst2txt`` application:
.. code-block:: shell
$ rst2txt README.rst
It is also possible to call this programmatically though. This can be useful
for things like consuming README files:
.. code-block:: python
from docutils.core import publish_file
import rst2txt
with open('README.rst', 'r') as source:
publish_file(source=source, destination_path='README.txt',
writer=rst2txt.Writer())
نیازمندی
| مقدار | نام |
|---|---|
| >=0.11 | docutils |
| - | pygments |
| - | pytest |
| - | pytest-cov |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* | Python |
نحوه نصب
نصب پکیج whl rst2txt-1.1.0:
pip install rst2txt-1.1.0.whl
نصب پکیج tar.gz rst2txt-1.1.0:
pip install rst2txt-1.1.0.tar.gz