Metadata-Version: 2.4
Name: fahrpc
Version: 1.0.4
Summary: Folding@Home Discord Rich Presence - Monitor GPU folding progress in Discord
Author: Bandokii
Project-URL: Homepage, https://github.com/Bandokii/FAHRPC
Project-URL: Repository, https://github.com/Bandokii/FAHRPC.git
Project-URL: Documentation, https://github.com/Bandokii/FAHRPC#readme
Project-URL: Issues, https://github.com/Bandokii/FAHRPC/issues
Keywords: folding-at-home,discord,rich-presence,gpu-monitoring,nvidia,amd
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Win32 (MS Windows)
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Operating System :: Microsoft :: Windows :: Windows 11
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: Internet
Classifier: Topic :: Utilities
Requires-Python: <3.14,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: playwright>=1.40.0
Requires-Dist: pypresence>=4.0.0
Requires-Dist: nvidia-ml-py>=12.535.108
Requires-Dist: pystray>=0.19.4
Requires-Dist: Pillow>=10.0.0
Requires-Dist: pyadl>=0.1
Requires-Dist: platformdirs>=4.0.0
Provides-Extra: dev
Requires-Dist: ruff>=0.1.0; extra == "dev"
Dynamic: license-file

# FAHRPC - Folding@Home Discord Rich Presence

