summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorMartin Matusiak <numerodix@gmail.com>2014-03-09 12:56:29 +0100
committerMartin Matusiak <numerodix@gmail.com>2014-03-09 12:56:29 +0100
commit8bb3fce3382bfeb0f8befc9b474c4618fb5a6092 (patch)
tree3399cdb57bde1f4a4306e98f270a4543c00d6d30 /README.rst
parent7c3d123b5a0211097268e10f14ea40d6addb2fa8 (diff)
downloadansicolor-8bb3fce3382bfeb0f8befc9b474c4618fb5a6092.tar.gz
simplify readme, move getting started into docs/
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst58
1 files changed, 2 insertions, 56 deletions
diff --git a/README.rst b/README.rst
index a3d16a7..86909e7 100644
--- a/README.rst
+++ b/README.rst
@@ -31,59 +31,7 @@ Installation
Getting started
---------------
-To highlight using colors:
-
-.. literalinclude:: snippets/getting_started_1.py
-
-.. figure:: snippets/getting_started_1.png
-
-
-This will emit ansi escapes into the string: one when starting a color, another
-to reset the color back to the default:
-
-.. code:: python
-
- >>> from ansicolor import green
-
- >>> green("green")
- '\x1b[0;0;32mgreen\x1b[0;0m'
-
-
-If I want to be able to pass a color as an argument I can also use the
-``colorize`` function:
-
-.. code:: python
-
- from ansicolor import Colors
- from ansicolor import colorize
-
- print(colorize("I'm blue", Colors.Blue))
-
-
-I can also apply color on a portion of a string:
-
-.. code:: python
-
- from ansicolor import Colors
- from ansicolor import wrap_string
-
- print(wrap_string("I'm blue, said the policeman.", 8, Colors.Blue))
-
-
-Sometimes I may have a string that contains markup and I'll want to do something
-with it that concerns only the text, so I can strip the markup:
-
-.. code:: python
-
- >>> from ansicolor import red
- >>> from ansicolor import strip_escapes
- >>> from ansicolor import yellow
-
- >>> message = "My favorite colors are %s and %s" % (yellow("yellow"), red("red"))
- >>> print("The length of this string is not: %d" % len(message))
- The length of this string is not: 67
- >>> print("The length of this string is: %d" % len(strip_escapes(message)))
- The length of this string is: 37
+Read the `documentation` on Read the Docs!
Going further
@@ -97,7 +45,5 @@ Take a look at the ``demos`` to see what's possible.
$ python -m ansicolor.demos --highlight
$ python -m ansicolor.demos --diff
-Also see the `API documentation`_.
-
-.. _`API documentation`: https://ansicolor.readthedocs.org/
+.. _`documentation`: https://ansicolor.readthedocs.org/