diff options
author | Martin Matusiak <numerodix@gmail.com> | 2014-03-09 12:37:55 +0100 |
---|---|---|
committer | Martin Matusiak <numerodix@gmail.com> | 2014-03-09 12:37:55 +0100 |
commit | 85c527f7508638be9a2f9e65a9a0bad4d466c4ea (patch) | |
tree | 2e076f951e110ba2cfe892d6caa38536cfb1a434 | |
parent | 57102b2a30b726b881718f7727b9dfe8bc0b7f9d (diff) | |
download | ansicolor-85c527f7508638be9a2f9e65a9a0bad4d466c4ea.tar.gz |
expand docs
-rw-r--r-- | README.rst | 11 | ||||
l--------- | docs/README.rst | 1 | ||||
-rw-r--r-- | docs/index.rst | 4 | ||||
-rw-r--r-- | docs/snippets/getting_started_1.png | bin | 0 -> 8809 bytes | |||
-rw-r--r-- | docs/snippets/getting_started_1.py | 9 |
5 files changed, 13 insertions, 12 deletions
@@ -33,16 +33,9 @@ Getting started To highlight using colors: -.. code:: python - - from ansicolor import green - from ansicolor import red - from ansicolor import white +.. literalinclude:: snippets/getting_started_1.py - print("Let's try two colors: %s and %s!" % (red("red"), green("green"))) - print("It's also easy to produce text in %s," % (red("bold", bold=True))) - print("...%s," % (green("reverse", reverse=True))) - print("...and %s." % (cyan("bold and reverse", bold=True, reverse=True))) +.. figure:: snippets/getting_started_1.png This will emit ansi escapes into the string: one when starting a color, another diff --git a/docs/README.rst b/docs/README.rst new file mode 120000 index 0000000..89a0106 --- /dev/null +++ b/docs/README.rst @@ -0,0 +1 @@ +../README.rst
\ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 2dc5b38..e0e71d1 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,11 +6,10 @@ Welcome to ansicolor's documentation! ===================================== -Contents: - .. toctree:: :maxdepth: 4 + README.rst ansicolor @@ -20,4 +19,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` - diff --git a/docs/snippets/getting_started_1.png b/docs/snippets/getting_started_1.png Binary files differnew file mode 100644 index 0000000..d34261f --- /dev/null +++ b/docs/snippets/getting_started_1.png diff --git a/docs/snippets/getting_started_1.py b/docs/snippets/getting_started_1.py new file mode 100644 index 0000000..dd76ab7 --- /dev/null +++ b/docs/snippets/getting_started_1.py @@ -0,0 +1,9 @@ +from ansicolor import cyan +from ansicolor import green +from ansicolor import red +from ansicolor import white + +print("Let's try two colors: %s and %s!" % (red("red"), green("green"))) +print("It's also easy to produce text in %s," % (red("bold", bold=True))) +print("...%s," % (green("reverse", reverse=True))) +print("...and %s." % (cyan("bold and reverse", bold=True, reverse=True))) |