Metadata-Version: 2.4
Name: piecolor
Version: 3.1.1
Summary: Primarily a text colorization library for python3.
Author-email: EatingPie <eatingpie@gmail.com>
License: Copyright (c) 2022 EatingPie
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/EatingPie/piethon_repo
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typing
Requires-Dist: typing_extensions
Dynamic: license-file

piethon
=======

Series of tools for python3, releasing to PyPi.

```
# Install for Testing
# System
/usr/bin/python3 -m pip install -e .
# brew
python3 -m pip install -e .
```


This package currently includes 4 different libraries:
	- A text coloring library, along with argparse colorization (counts as 2).
	- A process listing library (ala `ps` which does NOT work in Windows).
	- A set of routines to pull methods and instance variables from one class into another.

Terminal Colors
---------------

Probably most of most interest: the text coloring and color argparse libraries.
```
import  piethon.term.colors as c
import  piethon.script.argparse_color as ColorArgparse
```
The focus here is on simplicity and readability.  Instead of cumbersome escape codes, cumbersome color names and the overall cumbersomeness of using color, it's as easy as the proverbial pie.

The colors library includes five palettes.  They can be used individually, or mixed and matched in the same code.

The first three palettes provide different common naming conventions for the xterm 256 color palette.

The first 8 base colors all have single-letter counterparts from RGB and CMYK.  The delimiter, system and solarized palettes include similarly abbreviated color names.  This makes coloring text a _lot_ nicer looking in code.

R - red
G - green
B - blue
C - cyan
M - magenta
Y - yellow
K - black
W - white
N - reset to system normal

Preceding each with 'X' (for "extended" colors) takes us to the 16-color palette.

XR - extended red
XG - extended green
etc.

The Solarized palette includes the exact same 16-color naming, though each color name represents an different _actual_ color.
It also includes the violet, orange and the special names invented for Solarized itself.  Solarized has a mild, Matrix-like green tint.

V   - violet
O   - orange
b03 - base03
b02 - base02
b01 - base01
b00 - base00
b0  - base0
b1  - base1
b3  - base3
b2  - base2

Note that we can code coloring in two ways: with methods or with instance variables.  The methods use _lower case_ names while the variables use _upper_case_ names.  The methods always reset the color back to "normal" (no color), while the instance variables work better when setting multiple colors in text.

### Palettes ###

- ANSI
The common "ANSI" standard color names.
```
import  piethon.term.colors as c

print("I'm so mad, I'm seeing", c.ansi.r("red!"))
print("Better than being," c.ansi.y("yellow"), "with envy")

ca = c.ansi # a bit of abbreviating
print(ca.R + "Happy", ca.W + "Fourth", ca.B + "of July" + ca.N)
```

- SOLARIZED
```
import  piethon.term.colors as c

print(c.sol.b01("A greyscale-ish color named base01!"))
```

- X11
These names come from the X11 'rgb.txt' file found on many systems.  They overlap heavily with the ANSI palette, but some names may appear only one or the other, and some which do match may actually have slightly different color values.
```
import  piethon.term.colors as c

print(c.x11.chocolate("I love chocolate!"))
```

- SYSTEM
Colorization for common system terms, akin to color `ls`.

e - exe
cmd - command
f - file
d - dir or even directory
l - link
mp - mount
h - hostname
u - username

- Delimiters
A word of wisdom: colorizing delimiters looks really great, but are a huge hassle.
This palette doesn't just change the color: it inserts the actual colorized delimiters as well.  These only exist as functions, and typically work best for double-delimiaters like '()' etc.

```
print("We use the html tag", c.dlm.angle("p"), "for paragraphs)
print("A graph starting at", c.dlm.coord(1, 2))
```

