FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-128317: Highlight today in colour in calendar CLI output by hugovk · Pull Request #128318 · python/cpython · GitHub

Repository navigation

gh-128317: Highlight today in colour in calendar CLI output - #128318

Merged
hugovk merged 6 commits into
python:mainfrom
hugovk:3.14-calendar-colour
Jan 3, 2025
Merged

hugovk merged 6 commits into
python:mainfrom
hugovk:3.14-calendar-colour

Conversation

hugovk commented Dec 28, 2024 •
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Member

Here's the macOS cal command:

Here's the calendar CLI output in 3.13:

And with this PR:

Especially useful for Twixtmas when you're not sure what day it is!

The usual PYTHON_COLORS, FORCE_COLOR and NO_COLOR env vars can be used to override terminal colour detection.


📚 Documentation preview 📚: https://cpython-previews--128318.org.readthedocs.build/

hugovk added the type-feature A feature request or enhancement label Dec 28, 2024

ZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nice, here's what it looks like on KDE :)

Comment thread Doc/library/calendar.rst Outdated
Comment thread Lib/calendar.py
Comment thread Lib/calendar.py
Comment thread Doc/library/calendar.rst
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Comment thread Lib/calendar.py
Comment thread Lib/calendar.py
Comment thread Doc/library/calendar.rst
Comment thread Doc/library/calendar.rst
hugovk merged commit f21af18 into python:main Jan 3, 2025
hugovk deleted the 3.14-calendar-colour branch January 3, 2025 12:56

hugovk commented Jan 3, 2025

Copy link
Copy Markdown
Member Author

Thanks all for the reviews!

Comment thread Doc/library/calendar.rst
:meth:`setfirstweekday` method.

.. versionchanged:: next
If *highlight_day* is given, this date is highlighted in color.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Should this say “using terminal escape sequences”?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Hmm, I think it's more useful to describe the end result rather than the "how".

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

That was my intention: mention that you need to print the result to a terminal to see the highlight. If you don't, you'll see some garbage bytes.

WolframAlph pushed a commit to WolframAlph/cpython that referenced this pull request Jan 4, 2025
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL