txtv

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

commit ce82193cabf014d0cda2afaef6b0808df4b0f78a
parent b43446828c6d241783ae01b2fb85e5efc7a3cab1
Author: Isak Lindhé <isak.e.lindhe@gmail.com>
Date:   Fri, 21 Dec 2018 01:32:59 +0100

show blue rows, including publication date

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

diff --git a/txtv.py b/txtv.py @@ -38,13 +38,15 @@ def get_page(num) -> list: def show_page(rows:list): until_next_break = LINEWIDTH for row in rows: - if row.get_text() == ' ' or 'bgB' in row.attrs['class']: - continue + # if row.get_text() == ' ' or 'bgB' in row.attrs['class']: + # continue style = '' if 'DH' in row.attrs['class']: style = Fore.YELLOW + Style.BRIGHT elif 'Y' in row.attrs['class']: style = Style.DIM + elif 'bgB' in row.attrs['class']: + style = Fore.BLUE until_next_break -= len(row.get_text()) print(style + row.get_text() + Style.RESET_ALL, end=('\n' if until_next_break <= 0 else '')) if until_next_break <= 0: