/socr

searchable auto generated screenshot ocr database

Primary LanguagePython

socr

screenshot OCR tool, allows you to keep a searchable database of your screenshots and their contained text

Usage: socr [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  add     add a single screenshot to the database
  build   build db from the directory (run once)
  search  search for a screenshot given text

requirements

setup

  • install above requirements
  • pip3.7 install git+https://github.com/p0wer0n/socr.git
  • edit ~/.config/socr/config.py (see example config)
  • socr build (run once per install) looks at all your screenshots, extracts the text, embeds the text, and builds the database
  • add socr add <path to screenshot> to your screenshoting tool

TODO - Automator & Services setup on Macintosh

example usage

  • socr search <text> to see matching files
  • feh $(socr search <text>) with, for example, feh to view all matching screenshots
  • rm $(socr search <secret>) to delete screenshots with matching text (say you captured your password accidentally)

example config

# ~/.config/socr/config.py

SCREENSHOT_DIR: "~/pictures/screenshots"
SCREENSHOT_EXT: "png"