houfu / redlines

Show the differences between two strings/text as a compact text, in markdown/HTML, in the terminal and more.
https://houfu.github.io/redlines/
MIT License
110 stars 6 forks source link

CLI Interface #11

Closed houfu closed 1 year ago

houfu commented 1 year ago

A command line interface might be an interesting and relatively straightforward implementation.

As an additional way to use the code, this might be good for quick tests and comparing plain text files.

https://github.com/Textualize/rich can be used to display rich markup in the terminal.

houfu commented 1 year ago

Hmm first screenshots look pretty nice.

Screenshot from 2023-05-28 16-52-56

Screenshot from 2023-05-28 16-54-27

Any comments? I am still considering whether a simple statistics panel might be useful.

HRNPH commented 1 year ago

LGTM, maybe some stats on Diff Count Would be good longest diff shortest diff you'll never know when it'll come in handy Learned this from my NLP job lol

houfu commented 1 year ago

Maybe we would merge the basic compare function first and consider the stats as a new issue for a future update. I saw something on twitter showing the % change, and that should be an interesting stat. (Not sure how they calculate that though :thinking: )

HRNPH commented 1 year ago

the percentage change should be counted from the character changed/all characters