Clarify websocket port
This commit is contained in:
@@ -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`
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user