-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c847883
commit d073d1c
Showing
7 changed files
with
15 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
# ColorPattern | ||
|
||
![PyPI](https://img.shields.io/pypi/v/colorpattern) ![PyPI - Downloads](https://img.shields.io/pypi/dm/colorpattern??color=%2360EE59) | ||
![Total Downloads](https://static.pepy.tech/badge/colorpattern) | ||
![Pepy Total Downlods](https://img.shields.io/pepy/dt/colorpattern) | ||
|
||
|
||
ColorPattern is a Python module designed for enhancing text output in the console by applying color to specific patterns. It offers a flexible way to define patterns and apply different text colors, background colors, styles, underlines and other options to predefined patterns. | ||
|
||
|
@@ -43,7 +44,7 @@ def main(): | |
start_color([pattern1, pattern2, pattern3, email, strike, italic,blink]) | ||
|
||
# Use the custom print function with colorization | ||
print('Colorpattern v1.4.5') | ||
print('Colorpattern v1.4.6') | ||
print('By Croketillo - [email protected]') | ||
print('NEW!!! - NOW YOU CAN INCLUDE STRIKETHROUGH IN PATTERNS') | ||
print('This is a BLINK and ITALIC TEXT test') | ||
|
@@ -86,9 +87,9 @@ if __name__ == "__main__": | |
- `back`: Background color (e.g., 'black', 'blue', 'white'). | ||
- `style`: Text style (e.g., 'bright', 'dim', 'reset_all'). | ||
- `underline`: Set to `True` for underlining matched text. | ||
- `strike`: Set to `True` for strikethrough matched text. | ||
- `blink`: Set to `True` for blink matched text. | ||
- `italic`: Set to `True` for italic matched text. | ||
- `strike`: Set to `True` for strikethrough matched text. | ||
- `blink`: Set to `True` for blink matched text. | ||
- `italic`: Set to `True` for italic matched text. | ||
|
||
|
||
## Colors (colorama): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ ColorPattern | |
.. image:: https://img.shields.io/pypi/dm/colorpattern | ||
:alt: PyPI - Downloads | ||
|
||
|
||
.. image:: https://img.shields.io/pepy/dt/colorpattern | ||
:alt: Pepy Total Downlods | ||
|
||
|
||
ColorPattern is a Python module designed for enhancing text output in | ||
|
@@ -28,7 +29,7 @@ You can install ColorPattern using pip: | |
Usage | ||
----- | ||
|
||
Set the patterns whith SetPatterns(, ) | ||
Set the patterns whith ``SetPatterns(<patterns>,<options>)`` | ||
|
||
Use ``start_color(<patterns>)`` for initialize the color print, and | ||
``end_color()`` for stop colorization. | ||
|
@@ -56,7 +57,7 @@ Example | |
start_color([pattern1, pattern2, pattern3, email, strike, italic,blink]) | ||
# Use the custom print function with colorization | ||
print('Colorpattern v1.4.5') | ||
print('Colorpattern v1.4.6') | ||
print('By Croketillo - [email protected]') | ||
print('NEW!!! - NOW YOU CAN INCLUDE STRIKETHROUGH IN PATTERNS') | ||
print('This is a BLINK and ITALIC TEXT test') | ||
|
@@ -161,6 +162,3 @@ License | |
|
||
This project is licensed under the GNU-GLP,3 License - see the LICENSE | ||
file for details. | ||
|
||
.. |PyPI| image:: https://img.shields.io/pypi/v/colorpattern | ||
.. |Total Downloads| image:: https://static.pepy.tech/badge/colorpattern |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
""" | ||
This file is (or part of) COLORPATTERN v1.4.5 | ||
This file is (or part of) COLORPATTERN v1.4.6 | ||
Copyright 2023- Croketillo <[email protected]> https://github.com/croketillo | ||
DESCIPTION: | ||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,7 +84,7 @@ def read(file_name=None, is_encoding=True, ignore_raises=False): | |
|
||
setup( | ||
name='colorpattern', | ||
version='1.4.5', | ||
version='1.4.6', | ||
author='croketillo', | ||
author_email='[email protected]', | ||
license=read("LICENSE", is_encoding=False, ignore_raises=True), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,18 +5,18 @@ def main(): | |
pattern1 = SetPattern(r'\d+', color=Fore.GREEN) | ||
pattern2 = SetPattern(r'Colorpattern', color=Fore.LIGHTRED_EX, underline=True) | ||
pattern3 = SetPattern(r'Croketillo', color=Fore.BLACK, back=Back.LIGHTWHITE_EX, style=Style.BRIGHT) | ||
email = SetPattern(r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,7}\b', color=Fore.BLUE) | ||
pattern_email = SetPattern(r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,7}\b', color=Fore.BLUE) | ||
strike= SetPattern(r'NEW!!!', strikethrough=True) | ||
blink=SetPattern(r'BLINK', blink=True) | ||
italic=SetPattern(r'ITALIC TEXT', italic=True) | ||
|
||
# Initialize colorization and get the original print function and applied patterns | ||
print("\nSTART COLORIZED PRINT") | ||
print('-----------------------') | ||
start_color([pattern1, pattern2, pattern3, email, strike, italic,blink]) | ||
start_color([pattern1, pattern2, pattern3, pattern_email, strike, italic,blink]) | ||
|
||
# Use the custom print function with colorization | ||
print('Colorpattern v1.4.5') | ||
print('Colorpattern v1.4.6') | ||
print('By Croketillo - [email protected]') | ||
print('NEW!!! - NOW YOU CAN INCLUDE STRIKETHROUGH IN PATTERNS') | ||
print('This is a BLINK and ITALIC TEXT test') | ||
|