Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced OCR4Linux with improved error handling, loggin, argument options, and documentation #12

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

moheladwy
Copy link
Owner

Description

This PR enhances OCR4Linux by improving error handling, adding comprehensive documentation, and implementing proper logging across all components. The changes span the main shell script, setup script, and Python OCR handler.

Changes

OCR4Linux.sh

  • Added command-line options (-r, -d, -l, -h) for better control
  • Implemented logging system with timestamps
  • Improved error handling in screenshot and text extraction
  • Added cleanup functionality for temporary files
  • Enhanced help message with examples
  • Added comprehensive documentation

setup.sh

  • Added comprehensive documentation

OCR4Linux.py

  • Added comprehensive docstrings

Testing

  1. Test on both Wayland and X11 sessions
  2. Verify package installation on fresh system
  3. Test OCR with various image types
  4. Verify clipboard functionality
  5. Test error scenarios

Notes

  • Requires yay package manager
  • Python 3.x required
  • Tested on Arch Linux

Dependencies

  • tesseract-ocr
  • python-opencv
  • python-pillow
  • python-pytesseract
  • grimblast/scrot
  • wl-clipboard/xclip
  • cliphist (Wayland only)

@moheladwy moheladwy added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 15, 2024
@moheladwy moheladwy self-assigned this Dec 15, 2024
@moheladwy moheladwy linked an issue Dec 15, 2024 that may be closed by this pull request
@moheladwy moheladwy merged commit a634b3e into main Dec 15, 2024
2 checks passed
@moheladwy moheladwy deleted the AddParamOptionsToScript branch December 15, 2024 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Paramter Options to the script
1 participant