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

[REQUEST] Diff Tool Enhanced #3303

Open
onlyacat opened this issue Mar 13, 2024 · 1 comment
Open

[REQUEST] Diff Tool Enhanced #3303

onlyacat opened this issue Mar 13, 2024 · 1 comment

Comments

@onlyacat
Copy link
Contributor

How would you improve Rich?

It is easy to diff two files or two texts and receive highlighting results in the terminal with tools like diff or git-diff. But it is hard to finish during the python process. Even though Python provides a native library called difflib, still it is a long way to go to print the result in the console simply.

I would like to know will the rich support this function.

What problem does it solve for you?
This could simply be the whole process with fewer libraries and the diff results can be reorganized with the whole pipeline. Thus the result can be printed easily by rich.Console.
The whole process may be like:

import rich

a = "123"
b = "1234"

rich.print(rich.diff(a,b))

Also, it can be invoked in the terminal. Like:

python3 -m rich.diff t1.txt t2.txt
Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant