https://github.com/varshneydevansh/tejocr
https://github.com/varshneydevansh/tejocr
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/varshneydevansh/tejocr
- Owner: varshneydevansh
- License: other
- Created: 2025-05-15T20:09:59.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-26T18:27:24.000Z (about 1 year ago)
- Last Synced: 2025-06-22T02:46:31.181Z (about 1 year ago)
- Language: HTML
- Size: 19.2 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# TejOCR v0.1.5 - LibreOffice OCR Extension
๐ **Phase 2 Complete: Professional UI/UX with Real Configurable Dialogs!**
TejOCR is a powerful LibreOffice extension that adds Optical Character Recognition (OCR) capabilities to your documents. Extract text from images directly within LibreOffice Writer.
## โ
What's New in v0.1.5
**๐จ COMPLETE UI/UX OVERHAUL:**
- โ
**Real Settings Dialog**: Configurable XDL-based settings with dependency checking
- โ
**Professional OCR Options Dialog**: Language selection, output modes, advanced options
- โ
**Smart Workflow Integration**: Seamless dialog flow for both OCR methods
- โ
**Enhanced User Experience**: Grouped controls, helpful hints, and error guidance
**๐ง MAJOR IMPROVEMENTS:**
- **Dependency Status Dashboard**: Live status checking with installation guidance
- **Tesseract Path Configuration**: Browse, test, and validate Tesseract installation
- **Advanced OCR Options**: Page segmentation modes, engine modes, preprocessing
- **Multiple Output Modes**: Cursor, text box, replace image, clipboard
- **Smart Defaults**: Remembers your preferences between sessions
## ๐ฏ Current Status
**Phase 1 (Core Stability)**: โ
**COMPLETE**
- Core OCR functionality fully working
- Multi-strategy error handling
- Robust dependency detection
**Phase 2 (Professional UI/UX)**: โ
**COMPLETE**
- Real XDL-based dialogs
- Configurable settings system
- Professional user experience
- Advanced OCR options
**Phase 3 (Advanced Features)**: ๐ง **Next Priority**
- Batch processing capabilities
- Enhanced output formatting
- Performance optimizations
## ๐ Quick Start
### Prerequisites
1. **Tesseract OCR** (Required):
```bash
# macOS
brew install tesseract
# Ubuntu/Debian
sudo apt install tesseract-ocr
# Windows
# Download from: https://github.com/UB-Mannheim/tesseract/wiki
```
2. **Python Dependencies** (for LibreOffice's Python):
**Automated Installation** (Recommended):
```bash
python3 install_dependencies.py
```
**Manual Installation**:
```bash
# Get LibreOffice's Python path first
/Applications/LibreOffice.app/Contents/Frameworks/LibreOfficePython.framework/Versions/Current/bin/python3 -m pip install numpy pytesseract pillow
```
### Installation
1. **Download**: Get the latest `TejOCR-0.1.5.oxt` from releases
2. **Install**: LibreOffice โ Tools โ Extension Manager โ Add โ Select the .oxt file
3. **Restart**: Close and restart LibreOffice completely
4. **Verify**: Look for "TejOCR" in the top menu bar
### Usage
1. **Open LibreOffice Writer**
2. **Configure Settings**: Tools โ TejOCR โ Settings (first time setup)
3. **For File OCR**: Tools โ TejOCR โ OCR Image from File โ Select options โ Start OCR
4. **For Selected Image**: Insert image โ Select it โ Tools โ TejOCR โ OCR Selected Image โ Select options โ Start OCR
## ๐ง Troubleshooting
### Check Dependencies
Go to **Tools โ TejOCR โ Settings** to see real-time status:
- โ
Tesseract: Shows installed version and path
- โ
Python packages: Shows NumPy, Pytesseract, Pillow status
- ๐ **Browse & Test**: Built-in path finder and validator
### Common Issues
**"Settings dialog won't open"**:
- Check LibreOffice version (4.0+ required)
- Restart LibreOffice completely
- Check extension is properly installed
**"OCR options not working"**:
- Use Settings dialog to verify all dependencies
- Check Tesseract path with built-in tester
- Ensure image is properly selected
### Advanced Configuration
- **Language Selection**: Choose from all installed Tesseract languages
- **Output Modes**: Customize where text appears
- **Page Segmentation**: Optimize for different image types
- **Preprocessing**: Enable image enhancement for better results
## ๐๏ธ Development
### Building from Source
```bash
git clone
cd TejOCR
python3 build.py
```
### Project Structure
```
TejOCR/
โโโ python/tejocr/ # Main Python package
โ โโโ constants.py # Version and configuration constants
โ โโโ tejocr_service.py # Main UNO service with dialog integration
โ โโโ tejocr_engine.py # OCR processing engine
โ โโโ tejocr_output.py # Text insertion handling
โ โโโ tejocr_dialogs.py # Professional XDL dialog handlers
โ โโโ uno_utils.py # UNO utilities and helpers
โโโ dialogs/ # XDL dialog definitions
โ โโโ tejocr_settings_dialog.xdl # Settings UI
โ โโโ tejocr_options_dialog.xdl # OCR options UI
โโโ icons/ # Extension icons
โโโ description.xml # Extension metadata
โโโ Addons.xcu # LibreOffice menu/toolbar integration
โโโ build.py # Build script
```
## ๐ License
This project is licensed under the Mozilla Public License 2.0 - see the [LICENSE](LICENSE) file for details.
## ๐ Acknowledgments
- Tesseract OCR team for the excellent OCR engine
- LibreOffice community for extension development resources
- Python community for pytesseract and imaging libraries
---
**Note**: This is v0.1.5 with Phase 2 (Professional UI/UX) complete. Phase 3 (Advanced Features) is coming next!
For detailed changes and technical information, see [CHANGELOG.md](CHANGELOG.md).
## ๐ง About the Name
**Tej** (เคคเฅเค) in Sanskrit and other Indian languages means *light*, *effulgence*, *sharpness*, or *brilliance*. **TejOCR** aims to bring clarity and insight to your documents by making the text within images accessible and editable.
## ๐ง Contact
* Maintainer: **Devansh Varshney**
* GitHub: [varshneydevansh](https://github.com/varshneydevansh)
* Twitter: [@varshneydevansh](https://x.com/varshneydevansh)