diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7cd7d27..47c6c08 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -53,17 +53,16 @@ jobs: brew install tesseract pip install --no-binary tesserocr tesserocr - # - name: Install pyinstaller for Windows - # if: matrix.os == 'windows-latest' - # # $env:PYINSTALLER_COMPILE_BOOTLOADER="True" - # run: | - # Invoke-WebRequest -Uri https://github.com/pyinstaller/pyinstaller/archive/refs/tags/v6.5.0.zip -OutFile pyinstaller-6.5.0.zip - # Expand-Archive -Path pyinstaller-6.5.0.zip -DestinationPath . - # cd pyinstaller-6.5.0 - # python -m pip install . - # cd .. - # Remove-Item -Recurse -Force pyinstaller-6.5.0 - # Remove-Item -Force pyinstaller-6.5.0.zip + - name: Install pyinstaller for Windows + if: matrix.os == 'windows-latest' + run: | + Invoke-WebRequest -Uri https://github.com/pyinstaller/pyinstaller/archive/refs/tags/v6.6.0.zip -OutFile pyinstaller-6.6.0.zip + Expand-Archive -Path pyinstaller-6.6.0.zip -DestinationPath . + cd pyinstaller-6.6.0 + python -m pip install . + cd .. + Remove-Item -Recurse -Force pyinstaller-6.6.0 + Remove-Item -Force pyinstaller-6.6.0.zip - name: Install dependencies run: | diff --git a/INSTALL.md b/INSTALL.md index f8da53c..01a0fbc 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -36,6 +36,14 @@ To install on Windows, simply click the .zip file and then the .exe setup instal Once the setup is complete, ScoreSight will be available as an application. +If you get an error of a virus (which is a false alarm) like so + +![alt text](docs/image-14.png) + +Make sure to disable real-time protection + +![alt text](docs/image-15.png) + ## Mac OS On Mac OS ScoreSight comes as packaged .app application which doesn't need installation. diff --git a/README.md b/README.md index e1afeaf..889cf4d 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ See the [releases](https://github.com/occ-ai/scoresight/releases) page for downl See the [Install Guide](INSTALL.md) for help with installation. -## Build from Source +## Running and Building from Source ### Prerequisites @@ -54,9 +54,9 @@ There are some extra steps for installation on Windows: - Download and install https://visualstudio.microsoft.com/visual-cpp-build-tools/ C++ Build Tools - Build the win32DeviceEnum pyd by `$ cd win32DeviceEnum && python.exe setup.py build_ext --inplace` -## Usage +### Running from source -1. Launch the application: +1. Once everything is installed launch the application: ```shell python main.py @@ -64,6 +64,31 @@ There are some extra steps for installation on Windows: 2. Follow the on-screen instructions to load an image of the scoreboard and extract the text. +### Build an executable + +You may want to build a distributable .exe or .app or even an installer, this is possible with [PyInstaller](https://github.com/pyinstaller/pyinstaller). + +To build the executable run PyInstaller. + +#### MacOS + +``` +pyinstaller --clean --noconfirm scoresight.spec -- --mac_osx +``` + +#### Windows + +``` +pyinstaller --clean --noconfirm scoresight.spec -- --win +``` + +#### Linux + +``` +pyinstaller --clean --noconfirm scoresight.spec +``` + + ## Contributing Contributions are welcome! If you would like to contribute to this project, please follow these steps: diff --git a/camera_view.py b/camera_view.py index 4f36047..5967196 100644 --- a/camera_view.py +++ b/camera_view.py @@ -5,7 +5,7 @@ QGraphicsScene, QGraphicsPixmapItem, ) -from PyQt6.QtCore import Qt, QTimer +from PyQt6.QtCore import Qt from PyQt6.QtGui import QImage, QPixmap, QPainter from PyQt6.QtCore import QThread, pyqtSignal import cv2 diff --git a/docs/http_server.md b/docs/http_server.md new file mode 100644 index 0000000..be35d26 --- /dev/null +++ b/docs/http_server.md @@ -0,0 +1,81 @@ +# Using the ScoreSight HTTP Server + +Get your scoreboard information in the browser for a simple integration into many streaming software, like OBS. + +This feature is only available on ScoreSight Pro. + +To get started, set up your scoreboard with the information you want to extract. See the Setup Process Guide for instructions. + +Enable the HTTP Server from the bottom-right section of ScoreSight: "Start HTTP Server" + +You can then open any browser and enter "http://localhost:18099/scoresight" as the URL. A simple scoreboard will appear. You may now use this URL in your streaming software. + +All the scoreboard information will be delivered as JSON in http://localhost:18099/json . This can be used as API in any other software or even HTML pages. + +If you want to create a more customized HTML scoreboard you are able to do so. Create a ".html" file anywhere on your disk and use the template example below to fetch data automatically from ScoreSight into the browser. + +Here is a simple HTML example that uses the JSON output: + +```html + + +
+ + +