From 7550e7d5a1385580db419da56c567c2d4a148702 Mon Sep 17 00:00:00 2001 From: AuroraWright Date: Mon, 4 Mar 2024 19:49:12 +0100 Subject: [PATCH] Clarify readme/help page --- README.md | 2 +- owocr/run.py | 5 +++-- setup.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 88677ef..9d69498 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Additionally: - Scanning the clipboard takes basically zero system resources on macOS and Windows - Supports reading images and/or writing text to a websocket with the `-r=websocket` and/or `-w=websocket` parameters (the port is 7331 by default, and is configurable in the config file) - Supports reading images from a Unix domain socket (`/tmp/owocr.sock`) on macOS and Linux with `-r=unixsocket` -- Supports capturing the screen directly with `-r=screencapture`. It will default to the entire first screen every 3 seconds, but a different screen/screen coordinates/window/delay can be specified in the config file. Instead of using a delay between screenshots you can also specify a keyboard combo (refer to the config file or the help page) +- Supports capturing the screen directly, or a portion of the screen or a specific window with `-r=screencapture`. By default it will read from the entire main screen every 3 seconds, but you can change it to screenshot a different screen or a portion of a screen (with a set of screen coordinates `x,y,width,height`) or just a specific window (with the window title), as specified in the config file. You can also change the delay between screenshots or specify a keyboard combo if you don't want screenshots to be taken periodically (refer to the config file or to `owocr --help` for more details about the screen capture settings). - You can pause/unpause the image processing by pressing "p" or terminate the script with "t" or "q" inside the terminal window - You can switch between OCR providers pressing their corresponding keyboard key inside the terminal window (refer to the list of keys in the providers list below) - You can start the script paused with the `-p` option or with a specific provider with the `-e` option (refer to `owocr -h` for the list) diff --git a/owocr/run.py b/owocr/run.py index bbc4456..fd2b992 100644 --- a/owocr/run.py +++ b/owocr/run.py @@ -516,7 +516,8 @@ def run(read_from=None, """ Japanese OCR client - Run OCR in the background, waiting for new images to appear either in system clipboard or a directory, or to be sent via a websocket. + Runs OCR in the background. + It can read images copied to the system clipboard or placed in a directory, images sent via a websocket or a Unix domain socket, or directly capture a screen (or a portion of it) or a window. Recognized texts can be either saved to system clipboard, appended to a text file or sent via a websocket. :param read_from: Specifies where to read input images from. Can be either "clipboard", "websocket", "unixsocket" (on macOS/Linux), "screencapture", or a path to a directory. @@ -529,7 +530,7 @@ def run(read_from=None, :param notifications: Show an operating system notification with the detected text. :param combo_pause: Specifies a combo to wait on for pausing the program. As an example: "++p". The list of keys can be found here: https://pynput.readthedocs.io/en/latest/keyboard.html#pynput.keyboard.Key :param combo_engine_switch: Specifies a combo to wait on for switching the OCR engine. As an example: "++a". To be used with combo_pause. The list of keys can be found here: https://pynput.readthedocs.io/en/latest/keyboard.html#pynput.keyboard.Key - :param screen_capture_monitor: Specifies monitor to target when reading with screen capture. + :param screen_capture_monitor: Specifies monitor to target when reading with screen capture. Will be ignored when screen_capture_coords is a window name. :param screen_capture_coords: Specifies area to target when reading with screen capture. Can be either empty (whole screen), a set of coordinates (x,y,width,height) or a window name (the first matching window title will be used). :param screen_capture_delay_secs: Specifies the delay (in seconds) between screenshots when reading with screen capture. :param screen_capture_only_active_windows: When reading with screen capture and screen_capture_coords is a window name, specifies whether to only target the window while it's active. diff --git a/setup.py b/setup.py index 2855dcc..491c2a1 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ long_description = (Path(__file__).parent / "README.md").read_text('utf-8') setup( name="owocr", - version='1.7', + version='1.7.1', description="Japanese OCR", long_description=long_description, long_description_content_type="text/markdown",