diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6205044 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,59 @@ +name: Build Windows Executable + +on: + push: + branches: + - main + paths: + - 'outlast_analyzer.py' + - '.github/workflows/build.yml' + pull_request: + paths: + - 'outlast_analyzer.py' + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pyinstaller + pip install -r requirements.txt + + - name: Get version from Python file + id: version + run: | + $version = python -c "exec(open('outlast_analyzer.py').read()); print(__version__)" + echo "version=$version" >> $env:GITHUB_OUTPUT + shell: pwsh + + - name: Build executable + run: | + pyinstaller --onefile --noconsole --name TOTStatsMonitor outlast_analyzer.py + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: TOTStatsMonitor-v${{ steps.version.outputs.version }} + path: dist/TOTStatsMonitor.exe + retention-days: 90 + + - name: Create Release + if: startsWith(github.ref, 'refs/tags/v') + uses: softprops/action-gh-release@v1 + with: + files: dist/TOTStatsMonitor.exe + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index 494bd39..536cc78 100644 --- a/README.md +++ b/README.md @@ -6,34 +6,17 @@ Help uns to track new players for [outlasttrialsstats.com](https://outlasttrials The program monitors your game logs of 'The Outlast Trials'-Game and extracts player IDs from matches you play. These IDs are then sent to outlasttrialsstats.com to help discover and scan new players for the community statistics database. -Note: In the future, we will honor contributors to the program on our website. 🙌 +Note: All contributors will automatically receive an exclusive contributor badge on their profile at outlasttrialsstats.com to honor their support! 🏅 +## 🚀 Quick Start (Recommended) -## 📋 Requirements +**Download the ready-to-use executable - no Python installation required!** -- Python 3.6+ -- OutlastTrials game installed +1. Go to [Releases](../../releases) +2. Download the latest `TOTStatsMonitor.exe` +3. Double-click to run +4. That's it! 🎉 +## âš ī¸ Disclaimer -## 🚀 Installation - -1. **Download the script** - - Download `outlast_analyzer.py` from this repository - -2. **Install Python** (if not already installed) - - Download Python from [python.org](https://python.org) - -3. **Install dependencies** - ```bash - pip install psutil requests - ``` - -4. **Run the program** - ```bash - python outlast_analyzer.py - ``` - -That's it! 🎉 - - -We are not Red Barrels and not partnered with Red Barrels or The Outlast Trials +We are not Red Barrels and not partnered with Red Barrels or The Outlast Trials. \ No newline at end of file diff --git a/outlast_analyzer.py b/outlast_analyzer.py index b4c4e1b..43b4be1 100644 --- a/outlast_analyzer.py +++ b/outlast_analyzer.py @@ -10,6 +10,7 @@ from datetime import datetime from typing import Optional +__version__ = "1.1.0" class OutlastTrialsMonitor: def __init__(self, silent_mode=False): @@ -124,6 +125,8 @@ def send_contribution_request(self, contributor_id: str, profile_id: str): if response.status_code == 200: self.log_message(f"✅ Player data sent successfully: {profile_id[:8]}...") + elif response.status_code == 208: + self.log_message(f"â„šī¸ Player already known: {profile_id[:8]}...") else: self.log_message(f"âš ī¸ API error (Status {response.status_code})") diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..556c461 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +psutil +requests \ No newline at end of file