From 68483f69d06be9dc3016bb83da378b1aa9e31fbf Mon Sep 17 00:00:00 2001 From: dkorbelainen Date: Tue, 27 Jan 2026 15:00:09 +0300 Subject: [PATCH] feat: add text correction and improve post-install instructions - Add optional symspellpy for enhanced spell correction - Update post-install message with screenshot tools info - Mark Wayland tools as required in optdepends descriptions - Add instructions for pip installing symspellpy --- .SRCINFO | 7 +++---- PKGBUILD | 8 ++++---- sniptext.install | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 1aee3478e053..c6cf63cd242c 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -26,10 +26,9 @@ pkgbase = sniptext optdepends = tesseract-data-spa: Spanish language support optdepends = tesseract-data-jpn: Japanese language support optdepends = tesseract-data-chi_sim: Chinese Simplified language support - optdepends = slurp: Wayland screen selection - optdepends = grim: Wayland screenshot tool - optdepends = grimshot: Wayland screenshot tool - optdepends = wl-clipboard: Wayland clipboard support + optdepends = slurp: Wayland screen selection (required for Wayland) + optdepends = grim: Wayland screenshot tool (required for Wayland) + optdepends = wl-clipboard: Wayland clipboard support (required for Wayland) optdepends = maim: X11 screenshot tool optdepends = scrot: X11 screenshot tool optdepends = xclip: X11 clipboard support diff --git a/PKGBUILD b/PKGBUILD index d386ac446329..fa18ab863d92 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -27,15 +27,15 @@ optdepends=( 'tesseract-data-spa: Spanish language support' 'tesseract-data-jpn: Japanese language support' 'tesseract-data-chi_sim: Chinese Simplified language support' - 'slurp: Wayland screen selection' - 'grim: Wayland screenshot tool' - 'grimshot: Wayland screenshot tool' - 'wl-clipboard: Wayland clipboard support' + 'slurp: Wayland screen selection (required for Wayland)' + 'grim: Wayland screenshot tool (required for Wayland)' + 'wl-clipboard: Wayland clipboard support (required for Wayland)' 'maim: X11 screenshot tool' 'scrot: X11 screenshot tool' 'xclip: X11 clipboard support' 'imagemagick: X11 screenshot tool (import command)' ) +# Note: For enhanced spell correction, install: pip install --user symspellpy makedepends=('python-build' 'python-installer' 'python-wheel') source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") sha256sums=('c40385dbc536be6d3b1921c76adca872c9ddcdf2212f2dba58e4728b27e72e48') diff --git a/sniptext.install b/sniptext.install index 277e347039a2..1f772eb27973 100644 --- a/sniptext.install +++ b/sniptext.install @@ -20,6 +20,26 @@ post_install() { echo " GNOME: Settings → Keyboard → Custom Shortcuts" echo " KDE: System Settings → Shortcuts → Custom Shortcuts" echo "" + echo "========================================================================" + echo " IMPORTANT: Install screenshot tools for your display server!" + echo "========================================================================" + echo "" + echo " For Wayland (Hyprland, Sway, etc):" + echo " sudo pacman -S slurp grim wl-clipboard" + echo "" + echo " For X11 (i3, bspwm, etc):" + echo " sudo pacman -S maim xclip" + echo "" + echo "========================================================================" + echo " OPTIONAL: Enhanced text correction (recommended)" + echo "========================================================================" + echo "" + echo " For better OCR error correction, install:" + echo " pip install --user symspellpy" + echo "" + echo " This enables dictionary-based spell checking for OCR output." + echo " Basic correction works without it, but enhanced is better." + echo "" echo " Test from terminal: sniptext --capture-now" echo " Documentation: /usr/share/doc/sniptext/README.md" echo ""