[![Python](https://img.shields.io/badge/Python-3.10%2B-blue)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/License-MIT-green)](LICENSE)
[![Windows](https://img.shields.io/badge/Platform-Windows-blue)](https://www.microsoft.com/windows/)

Monitor your Folding@Home GPU progress directly in Discord with real-time status updates, GPU stats, and performance metrics.

## Features

- 🎮 **Discord Rich Presence** - Display folding progress in your Discord status
- 💻 **GPU Monitoring** - Real-time GPU utilization and temperature tracking
- 🔍 **Dual GPU Support** - Monitor NVIDIA and AMD GPUs simultaneously
- 📊 **Live Stats** - Total points earned and work units completed
- 🔄 **Auto-Reconnect** - Automatic reconnection on disconnect
- 🌡️ **Temperature Alerts** - Color-coded temperature warnings
- 🎛️ **System Tray** - Minimize to tray with quick access menu
- ⚡ **Lightweight** - Minimal CPU and memory usage
- 🔧 **Configurable** - Full customization via config.json

## What You'll See

Your Discord status will display:
- Current project ID and work unit progress
- GPU model, utilization, and temperature
- Total Folding@Home points and completed work units
- Real-time updates every 15 seconds

## Requirements

- **Windows 10/11** - Windows operating system
- **Discord** - Running and logged in
- **Folding@Home** - With web interface enabled (port 7396)
- **GPU** - NVIDIA or AMD with updated drivers
- **Internet** - For Discord and FAH stats server

> **Note:** Python is NOT required to be pre-installed. The setup script handles everything automatically using Python 3.12.

> **⚠️ Important:** If you have Python 3.14+ installed, the setup will automatically use Python 3.12 instead to ensure compatibility.

## Installation (Zip Download)

### Step 1: Download

1. Go to the [Releases](https://github.com/Bandokii/FAHRPC/releases) page
2. Download the latest `FAHRPC-vX.X.X.zip` file
3. Extract the zip to your desired location (e.g., `C:\FAHRPC`)

### Step 2: Run Setup

1. Open the extracted `FAHRPC` folder
2. **Double-click `setup.bat`**
3. Wait for setup to complete (first run may take 1-2 minutes)

The setup script automatically:
- Installs the uv package manager (if needed)
- Creates a virtual environment
- Installs all Python dependencies
- Downloads browser components for web scraping
- Generates the `run_fahrpc.bat` launcher
- Creates a desktop shortcut
- Verifies all dependencies are working

### Step 3: Launch

1. **Double-click `run_fahrpc.bat`**
2. Check your Discord status - you should see Folding@Home info!

That's it! 🎉

## Usage

### Running FAHRPC

Simply **double-click `run_fahrpc.bat`** in your FAHRPC folder.

The application will:
- Connect to Discord
- Monitor your Folding@Home progress
- Display stats in your Discord status
- Minimize to system tray

### System Tray

Once running, FAHRPC sits in your system tray. Right-click the icon to:
- Show/hide console window
- Restart application
- Exit cleanly

### Configuration

Edit the config file to customize:
- Discord client ID
- Folding@Home interface URL (local only)
- Temperature thresholds and colors
- GPU monitoring (NVIDIA/AMD)
- Update interval (default: 15 seconds)
- Display options

**Config file location:**
- **Windows:** `%LOCALAPPDATA%\Bandokii\fahrpc\config.json`
- **macOS:** `~/Library/Application Support/fahrpc/config.json`
- **Linux:** `~/.config/fahrpc/config.json`

**Folding@Home URL:**
- **Default:** `http://localhost:7396/` - Monitors the PC that FAHRPC is running on

**Default configuration works out of the box!**

## Autostart (Optional)

### Using Task Scheduler (Recommended)

1. Press `Windows+R` → type `taskschd.msc`
2. Click "Create Basic Task"
3. Name: `FAHRPC`, Trigger: `At startup`
4. Action: Start program
5. Program: `C:\FAHRPC\run_fahrpc.bat` (use your actual path)

### Using Startup Folder

1. Press `Windows+R` → type `shell:startup`
2. Create a shortcut to `run_fahrpc.bat` in this folder

## Troubleshooting

### Discord Not Connecting
- Ensure Discord is running and logged in
- Check Windows Firewall isn't blocking FAHRPC
- FAHRPC auto-retries every 15 seconds

### Folding@Home Not Detected
- Ensure F@H is running
- Enable web interface in F@H settings
- Verify it's on `localhost:7396` (or update config.json)
- Restart both F@H and FAHRPC

### GPU Stats Not Showing
- Update GPU drivers (NVIDIA or AMD)
- Check `fah_error_log.txt` for hardware errors
- Verify GPU is enabled in `config.json`

### High CPU Usage
- Increase `update_interval` in config.json
- Disable unused GPU type in config.json
- Check web scraper timeouts in error log

### Setup Issues
- Ensure stable internet connection
- Run `setup.bat` again (safe to run multiple times)
- May require 500MB+ free disk space for browser components

## Updating

To update FAHRPC:
1. Download the latest zip from [Releases](https://github.com/Bandokii/FAHRPC/releases)
2. Extract and replace your existing files (keep your `config.json` if customized)
3. Run `setup.bat` again to update dependencies

## Uninstall

To remove FAHRPC:
1. **Delete the FAHRPC folder** - This removes all application files and the virtual environment

> **Note:** The uv package manager will remain on your system. If you don't need it, see the [uv uninstallation guide](https://docs.astral.sh/uv/getting-started/installation/#uninstallation).

## Advanced Installation (Optional)

For developers or advanced users who prefer command-line installation:

### Global Command Installation

After running `setup.bat`, you can install FAHRPC as a global command:

```bash
uv tool install .
```

Then run from anywhere with:
```bash
fahrpc
```

### Install from PyPI

```bash
pip install fahrpc
## Dependencies

All dependencies are automatically installed by `setup.bat`. For reference:

### Python Packages
- **playwright** - Web scraping and browser automation
- **pypresence** - Discord RPC integration
- **platformdirs** - Cross-platform config paths

│   ├── main.py          # Entry point
│   ├── config.py        # Configuration
├── pyproject.toml       # Project metadata
└── run_fahrpc.bat       # Launcher (created by setup)
```

## Development

Clone the repository:

```bash
git clone https://github.com/Bandokii/FAHRPC.git
cd FAHRPC
```

Run in development mode:

```bash
uv run python -m fahrpc.main
```

Build distribution:

```bash
uv build
```

## License

MIT License - See [LICENSE](LICENSE) file for details

## Credits

**Original Creator:** Bandokii  
**AI Collaborator:** GitHub Copilot  
**Refactoring & Modernization:** January 2026

## Support

- 📖 See this README for detailed documentation
- 🆘 Check the error log for troubleshooting (in your config directory)
- 🐛 Report issues on [GitHub Issues](https://github.com/Bandokii/FAHRPC/issues)
- 💬 Start discussions on [GitHub Discussions](https://github.com/Bandokii/FAHRPC/discussions)

## FAQ

**Q: Do I need Python installed?**  
A: No! The setup script handles everything automatically, including Python.

**Q: Does this work on Linux/macOS?**  
A: The code is cross-platform-ready, but primary support is Windows due to system tray integration and GPU driver availability. Config paths work on all platforms for users who want to port it.

**Q: Can I use custom GPU names?**  
A: Yes! Edit the `hardware.nvidia.strip_prefix` and `hardware.amd.strip_prefix` values in config.json

**Q: Does this impact Folding@Home performance?**  
A: No, FAHRPC only reads data. It has minimal CPU/memory overhead (~50MB RAM).

<<<<<<< HEAD

=======
>>>>>>> 379b21b740cffe4fc22408c5b86bc1f1e4c1fc74

**Q: How do I update FAHRPC?**  
A: Download the latest zip, extract over your existing folder, and run `setup.bat` again.

## Changelog

### Version 1.0.2 (January 2026)
- Fixed Python 3.14 compatibility issue
- Setup now enforces Python 3.10-3.13 via `--python 3.12`
- Added `.python-version` file for uv compatibility
- Prevents greenlet build failures on unsupported Python versions

### Version 1.0.1 (January 2026)
- Fixed config/log file paths to use platformdirs
- Cross-platform app data directory support
- Added desktop shortcut creation in setup
- Improved error handling in batch launcher
- Updated documentation and references

### Version 1.0.0 (January 2026)
- Initial PyPI release
- Modern Python src layout
- Command-line entry point
- Full GPU monitoring
- Discord Rich Presence
- System tray integration
- Comprehensive error logging

---

**Happy Folding!** 🏠💪
