|
2 | 2 |
|
3 | 3 | [](https://github.com/kWAYTV/rust-commit-tracker/actions/workflows/rust.yml) |
4 | 4 | [](https://crates.io/crates/rust-commit-tracker) |
| 5 | +[](https://opensource.org/licenses/MIT) |
5 | 6 |
|
6 | 7 | A reliable Discord bot that monitors Facepunch's Rust game commits and sends real-time notifications with SQLite persistence. |
7 | 8 |
|
8 | 9 | ## Features |
9 | 10 |
|
10 | | -- **Real-time monitoring** - Tracks new commits from Facepunch's Rust repository |
11 | | -- **Discord integration** - Rich embed notifications with commit details |
12 | | -- **SQLite persistence** - Prevents duplicate notifications across restarts |
13 | | -- **Auto-configuration** - Creates config file on first run |
14 | | -- **Automatic cleanup** - Maintains database size with configurable retention |
| 11 | +- 🔄 **Real-time monitoring** - Tracks new commits from Facepunch's Rust repository |
| 12 | +- 💬 **Discord integration** - Rich embed notifications with commit details |
| 13 | +- 💾 **SQLite persistence** - Prevents duplicate notifications across restarts |
| 14 | +- ⚙️ **Auto-configuration** - Creates config file on first run |
| 15 | +- 🧹 **Automatic cleanup** - Maintains database size with configurable retention |
| 16 | +- 🚀 **Zero dependencies** - Standalone executable with no runtime requirements |
15 | 17 |
|
16 | | -## Quick Start |
| 18 | +## Installation |
17 | 19 |
|
18 | | -1. **Clone and build** |
| 20 | +### Option 1: Download Pre-built Binary (Recommended) |
19 | 21 |
|
20 | | - ```bash |
21 | | - git clone https://github.com/kWAYTV/rust-commit-tracker.git |
22 | | - cd rust-commit-tracker |
23 | | - cargo build --release |
24 | | - ``` |
| 22 | +1. **Download the latest release** for your operating system: |
25 | 23 |
|
26 | | -2. **First run** (creates config file) |
| 24 | + - Go to [Releases](https://github.com/kWAYTV/rust-commit-tracker/releases) |
| 25 | + - Download the appropriate archive for your OS: |
| 26 | + - `rust-commit-tracker-vX.X.X-x86_64-pc-windows-gnu.zip` (Windows) |
| 27 | + - `rust-commit-tracker-vX.X.X-x86_64-unknown-linux-gnu.tar.gz` (Linux) |
| 28 | + - `rust-commit-tracker-vX.X.X-x86_64-apple-darwin.tar.gz` (macOS) |
27 | 29 |
|
| 30 | +2. **Extract and run**: |
28 | 31 | ```bash |
29 | | - cargo run |
| 32 | + # Extract the archive |
| 33 | + # On first run, it will create config.toml |
| 34 | + ./rust-commit-tracker |
30 | 35 | ``` |
31 | 36 |
|
32 | | -3. **Configure** - Edit `config.toml` with your Discord webhook URL |
| 37 | +### Option 2: Build from Source |
33 | 38 |
|
34 | | -4. **Run** |
35 | | - ```bash |
36 | | - cargo run |
37 | | - ``` |
| 39 | +Requirements: [Rust 1.70+](https://rustup.rs/) |
| 40 | + |
| 41 | +```bash |
| 42 | +git clone https://github.com/kWAYTV/rust-commit-tracker.git |
| 43 | +cd rust-commit-tracker |
| 44 | +cargo build --release |
| 45 | +./target/release/rust-commit-tracker |
| 46 | +``` |
| 47 | + |
| 48 | +### Option 3: Install via Cargo |
| 49 | + |
| 50 | +```bash |
| 51 | +cargo install rust-commit-tracker |
| 52 | +rust-commit-tracker |
| 53 | +``` |
38 | 54 |
|
39 | 55 | ## Configuration |
40 | 56 |
|
41 | | -The bot creates `config.toml` on first run: |
| 57 | +On first run, the application creates `config.toml`. **Only the Discord webhook URL is required** - all other settings have sensible defaults. |
| 58 | + |
| 59 | +### Required Configuration |
| 60 | + |
| 61 | +Edit `config.toml` and set your Discord webhook URL: |
42 | 62 |
|
43 | 63 | ```toml |
44 | 64 | [discord] |
45 | | -webhook_url = "YOUR_DISCORD_WEBHOOK_URL" |
46 | | -bot_name = "Rust Commit Tracker" |
47 | | -bot_avatar_url = "https://i.imgur.com/on47Qk9.png" |
| 65 | +webhook_url = "YOUR_DISCORD_WEBHOOK_URL" # ← Only required field |
| 66 | +``` |
| 67 | + |
| 68 | +### Full Configuration Reference |
| 69 | + |
| 70 | +```toml |
| 71 | +[discord] |
| 72 | +webhook_url = "YOUR_DISCORD_WEBHOOK_URL" # Required: Your Discord webhook |
| 73 | +bot_name = "Rust Commit Tracker" # Optional: Bot display name |
| 74 | +bot_avatar_url = "https://i.imgur.com/on47Qk9.png" # Optional: Bot avatar |
48 | 75 |
|
49 | 76 | [monitoring] |
50 | | -commits_url = "https://commits.facepunch.com/?format=json" |
51 | | -check_interval_secs = 50 |
| 77 | +commits_url = "https://commits.facepunch.com/?format=json" # API endpoint |
| 78 | +check_interval_secs = 50 # How often to check for new commits |
| 79 | + |
| 80 | +[appearance] |
| 81 | +embed_color = "#CD412B" # Rust orange color for Discord embeds |
| 82 | +footer_icon_url = "https://i.imgur.com/on47Qk9.png" |
52 | 83 |
|
53 | 84 | [database] |
54 | | -url = "sqlite:commits.db" |
55 | | -cleanup_keep_last = 1000 |
| 85 | +url = "sqlite:commits.db" # SQLite database location |
| 86 | +cleanup_keep_last = 1000 # Number of commits to retain in database |
| 87 | +``` |
| 88 | + |
| 89 | +## Getting a Discord Webhook URL |
| 90 | + |
| 91 | +1. Open your Discord server settings |
| 92 | +2. Go to **Integrations** → **Webhooks** |
| 93 | +3. Click **New Webhook** |
| 94 | +4. Choose the channel and copy the webhook URL |
| 95 | +5. Paste it into your `config.toml` file |
| 96 | + |
| 97 | +## Usage |
| 98 | + |
| 99 | +After configuration, simply run the executable: |
| 100 | + |
| 101 | +```bash |
| 102 | +./rust-commit-tracker |
56 | 103 | ``` |
57 | 104 |
|
58 | | -## Requirements |
| 105 | +The bot will: |
59 | 106 |
|
60 | | -- Rust 1.70+ |
61 | | -- Discord webhook URL |
| 107 | +- Start monitoring Facepunch's commit feed |
| 108 | +- Send notifications for new commits to your Discord channel |
| 109 | +- Maintain a local database to prevent duplicate notifications |
| 110 | +- Automatically resume from the last processed commit after restarts |
62 | 111 |
|
63 | | -## Files |
| 112 | +## Contributing |
64 | 113 |
|
65 | | -- `config.toml` - Configuration (auto-created) |
66 | | -- `commits.db` - SQLite database (auto-created) |
67 | | -- Both files are git-ignored for security |
| 114 | +1. Fork the repository |
| 115 | +2. Create a feature branch: `git checkout -b feature-name` |
| 116 | +3. Follow [Conventional Commits](https://www.conventionalcommits.org/) format |
| 117 | +4. Submit a pull request |
68 | 118 |
|
69 | 119 | ## License |
70 | 120 |
|
71 | | -MIT |
| 121 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 122 | + |
| 123 | +## Support |
| 124 | + |
| 125 | +- 🐛 **Issues**: [GitHub Issues](https://github.com/kWAYTV/rust-commit-tracker/issues) |
| 126 | +- 📖 **Documentation**: [GitHub Repository](https://github.com/kWAYTV/rust-commit-tracker) |
| 127 | +- 📦 **Crate**: [crates.io](https://crates.io/crates/rust-commit-tracker) |
0 commit comments