82 lines
2.6 KiB
Markdown
82 lines
2.6 KiB
Markdown
# SportSoftware OE HTML viewer
|
|
|
|
[](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
|
|
<ul style="list-style-type: none"> ✅ Customizable auto-scroll (see Variables section) </ul>
|
|
<ul style="list-style-type: none"> ✅ Smooth scrolling </ul>
|
|
<ul style="list-style-type: none"> ✅ Auto-reload at bottom </ul>
|
|
<ul style="list-style-type: none"> ✅ Auto-reload at file change when no need for scrolling </ul>
|
|
<ul style="list-style-type: none"> ✅ Supports OE11 and OE12 exported HTML </ul>
|
|
<ul style="list-style-type: none"> ✅ File serving on localhost and LAN </ul>
|
|
|
|
### 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\<username>\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
|
|
|
|
## 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://<host machine IP address>`
|
|
|
|
### License
|
|
|
|
This project is licensed under the MIT License - see the `LICENSE` file for details.
|
|
|
|
<hr>
|
|
|
|
<p style="text-align: center;"> Made with ❤️ and ☕ on 603 NYÍRSÉG IC </p> |