blob: e44c39db806f14206bd625008d65d00f668ccaac (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import colorama
def date_f(text: str) -> str:
"""Format of the date."""
return text
def comment_f(text: str) -> str:
"""Format of the transaction's comment."""
return colorama.Style.BRIGHT + text + colorama.Style.RESET_ALL
def account_f(text: str) -> str:
"""Format of the account's name."""
return colorama.Fore.BLUE + text + colorama.Style.RESET_ALL
def price_f(text: str) -> str:
"""Format of the price."""
if '-' in text:
return colorama.Fore.RED + text + colorama.Style.RESET_ALL
else:
return text
|