insanum / gcalcli

Google Calendar Command Line Interface
MIT License
3.26k stars 307 forks source link

📚 document allowed colors #589

Open strazto opened 3 years ago

strazto commented 3 years ago

I wanted to colourize by calendars, and noticed, from a screenshot, that there was a way to do so:

--calendar="calendar name#color"

Yay!

So I started adding these to my rc file, but hit an error on #purple.

I looked up this in the issues and found that someone described something about using google's colour names for calendars.

I thought that sounded reasonable, so I started to edit my colours to match googles, before getting an error for doing so.

I tried to search the man page, but there was no indication. I didn't really want to guess about what would or wouldn't work.

Finally, since I knew that this was being thrown by the arg parser, I checked the code in argparse, followed that through to printer and got the following:

https://github.com/insanum/gcalcli/blob/aa287f94fd15a5ea999630a5a923b1ca7e9b08f6/gcalcli/printer.py#L4-L7

I recognize that these are the ANSII escape colours, which I might have guessed, but I didn't know.

I know it sounds petty, but I'm disappointed to have gone through so much work to colourize my outputs. I would really like this option to be documented in the argparse output, so the error is less ambiguous.