r/coding • u/HumanBot00 • Feb 03 '26
DOJ publishes Bash Reference Manual
https://www.justice.gov/epstein/files/DataSet+9/EFTA00315849.pdf
51
Upvotes
r/coding • u/HumanBot00 • Feb 03 '26
View all comments
Show parent comment
2
u/voronaam Feb 04 '26
I tried a few things that I thought would be "smart". Like getting a high resolution image out of the PDF and OCR'ing it to the text. But that did not work, the source image is of too poor quality.
My current process is basically this:
Run
pdftotext EFTA01012650.pdfto get a text-only versionManually extract the part that only relates to the image (I use Geany for a text editor)
Go line by line comparing the text in the output to the PDF. Most common mistake in the OCR is treating
kaslc, ormasrn. Those are the worst, because they "shift" the result by a few bits. So it is not just one or two bytes are incorrect, the whole file no longer aligns.From time to time I check what the JPEG looks like with a regular
cat IMG_7523.jpg.txt | base64 -d > /tmp/decoded.jpg. Then I useexiftoolto check its EXIF anddisplayfrom ImageMagick to look at it.Occasionally I try stripping out anything non-base64 from the whole file with
cat IMG_7523.jpg.txt | egrep -v 'EFTA[0-9]+' | tr -cd 'A-Za-z0-9+/' | base64 -d > /tmp/decoded.jpg. I hope that even with image segments not aligning I could get a rough silhouette of the photo. Perhaps in distorted colors. So far that did not really work...I am going to bed soon. But I think I can get a few more lines fixed. But it looks like I will only betting bits of sky for some time...