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

Add rich text formatting (colours, boldness) to the output via click #1

Open
ynikitenko opened this issue Jun 16, 2022 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@ynikitenko
Copy link
Owner

ynikitenko commented Jun 16, 2022

UPD: click looks good for that.

Requirements for a formatting tool:

  • cross-platform (and disabled when it is not installed / supported)
  • high-level (and take care to restore original colours after the exit).

Probably some other factors should also be taken into consideration. Note, that we don't need full True Colours, but rather simply enhance user experience in several small places.

These packages look good: yachalk and colorful (the latter looks more powerful, because it supports Windows and Python 2 (if we ever use that)). There is also some comparison on StackOverflow.

Formatting could be based on how git formats its output.
Volunteers are welcome! If you take on this task, let us agree on the package first.

@ynikitenko ynikitenko added the enhancement New feature or request label Jun 16, 2022
@ynikitenko
Copy link
Owner Author

ynikitenko commented Jun 16, 2022

Colorama seems to be very developed and used.
Rich allows powerful text formatting (centering, etc.), seems most used, is cross-platform, but doesn't support Python 2. It is also heavy-weight (1 Mb in my installation, don't know when I installed that) and requires commonmark and pygments. It looks very well. Maybe use that after this program becomes rich itself.
Click looks perfect: not only it allows simple colours, but also text scrolling (should be used in logs) launching editors (for commit) and autocomplete.

@ynikitenko ynikitenko changed the title Add rich text formatting (colours, boldness) to the output Add rich text formatting (colours, boldness) to the output via click Jun 16, 2022
@r888800009
Copy link
Contributor

r888800009 commented Nov 12, 2023

Is it a good idea to start with colorization like >f+++++++++, .d..t...... of yarsync status or similar command?

Users may be more concerned about files that modify or delete.

Maybe deletions are red, modifications are yellow, new additions are green, etc.

In addition to color, a filter to show only deleted or modified files might be useful.

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

2 participants