diff options
author | Adrián Oliva <adrian.oliva@cimat.mx> | 2023-05-07 17:56:57 -0600 |
---|---|---|
committer | Adrián Oliva <adrian.oliva@cimat.mx> | 2023-05-07 17:56:57 -0600 |
commit | 4abdee1dc1891ad212a48040d89ebc5b9dcc6088 (patch) | |
tree | cc5d86b432eee4777c52931a089f710d7e779259 /utils/register.py | |
parent | 3809d99e78466142c4dd8247e40f0826f436e8b6 (diff) | |
download | Ledger.py-4abdee1dc1891ad212a48040d89ebc5b9dcc6088.tar.gz Ledger.py-4abdee1dc1891ad212a48040d89ebc5b9dcc6088.zip |
Balance now has colors!
Moved color functions to its own file. Now the colored output can be
easily edited in general.
Diffstat (limited to 'utils/register.py')
-rw-r--r-- | utils/register.py | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/utils/register.py b/utils/register.py index b067e56..5fdbf06 100644 --- a/utils/register.py +++ b/utils/register.py @@ -1,24 +1,9 @@ from utils.read_file import entry +from utils.colored_output import * from typing import List, Iterator import re import shutil -import colorama - -def date_f(text: str): - return text - -def comment_f(text: str): - return colorama.Style.BRIGHT + text + colorama.Style.RESET_ALL - -def account_f(text: str): - return colorama.Fore.BLUE + text + colorama.Style.RESET_ALL - -def price_f(text: str): - if '-' in text: - return colorama.Fore.RED + text + colorama.Style.RESET_ALL - else: - return text class currencies: |