Skip to content

Commit

Permalink
Version 1.4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
croketillo committed Dec 8, 2023
1 parent c847883 commit d073d1c
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 16 deletions.
11 changes: 6 additions & 5 deletions README.md
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.

Expand Down Expand Up @@ -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 - croketillo@gmail.com')
print('NEW!!! - NOW YOU CAN INCLUDE STRIKETHROUGH IN PATTERNS')
print('This is a BLINK and ITALIC TEXT test')
Expand Down Expand Up @@ -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):
Expand Down
10 changes: 4 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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 - croketillo@gmail.com')
print('NEW!!! - NOW YOU CAN INCLUDE STRIKETHROUGH IN PATTERNS')
print('This is a BLINK and ITALIC TEXT test')
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion colorpattern/colorpattern.py
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 <croketillo@gmail.com> https://github.com/croketillo
DESCIPTION:
Expand Down
Binary file added dist/colorpattern-1.4.6-py3-none-any.whl
Binary file not shown.
Binary file added dist/colorpattern-1.4.6.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='croketillo@gmail.com',
license=read("LICENSE", is_encoding=False, ignore_raises=True),
Expand Down
6 changes: 3 additions & 3 deletions test/colorpattern_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 - croketillo@gmail.com')
print('NEW!!! - NOW YOU CAN INCLUDE STRIKETHROUGH IN PATTERNS')
print('This is a BLINK and ITALIC TEXT test')
Expand Down

0 comments on commit d073d1c

Please sign in to comment.