Conditions | 4 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | # These imports are for python3 compatibility inside python2 |
||
9 | def print_colorized_frame(frame, port_name, direction_in): |
||
10 | formatted_aprs = '>'.join([click.style(frame['source'], fg='green'), click.style(frame['destination'], fg='blue')]) |
||
11 | paths = [] |
||
12 | for path in frame['path']: |
||
13 | paths.append(click.style(path, fg='cyan')) |
||
14 | paths = ','.join(paths) |
||
15 | if frame['path']: |
||
16 | formatted_aprs = ','.join([formatted_aprs, paths]) |
||
17 | formatted_aprs += ':' |
||
18 | formatted_aprs += frame['text'] |
||
19 | if direction_in: |
||
20 | click.echo(click.style(port_name + ' << ', fg='magenta') + formatted_aprs) |
||
21 | else: |
||
22 | click.echo(click.style(port_name + ' >> ', fg='magenta', bold=True, blink=True) + formatted_aprs) |
||
23 |