architv / soccer-cli

:soccer: Football scores for hackers. :computer: A command line interface for all the football scores.
MIT License
1.09k stars 221 forks source link

Color coding error in the latest version #60

Closed architv closed 8 years ago

architv commented 8 years ago

There's an error in the color coding in the latest version of soccer-cli on GitHub.

PyPi version soccer_colors_right

GitHub version soccer_distort_colors

Saturn commented 8 years ago

The colours are working the same for me.

It looks like the away wins are coloured orange and the home wins are red. Was this change ever merged in by someone?

And both teams should be yellow for a draw. Strange.

You could step through each commit and see when it works again?

architv commented 8 years ago

I'll look into this.

architv commented 8 years ago

There seems to be no logical error in the code. Also, the colors work fine if the terminal background is black. For colored screens making the scores either both bold or both not bold works. https://github.com/architv/soccer-cli/blob/master/soccer/writers.py#L200 ie

click.secho('%-25s %2s' % (result.homeTeam, result.goalsHomeTeam),
                    bold=True, fg=homeColor, nl=False)
        click.secho("  vs ", nl=False)
        click.secho('%2s %s' % (result.goalsAwayTeam,
                                result.awayTeam.rjust(25)), fg=awayColor,
                    bold=True, nl=add_new_line)

@Saturn Should I sent in a fix?

Saturn commented 8 years ago

I wonder if the scores would look better not being bold. Maybe it is just my terminal and font but I think I might prefer it that way.

I actually never noticed that the home team results were in bold and away teams weren't.

architv commented 8 years ago

Okay I am making both of them not bold for now.

architv commented 8 years ago

Fixed with 58b6067