fix: improve post-install message and update instructions

- Update symspellpy installation instruction to use yay instead of pip
- Improve visual structure with clear sections
This commit is contained in:
dkorbelainen 2026-01-27 15:25:44 +03:00
parent 47775f296e
commit 34d0a4deb2
2 changed files with 57 additions and 47 deletions

View file

@ -35,7 +35,7 @@ optdepends=(
'xclip: X11 clipboard support'
'imagemagick: X11 screenshot tool (import command)'
)
# Note: For enhanced spell correction, install: pip install --user symspellpy
# Note: For enhanced spell correction, install: yay -S python-symspellpy
makedepends=('python-build' 'python-installer' 'python-wheel')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('5cd0fe35e186405e24aad46d9ba33c7783b222d4f83b1a6400f2a36e057d66d9')

View file

@ -1,50 +1,60 @@
post_install() {
echo ""
echo "========================================================================"
echo " SnipText OCR - Installation Complete"
echo "========================================================================"
echo ""
echo " REQUIRED: Configure a keyboard shortcut to use SnipText!"
echo ""
echo " Recommended keybind: Ctrl+Alt+T"
echo " Command to run: sniptext --capture-now"
echo ""
echo " Configuration examples:"
echo ""
echo " Hyprland (~/.config/hypr/hyprland.conf):"
echo " bind = CTRL ALT, T, exec, sniptext --capture-now"
echo ""
echo " Sway/i3 (~/.config/sway/config or ~/.config/i3/config):"
echo " bindsym Ctrl+Alt+t exec sniptext --capture-now"
echo ""
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 ""
echo "========================================================================"
echo ""
cat << 'EOF'
╔══════════════════════════════════════════════════════════════════════════╗
║ SnipText OCR - Installation Complete ║
╚══════════════════════════════════════════════════════════════════════════╝
[!] STEP 1: Configure keyboard shortcut (REQUIRED!)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Recommended keybind: Ctrl+Alt+T
Command to run: sniptext --capture-now
Configuration examples:
Hyprland (~/.config/hypr/hyprland.conf):
bind = CTRL ALT, T, exec, sniptext --capture-now
Sway/i3 (~/.config/sway/config or ~/.config/i3/config):
bindsym Ctrl+Alt+t exec sniptext --capture-now
GNOME: Settings -> Keyboard -> Custom Shortcuts
KDE: System Settings -> Shortcuts -> Custom Shortcuts
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[!] STEP 2: Install screenshot tools (REQUIRED!)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
For Wayland (Hyprland, Sway, etc):
sudo pacman -S slurp grim wl-clipboard
For X11 (i3, bspwm, etc):
sudo pacman -S maim xclip
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[*] OPTIONAL: Enhanced text correction (recommended)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
For better OCR error correction:
yay -S python-symspellpy
* Dictionary-based spell checking for OCR output
* Basic correction works without it, but this makes it better!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Test it!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Test from terminal:
sniptext --capture-now
Documentation:
/usr/share/doc/sniptext/README.md
╚══════════════════════════════════════════════════════════════════════════╝
EOF
}
post_upgrade() {