A GUI tool for batch processing documents (Word, XML, and Markdown) to replace sensitive information consistently across files.
- Process Word documents (DOCX) in two modes:
- Full redaction mode: Process DOCX/XML pairs with replacement rules
- Markdown conversion mode: Convert single DOCX files to Markdown
- Batch processing support for multiple documents
- Case-insensitive search and replace
- Consistency checking between document pairs
- Detailed logging of all replacements
- Modern GUI interface with:
- Document pair management
- Rule management (load/save replacement rules)
- Real-time processing status
- Detailed output display
- Standalone executable support
- Clone the repository:
git clone https://github.com/BetaMac/ConRed.git
cd ConRed
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
Run the GUI application:
python src/conred_gui.py
Build the standalone executable:
python src/build.py
The executable will be created in the dist
directory.
-
Adding Documents:
- Click "Add Document Pair" to select Word documents
- For full redaction, ensure matching XML files exist
- For Markdown conversion only, any Word document can be used
-
Managing Rules (for redaction):
- Load existing rules using "Load Rules"
- Add new rules using the input fields
- Save current rules using "Save Rules"
-
Processing:
- Click "Process Documents" to start
- Progress and results will be shown in the output window
- Processed files are saved in the
data/output
directory
ConRed/
├── src/
│ ├── conred.py # Core processing functionality
│ ├── conred_gui.py # GUI interface
│ ├── markdown_converter.py# Markdown conversion support
│ └── build.py # Executable builder
├── data/
│ ├── input/ # Place input files here
│ └── output/ # Processed files appear here
├── rules/ # Replacement rule configurations
├── logs/ # Processing logs
└── requirements.txt # Python dependencies
- Python 3.6+
- customtkinter (GUI framework)
- python-docx (Word document processing)
- mammoth (Markdown conversion)
- PyInstaller (executable building)
MIT License
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request