#!/usr/bin/env python3

from vegetable import Table
from vegetable.highlight import *
from colored import Fore, Back, Style
from random import randint

minmax = HighlightMinMax(
    min=Style.underline, 
    max=[Style.reverse, Fore.yellow, Style.bold],
)

# create a Table and define some columns
t = Table()
t.column("Engine", formatter=lambda x: f"#{x}")
t.column("Power", type=int, highlighter=minmax)

for n in range(1, 10):
    t.row([n, randint(0, 105)])

print(t)
