def color_row(row):
color = Fore.WHITE
label = "."
if u'label' in row:
color = LABEL_COLOR.get(row[u'label'], Fore.WHITE)
label = row[u'label']
row[u'label'] = "%s%s%s" % (color, label, Style.RESET_ALL)
row['family'] = "%s%s%s" % (color, row.get('family', "."), Style.RESET_ALL)
row['size'] = smart_size(row.get(u'size', "."))
return row
评论列表
文章目录