Clarify websocket port

This commit is contained in:
AuroraWright
2025-10-19 07:02:24 +02:00
parent 12ac593882
commit d8d1c5da94
2 changed files with 2 additions and 1 deletions

View File

@@ -28,7 +28,7 @@ This default behavior monitors the clipboard for images and outputs recognized t
- Write text to a file: `owocr -w=<txt file path>`
- Read images from a folder: `owocr -r=<folder path>`
- Write text to a websocket: `owocr -w=websocket`
- Write text to a websocket: `owocr -w=websocket` (default websocket port is 7331)
- Read from the screen or a portion of the screen (opens the automatic drag and drop selector): `owocr -r=screencapture`
- Read from a window having "Notepad" in the title: `owocr -r=screencapture -sa=Notepad`
- Read from a portion of a window having "Notepad" in the title (opens the automatic drag and drop selector): `owocr -r=screencapture -sa=Notepad -swa`

View File

@@ -268,6 +268,7 @@ class WebsocketServerThread(threading.Thread):
self.server = start_server = websockets.serve(self.server_handler, '0.0.0.0', websocket_port, max_size=1000000000)
try:
async with start_server:
logger.info(f"Started websocket server on port {websocket_port}")
await stop_event.wait()
except OSError:
logger.error(f"Couldn't start websocket server. Make sure port {websocket_port} is not already in use")