11
submitted 1 week ago by JazzFan2@lemmy.ml to c/opensource@lemmy.ml

Here's a useful shell script for anyone working with text files. wordif.sh does word-by-word comparisons and outputs the results as highlighted HTML or PDF. It's much easier to read than standard terminal diffs, especially when you're comparing entire directories. Simple and effective for document reviews. https://github.com/jazzfan2/wordif

top 2 comments
sorted by: hot top controversial new old
[-] RIotingPacifist@lemmy.world 2 points 1 week ago* (last edited 1 week ago)

This seems cool for non-cli output, but for the CLI you can already do this with git --word-diff

[-] JazzFan2@lemmy.ml 2 points 1 week ago

git diff --word-diff You're completely right, as does wdiff() with some post processing. I know, but the main drive for me to develop this was to come up with something that doesn't require (especially non-technical) users to (sudo/brew/xcode) install anything additional to what's already available on any unix(-like) platform. (Admitted: except for wkhtmltopdf, but that's not essential to produce PDF - as this can also be done from the browser.)

this post was submitted on 02 Apr 2026
11 points (82.4% liked)

Open Source

46221 readers
529 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 6 years ago
MODERATORS