diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fd2e992 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2025 Norbert Jovari + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..4770761 --- /dev/null +++ b/README.en.md @@ -0,0 +1,84 @@ +# SportSoftware OE HTML viewer + +
+ +[![hu](https://img.shields.io/badge/lang-hu-blue.svg)](https://gitea.carburator.dev/carburator/oe-html-viewer/src/branch/main/README.md) + +Simple Python script to serve the exported HTML results file from the SportSoftware OE application on the local network. +Use it to display the results on a TV or to serve results for the competitors. + +## Features + + + + + + + +### Variables + +The following variables can be found at the top of the `main.py` script: + +- `html_file_path`: Path to the HTML file to be served. Example: `C:\Users\\Documents\example-event\results.html` +- `host`: Host address for the Flask application. Leave at `0.0.0.0` for availability at all network addresses (localhost / LAN) +- `port`: Port number for the Flask application +- `is_oe11`: Boolean flag for encoding (`True` for OE11, `False` for OE12) +- `scroll_pixels`: Number of pixels to scroll each interval +- `scroll_interval`: Time interval (in seconds) between each scroll +- `bottom_wait_time`: Time to wait (in seconds) at the bottom of the page before reloading +- `top_wait_time`: Time to wait (in seconds) at the top of the page before starting to scroll +- `reload_interval`: Time interval (in seconds) to reload the page if no scrolling is needed. Set this value minimum 1 seconds larger than the export interval in OE + +## Getting Started + +### Prerequisites + +- Python 3.x +- pip +- virtualenv + +### Installation +Run these commands in CMD or PowerShell. + +1. Clone the repository: + + ```sh + git clone https://gitea.carburator.dev/carburator/oe-html-viewer.git + cd oe-html-viewer + ``` + +2. Create a virtual environment: + + ```sh + python -m venv .venv + ``` + +3. Activate the virtual environment: + + ```sh + .venv\Scripts\activate + ``` + +4. Install the required packages: + ```sh + pip install -r requirements.txt + ``` + +### Running the Application + +0. If you downloaded earlier and want to use the program again, first activate the venv. Check: Installation - 3. + +1. Start the Flask application: + + ```sh + python main.py + ``` + +2. Open your web browser and navigate to `http://localhost:80`. From other devices on LAN: `http://` + +### License + +This project is licensed under the MIT License - see the `LICENSE` file for details. + +
+

Made with ❤️ on 603 NYÍRSÉG IC

\ No newline at end of file diff --git a/README.md b/README.md index 5fbd7c4..149dc09 100644 --- a/README.md +++ b/README.md @@ -1,67 +1,84 @@ -# SportSoftware OE HTML viewer +# SportSoftware OE HTML megjelenítő -Simple Python script to serve the exported HTML results file from the SportSoftware OE application on the local network. +
-## Getting Started +[![en](https://img.shields.io/badge/lang-en-blue.svg)](https://gitea.carburator.dev/carburator/oe-html-viewer/src/branch/main/README.en.md) -### Prerequisites +Egyszerű python program, amivel a tájfutó eseményeken használt OE11 és OE12 programból exportált HTML fájlokat lehet megjeleníteni kijelzőn, vagy a helyi hálózaton. + +## Funkciók + + + + + + + + +### Változók + +A `main.py` fájl elején található, szerkeszthető változók: + +- `html_file_path`: Elérési út a HTML fájlhoz. Példa: `C:\Users\\Documents\példa-verseny\eredmenyek.html` +- `host`: A webszerver IP címe. Hagyd az alapértelmezett `0.0.0.0` értéken, hogy elérhető legyen a fájl lokálisan és a lokális hálózaton is +- `port`: A webszerver portja. Alapértelmezetten `80`, ez elhagyható az URL-ből +- `is_oe11`: Változó az OE11 vagy OE12 kiválasztására. Legyen `True` ha OE11-et használsz és `False`, ha OE12-t +- `scroll_pixels`: Ennyi pixelt görget lefelé +- `scroll_interval`: Időtartam másodpercben, ennyi időnként görget +- `bottom_wait_time`: Időtartam másodpercben, ennyit vár ha a lap aljára ért újratöltés előtt +- `top_wait_time`: Időtartam másodpercben, ennyit vár a lap tetején, mielőtt elkezdődne a görgetés +- `reload_interval`: Időtartam másodpercben, ennyit vár újratöltés előtt, ha nincs szükség görgetésre, mert a tartalom kifér a képernyőre. Legyen ez az érték minimum 1 másodperccel több, mint az automatikus exportálás ideje az OE-ben. + +## Használat + +### Előfeltételek - Python 3.x - pip - virtualenv -### Installation +### Telepítés +A következő parancsokat CMD-ben vagy PowerShell-ben kell kiadni. -1. Clone the repository: - ```sh - git clone https://gitea.carburator.dev/carburator/oe-html-viewer.git - cd oe-html-viewer - ``` +1. Töltsd le a repository-t: -2. Create a virtual environment: - ```sh - python -m venv .venv - ``` + ```sh + git clone https://gitea.carburator.dev/carburator/oe-html-viewer.git + cd oe-html-viewer + ``` -3. Activate the virtual environment: +2. Hozz létre egy virtuális környezetet: - - On Windows: - ```sh - .venv\Scripts\activate - ``` - - On macOS/Linux: - ```sh - source .venv/bin/activate - ``` + ```sh + python -m venv .venv + ``` -4. Install the required packages: - ```sh - pip install -r requirements.txt - ``` +3. Aktiváld a virtuális környezetet: -### Running the Application + ```sh + .venv\Scripts\activate + ``` -1. Start the Flask application: - ```sh - python main.py - ``` +4. Telepítsd a szükséges csomagokat: + ```sh + pip install -r requirements.txt + ``` -2. Open your web browser and navigate to `http://localhost:80`. +### Futtatás -### Variables +0. Ha már telepítetted és újra használni akarod, akkor előbb aktiváld a virtuális környezetet. Lásd: Telepítés - 3. -The following variables can be found at the top of the `main.py` script: +1. Indítsd el a programot: -- `html_file_path`: Path to the HTML file to be served. -- `host`: Host address for the Flask application. Leave at `0.0.0.0` for availability at all network addresses (localhost / LAN) -- `port`: Port number for the Flask application. -- `is_oe11`: Boolean flag for encoding (True for OE11, False for OE12). -- `scroll_pixels`: Number of pixels to scroll each interval. -- `scroll_interval`: Time interval (in seconds) between each scroll. -- `bottom_wait_time`: Time to wait (in seconds) at the bottom of the page before reloading. -- `top_wait_time`: Time to wait (in seconds) at the top of the page before starting to scroll. -- `reload_interval`: Time interval (in seconds) to reload the page if no scrolling is needed. Set this value minimum 1 seconds larger than the export interval in OE. + ```sh + python main.py + ``` -### License +2. Nyisd meg a böngészőt és írd be a címsorba: `http://localhost`. Más eszközről a helyi hálózaton: `http://` -This project is licensed under the MIT License - see the `LICENSE` file for details. \ No newline at end of file +### Licensz + +Ez a projekt az MIT Licensz alatt van licenszelve - részletekért lásd a LICENSE fájlt. + +
+

Készült sok ❤️-el a 603 NYÍRSÉG IC-n

\ No newline at end of file