summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorMartin Matusiak <numerodix@gmail.com>2014-03-09 12:37:55 +0100
committerMartin Matusiak <numerodix@gmail.com>2014-03-09 12:37:55 +0100
commit85c527f7508638be9a2f9e65a9a0bad4d466c4ea (patch)
tree2e076f951e110ba2cfe892d6caa38536cfb1a434 /README.rst
parent57102b2a30b726b881718f7727b9dfe8bc0b7f9d (diff)
downloadansicolor-85c527f7508638be9a2f9e65a9a0bad4d466c4ea.tar.gz
expand docs
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst11
1 files changed, 2 insertions, 9 deletions
diff --git a/README.rst b/README.rst
index 65e741d..a3d16a7 100644
--- a/README.rst
+++ b/README.rst
@@ -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