Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace colorama with rich and support all of rich's colors #1805

Open
4 tasks
micahellison opened this issue Oct 5, 2023 · 0 comments
Open
4 tasks

Replace colorama with rich and support all of rich's colors #1805

micahellison opened this issue Oct 5, 2023 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@micahellison
Copy link
Member

Use Case/Motivation

We use two different libraries for formatting jrnl's output: colorama and rich. Over the past few years, we've been replacing other display dependencies (such as ansiwrap #1191) with rich's functionality, in part because rich was better-maintained than the alternatives, but also because it's just simpler to have less dependencies.

rich already supports all the colors we list in the config reference along with a lot more, so this shouldn't be a breaking change. Also, it won't completely remove colorama in all cases as it is a sub-dependency of some dev dependencies, but at least we won't be managing a direct dependency to it.

Example Usage

n/a - jrnl calls will be the same, except the color config keys should support rich's list of colors

Other Information

A resolution to this issue should include:

  • removal of colorama dependency
  • a change to the coloring code (currently in Entry.py, though someday I hope to find it a new home) to use rich instead of colorama
  • a change to the config file reference documentation to include (or maybe just link to) rich's list of colors
  • tests as needed
@micahellison micahellison added enhancement New feature or request 🆕 New! labels Oct 5, 2023
@micahellison micahellison removed the 🆕 New! label Oct 14, 2023
@micahellison micahellison added this to the Backlog milestone Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant