Skip to content
Proyek

Tentang

a python project that removes weak redaction methods such as black text highlighted black, and putting a non-flattened image over text.

Desain dan media

Cara angka ini diukur

Yang dapat Anda lakukan

  • Text Recovery: Extracts underlying digital text that might be hidden beneath redaction layers.
  • Smart Box Removal: Detects images that appear to be black redaction boxes (based on brightness) and allows for their removal.
  • Highlighting: Option to turn recovered text red to make it easily identifiable.
  • Batch Processing: Supports individual files or entire directories.

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
-2
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

PDF/Video Redaction Auditor (Unredact.py)

This script is designed to process PDF files to relveal what's under weak redaction methods by recoloring digital text and selectively removing certain unburned redaction markings
It works by creating a new document and re-inserting only the essential elements from the original.

Features

  • Text Recovery: Extracts underlying digital text that might be hidden beneath redaction layers.
  • Smart Box Removal: Detects images that appear to be black redaction boxes (based on brightness) and allows for their removal.
  • Highlighting: Option to turn recovered text red to make it easily identifiable.
  • Batch Processing: Supports individual files or entire directories.

Installation

  1. Install Python 3.x
    Install Python
  2. Install Git and Clone Obj
git clone https://github.com/OpLumina/unredact.py/
  1. Install Dependencies:
    cd unredact.py
    python -m venv venv  
    .\venv\Scripts\Activate  
    pip install -r .\docs\requirements.txt  
    

Usage:

You can run the script using command-line arguments or by following the interactive prompts.
Command Line Arguments:

python .\src\unredact.py -i <input_path> -o <output_folder> [options]

Argument Description:
-i, --input: to the input PDF file or a folder containing PDFs.
-o, --output: to the folder where processed files will be saved.
-n, --name: Custom name for the output file (Single file mode only).
-b, --bbox1 to remove black box images that aren't flattened on the pdf (default), 0 to keep them. --hl, --highlight1 to turn recovered text red (default), 0 for black.
-h, --help: Shows the contents of this README.Example

To process a folder and turn off the red highlighting:

cd <project folder>  
.\venv\Scripts\Activate  
python unredact.py -i ./input_pdfs -o ./cleaned_pdfs --hl 0  
Directory Structure:  
├── src   
|    └──unredact.py   
└── docs/  
    └── Readme.md  
    └── requirements.txt  
---  

### 2. requirements.txt  

```text
pymupdf==1.23.26
``

5/11/2026, Added Video Capabilities:

Added Video Flag to test unburned redactions on video (.mp4 .mov .avi .mkv .wmv .flv .webm .m4v)

Usage: python ./src/unredact.py --video -i <input file> -o <output file> --hits

Jelajahi proyek terkait

Memuat…