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
This commit is contained in:
dkorbelainen 2026-01-27 15:00:09 +03:00
parent 01ba89b3a8
commit 68483f69d0
3 changed files with 27 additions and 8 deletions

View file

@ -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

View file

@ -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')

View file

@ -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 ""