diff --git a/docs/assets.sketch b/docs/assets.sketch index 039b685..62deaf8 100644 Binary files a/docs/assets.sketch and b/docs/assets.sketch differ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..e142413 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,49 @@ +# Hues + +This is the 90s and your terminal can display _16_ glorious colors. +Your Python scripts deserve the some color love. `Hues` makes printing +to console in color easy. + +Just grab the package from `PIP`, and your monochromatic days will be a +thing of past! + +## Quickstart + +Go, grab the latest version from PIP. Run: + +```bash +pip install hues +``` + +Then, in your scripts, do this: + +```python +>>> from hues import hue +>>> print(hue('unicorns!').bright_cyan.bold) +``` + + +_whoa!_ + +All the colors, styles and backgrounds are available as object attributes. The chainable syntax is optimized deterministically using a push down automaton, so when you're being particularly indecisive, you can: + +```python +>>> print(hue('MONDAY!').bold.red.bg_green.underline.bright_yellow) +``` + +and there won't be a single trace of `red` in your `bright yellow` message to mondays. + +Each `hue` string is self closing, so you can't accidentally color your whole terminal yellow because you forgot the `reset` escape sequence. + + +## Colors + +All 16 glorious ANSI colors are available for both background and foreground. Assorted text styles such as **`bold`**, _`italics`_ and `underline` are also available. Too many colors? Worry not fam, go to town with `reset` attribute. + + +## Todo +- [ ] Expand this readme. +- [ ] Add screenshots! +- [ ] Unicorns required. + +> Back in my days, we didn't even have colors! diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..9aa5a2f --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,9 @@ +site_name: hues +site_url: https://hues.noop.pw +repo_url: https://github.com/prashnts/hues/ +site_author: Prashant Sinha + +markdown_extensions: + - smarty + - toc: + permalink: True diff --git a/requirements.txt b/requirements.txt index 4e3a371..5ee2766 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,7 @@ coverage==4.2 extras==1.0.0 fixtures==3.0.0 linecache2==1.0.0 +mkdocs==0.15.3 mox3==0.18.0 pbr==1.10.0 py==1.4.31 diff --git a/setup.py b/setup.py index 63af253..718c198 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ import re -from setuptools import setup, find_packages +from setuptools import setup from codecs import open from os import path @@ -15,8 +15,8 @@ vtp = re.search(rex, fp.read(), re.M).groups() __version__ = '.'.join(vtp) -install_requires = ['PyYAML',] -setup_requires = ['pytest-runner',] +install_requires = ('PyYAML',) +setup_requires = ('pytest-runner',) test_requirements = ['pytest', 'coverage', 'pyfakefs']