Big refactoring, allow second image source

This commit is contained in:
AuroraWright
2025-05-04 08:37:54 +02:00
parent 7a307f4cb9
commit e48f388755
3 changed files with 252 additions and 259 deletions

View File

@@ -12,6 +12,8 @@ parser = argparse.ArgumentParser(prog='owocr', description=textwrap.dedent('''\
parser.add_argument('-r', '--read_from', type=str, default=argparse.SUPPRESS,
help='Where to read input images from. Can be either "clipboard", "websocket", "unixsocket" (on macOS/Linux), "screencapture", or a path to a directory.')
parser.add_argument('-rs', '--read_from_secondary', type=str, default=argparse.SUPPRESS,
help='Where to read input images from. Can be either "clipboard", "websocket", "unixsocket" (on macOS/Linux), "screencapture", or a path to a directory.')
parser.add_argument('-w', '--write_to', type=str, default=argparse.SUPPRESS,
help='Where to save recognized texts to. Can be either "clipboard", "websocket", or a path to a text file.')
parser.add_argument('-e', '--engine', type=str, default=argparse.SUPPRESS,
@@ -47,6 +49,7 @@ class Config:
__engine_config = {}
__default_config = {
'read_from': 'clipboard',
'read_from_secondary': None,
'write_to': 'clipboard',
'engine': '',
'pause_at_startup': False,