File: README.rst

package info (click to toggle)
python-rst2ansi 0.1.5-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 256 kB
  • sloc: python: 779; sh: 16; makefile: 16
file content (65 lines) | stat: -rw-r--r-- 1,369 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
rst2ansi
========

|build| |downloads| |pyversions| |format|

A python module dedicated to rendering RST (reStructuredText) documents
to ansi-escaped strings suitable for display in a terminal.

|asciicast|

Installation
------------

Requirements
~~~~~~~~~~~~

Python 3.3+

PyPi package
~~~~~~~~~~~~

.. code:: bash

    pip install rst2ansi

Usage
-----

As a CLI utility:
~~~~~~~~~~~~~~~~~

.. code:: bash

    usage: rst2ansi [-h] [file]

    Prints a reStructuredText input in an ansi-decorated format suitable for
    console output.

    positional arguments:
      file        A path to the file to open

    optional arguments:
      -h, --help  show this help message and exit

As a python module:
~~~~~~~~~~~~~~~~~~~

.. code:: python

    from rst2ansi import rst2ansi

    print(rst2ansi('I **love** reStructuredText!'))

.. |build| image:: https://api.travis-ci.org/Snaipe/python-rst2ansi.svg
   :target: https://travis-ci.org/Snaipe/python-rst2ansi

.. |downloads| image:: https://img.shields.io/pypi/dm/rst2ansi.svg
   :target: https://pypi.python.org/pypi/rst2ansi/

.. |pyversions| image:: https://img.shields.io/pypi/pyversions/rst2ansi.svg

.. |format| image:: https://img.shields.io/pypi/format/rst2ansi.svg

.. |asciicast| image:: https://asciinema.org/a/drykz69gtn557z3hxnbb1jybq.png
   :target: https://asciinema.org/a/drykz69gtn557z3hxnbb1jybq