txtv

Swiss text tv in the terminal
git clone https://git.in0rdr.ch/txtv.git
Log | Files | Refs | Pull requests |Archive | README | LICENSE

commit 09f2df624d91371d2ca3ab539c352e191b74569e
parent b24060e3994d936944b474eda89480f0c0828e40
Author: Isak Lindhé <isak.e.lindhe@gmail.com>
Date:   Thu, 20 Dec 2018 21:49:18 +0100

style refactor and bold headers

Diffstat:
Mtxtv.py | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/txtv.py b/txtv.py @@ -15,8 +15,10 @@ if __name__ == '__main__': for row in rows: if row.get_text() == ' ' or 'bgB' in row.attrs['class']: continue - if 'Y' in row.attrs['class']: - print(Fore.YELLOW + row.get_text() + Fore.RESET) - else: - print(row.get_text()) + style = '' + if 'DH' in row.attrs['class']: + style = Fore.YELLOW + Style.BRIGHT + elif 'Y' in row.attrs['class']: + style = Style.DIM + print(style + row.get_text() + Style.RESET_ALL) colorama.deinit()