this post was submitted on 23 Dec 2025
332 points (99.7% liked)
AntiTrumpAlliance
1269 readers
843 users here now
About
An alliance among all who oppose Donald Trump's actions, positions, cabinet, supporters, policies, or motives. This alliance includes anyone from the left or the right; anyone from any religion or lack thereof; anyone from any country or state; any man, woman or child.
Rules
-No pro-Trump posts or comments
-No off topic posts
-Be civil
-No trolling
-Follow Lemmy terms of service
Social Media
Other Communities
!desantisthreatensusa@lemmy.world

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Here's step-by-step instructions for the tool that the OP of the reddit thread open sourced. It creates a side-by-side pdf of the redacted and unredacted version at the end.
No root access is required at any point.
Download and extract the files of https://github.com/leedrake5/unredact?tab=readme-ov-file
Create a python virtual environment, but make sure the destination folder doesn't already exist (~/.env) here.
While still having your virtual environment active, indicated by the (.env) before your pompt, navigate to the downloaded github project, where the 'redact_extract.py' file is located.
Copy whatever pdf document you want to try to unredact to the same location.
execute the script
The script should now have created a file for you in the current location with the redacted and unredacted version side by side.
To leave the virtual environment:
To enter it again:
To delete everything cleanly, just delete the virtual environment (~/.env in this case)
The project linked in evacide's Mastodon toot is even simpler to install. Create and activate a virtual environment like before, but at a different location (.env1 instead of .env, for example).
Then install the tool from pip in the virtual environment:
The tool is now installed and can be executed with a pdf file like so:
https://github.com/freelawproject/x-ray
(sorry for the bad formatting. after posting, I can't preview anymore to figure out how to fix it.)
Could you show some of what it extracted then?
I haven't tried any yet, except verify with sample from reddit's OP.
Here's a a google drive link from the reddit thread with three files. One original justice.gov pdf with bad redactions. The same file, unredacted. And a third single pdf side-by-side of the aforementioned two files. By default, OP's tool creates this side-by-side pdf.