rebrand to orc-gallery and optimise search/thumbnail responsiveness
Rebrand: - Rename project, binary, desktop file, and icons from screenshot-gallery/orcs-gallery to orc-gallery - Update display name to "ORC Gallery" throughout (window title, .desktop, README, plan.md) - Config dir changed from ScreenshotOCRGallery to OrcGallery Performance: - cancelSearch() is now non-blocking; new searches start immediately instead of waiting for the previous thread to drain - Remove double-emit from QFutureWatcher::finished handler; results emitted once directly from background thread - SQLite WAL mode + NORMAL sync + 20 MB page cache + memory temp store + 256 MB mmap applied on init and per-thread connections - Typing inactivity timer reduced from 500 ms to 150 ms - COUNT(*) OVER() window function folds total-count into the main SELECT, eliminating a separate COUNT round-trip per search - ImageThumbnail::paintEvent draws the filename overlay; removes 3 child QObjects (QFrame + QLabel + QHBoxLayout) per thumbnail - loadThumbnailAsync posts QImage load+scale to QThreadPool; QPixmap::fromImage called on main thread via Qt::QueuedConnection invokeMethod; QPointer guards against use-after-free on gallery clear Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# This script displays OCR data from SQLite and allows opening files with rofi
|
||||
|
||||
# Database path
|
||||
DB_PATH="${XDG_DATA_HOME:-$HOME/.local/share}/screenshot-gallery/screenshot_ocr.db"
|
||||
DB_PATH="${XDG_DATA_HOME:-$HOME/.local/share}/orc-gallery/screenshot_ocr.db"
|
||||
|
||||
# Check dependencies
|
||||
check_deps() {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# This script displays OCR data from SQLite and allows opening files with rofi
|
||||
|
||||
# Database path
|
||||
DB_PATH="${XDG_DATA_HOME:-$HOME/.local/share}/screenshot-gallery/screenshot_ocr.db"
|
||||
DB_PATH="${XDG_DATA_HOME:-$HOME/.local/share}/orc-gallery/screenshot_ocr.db"
|
||||
SCREENSHOTS_DIR="$HOME/Screenshots"
|
||||
MAX_TEXT_LENGTH=100
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ Usage:
|
||||
|
||||
Arguments:
|
||||
--db Path to the SQLite database file.
|
||||
Default: $XDG_DATA_HOME/screenshot-gallery/screenshot_ocr.db
|
||||
(~/.local/share/screenshot-gallery/screenshot_ocr.db)
|
||||
Default: $XDG_DATA_HOME/orc-gallery/screenshot_ocr.db
|
||||
(~/.local/share/orc-gallery/screenshot_ocr.db)
|
||||
--screenshots-dir Directory containing screenshot images to process.
|
||||
Default: ~/Screenshots
|
||||
"""
|
||||
@@ -53,7 +53,7 @@ signal.signal(signal.SIGINT, _handle_signal)
|
||||
# ---------------------------------------------------------------------------
|
||||
def parse_args() -> argparse.Namespace:
|
||||
xdg_data = os.environ.get("XDG_DATA_HOME", os.path.expanduser("~/.local/share"))
|
||||
default_db = os.path.join(xdg_data, "screenshot-gallery", "screenshot_ocr.db")
|
||||
default_db = os.path.join(xdg_data, "orc-gallery", "screenshot_ocr.db")
|
||||
default_dir = os.path.expanduser("~/Screenshots")
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
|
||||
@@ -7,7 +7,7 @@ import sys
|
||||
import tempfile
|
||||
|
||||
# Configuration
|
||||
DB_PATH = os.path.join(os.environ.get("XDG_DATA_HOME", os.path.expanduser("~/.local/share")), "screenshot-gallery", "screenshot_ocr.db")
|
||||
DB_PATH = os.path.join(os.environ.get("XDG_DATA_HOME", os.path.expanduser("~/.local/share")), "orc-gallery", "screenshot_ocr.db")
|
||||
SCREENSHOTS_DIR = os.path.expanduser("~/Screenshots")
|
||||
ROFI_PROMPT = "OCR Search"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# This script displays OCR'd screenshot data in rofi and allows opening selected files
|
||||
|
||||
# Constants
|
||||
DATABASE_PATH="${XDG_DATA_HOME:-$HOME/.local/share}/screenshot-gallery/screenshot_ocr.db"
|
||||
DATABASE_PATH="${XDG_DATA_HOME:-$HOME/.local/share}/orc-gallery/screenshot_ocr.db"
|
||||
SCREENSHOTS_DIR="$HOME/Screenshots"
|
||||
ROFI_PROMPT="Screenshot OCR"
|
||||
MAX_DISPLAY_LENGTH=100
|
||||
|
||||
@@ -7,7 +7,7 @@ import sys
|
||||
from datetime import datetime
|
||||
|
||||
# Constants
|
||||
DATABASE_PATH = os.path.join(os.environ.get("XDG_DATA_HOME", os.path.expanduser("~/.local/share")), "screenshot-gallery", "screenshot_ocr.db")
|
||||
DATABASE_PATH = os.path.join(os.environ.get("XDG_DATA_HOME", os.path.expanduser("~/.local/share")), "orc-gallery", "screenshot_ocr.db")
|
||||
|
||||
|
||||
def parse_arguments():
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# simple_rofi_ocr.sh - A simplified script to search OCR'd screenshots with rofi
|
||||
|
||||
# Database location
|
||||
DB_PATH="${XDG_DATA_HOME:-$HOME/.local/share}/screenshot-gallery/screenshot_ocr.db"
|
||||
DB_PATH="${XDG_DATA_HOME:-$HOME/.local/share}/orc-gallery/screenshot_ocr.db"
|
||||
|
||||
# Check if database exists
|
||||
if [ ! -f "$DB_PATH" ]; then
|
||||
|
||||
Reference in New Issue
Block a user