modified: .gitignore
modified: README.md new file: install.sh renamed: config.py -> lib/constants.py renamed: cvars.py -> lib/cvars.py renamed: formatter.py -> lib/formatter.py renamed: network.py -> lib/network.py renamed: parser.py -> lib/parser.py renamed: qlpycon_config.py -> lib/settings.py renamed: state.py -> lib/state.py renamed: ui.py -> lib/ui.py modified: main.py modified: qlpycon.bash new file: qlpycon.conf.example
This commit is contained in:
@@ -1,81 +1,80 @@
|
||||
# QLPyCon - Quake Live Python Console
|
||||
# qlpycon - Quake Live Python Console
|
||||
|
||||
Terminal-based client for monitoring and controlling Quake Live servers via ZMQ.
|
||||
|
||||
## Features
|
||||
|
||||
- Real-time game monitoring (kills, deaths, medals, team switches)
|
||||
- Server info display (map, gametype, scores, player list)
|
||||
- Team-aware colorized chat with location tracking
|
||||
- Powerup pickup and carrier kill notifications
|
||||
- JSON event capture for analysis
|
||||
- Quake color code support (^0-^7)
|
||||
- **Autocomplete for cvars/commands** with fuzzy matching
|
||||
- **Intelligent argument suggestions** for 25+ commands (bot names, maps, gametypes)
|
||||
Terminal client for monitoring and controlling Quake Live servers via ZMQ RCON.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pip install pyzmq
|
||||
python main.py --host tcp://SERVER_IP:PORT --password RCON_PASSWORD
|
||||
curl -sSL https://6bit.ch/qlpycon/install.sh | bash
|
||||
```
|
||||
|
||||
Or from a cloned repo:
|
||||
|
||||
```bash
|
||||
git clone https://git.6bit.ch/xbl/qlpycon.git
|
||||
cd qlpycon
|
||||
./install.sh
|
||||
```
|
||||
|
||||
The installer sets up a virtualenv, installs dependencies, and writes a launcher to `~/.local/bin/qlpycon`.
|
||||
|
||||
## Configuration
|
||||
|
||||
Edit `qlpycon.conf` in your install directory. See `qlpycon.conf.example` for all options.
|
||||
|
||||
```ini
|
||||
[connection]
|
||||
password = ${QLPYCON_PASSWORD}
|
||||
|
||||
[servers]
|
||||
ffa = 10.13.12.93:28960
|
||||
duel = 10.13.12.93:28961
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
# Basic
|
||||
python main.py --host tcp://SERVER_IP:PORT --password RCON_PASSWORD
|
||||
|
||||
# Verbose logging
|
||||
python main.py --host tcp://SERVER_IP:PORT --password RCON_PASSWORD -v
|
||||
|
||||
# Capture JSON events
|
||||
python main.py --host tcp://SERVER_IP:PORT --password RCON_PASSWORD --json events.log
|
||||
qlpycon ffa # connect by name
|
||||
qlpycon --host tcp://10.13.12.93:28960 --password secret # connect directly
|
||||
qlpycon --list # list configured servers
|
||||
```
|
||||
|
||||
**Options:**
|
||||
- `--host URI` - ZMQ RCON endpoint (default: tcp://127.0.0.1:27961)
|
||||
- `--password PASS` - RCON password (required)
|
||||
- `-v` / `-vv` - Verbose (INFO) or debug (DEBUG) logging
|
||||
- `--json FILE` - Log all events as JSON
|
||||
- `--unknown-log FILE` - Log unparsed events (default: unknown_events.log)
|
||||
- `--host URI` — ZMQ RCON endpoint
|
||||
- `--password PASS` — RCON password (or set `QLPYCON_PASSWORD` env var)
|
||||
- `--list` — list configured servers and exit
|
||||
- `-v` / `-vv` — verbose (INFO) or debug (DEBUG) logging
|
||||
- `--json FILE` — log all JSON events to file
|
||||
- `--unknown-log FILE` — log unparsed events (default: unknown_events.log)
|
||||
|
||||
**Configuration File (Optional):**
|
||||
Create `~/.qlpycon.conf` or `./qlpycon.conf`:
|
||||
```ini
|
||||
[connection]
|
||||
host = tcp://SERVER_IP:PORT
|
||||
password = your_password
|
||||
## Features
|
||||
|
||||
[logging]
|
||||
level = INFO
|
||||
```
|
||||
- Real-time kill/death/medal/team switch events
|
||||
- Team-aware colorized output with Quake color code support
|
||||
- Powerup pickup and carrier kill notifications
|
||||
- Server info panel (map, gametype, scores, players)
|
||||
- Tab autocomplete for cvars and commands with fuzzy matching
|
||||
- Argument suggestions for 25+ commands (bot names, maps, gametypes)
|
||||
- Command history (↑/↓)
|
||||
|
||||
**Input Features:**
|
||||
- **Smart autocomplete** - Type commands and see arguments highlighted in real-time
|
||||
- **Argument value suggestions** - Intelligent suggestions for bot names, maps, gametypes, teams, etc.
|
||||
- **Tab** - Cycle through autocomplete suggestions
|
||||
- **↑/↓** - Command history navigation
|
||||
- **Argument highlighting** - Current argument position shown in reverse video
|
||||
- **Command signatures** - Automatic display (e.g., `addbot <botname> [skill 1-5] [team]`)
|
||||
|
||||
See [AUTOCOMPLETE.md](AUTOCOMPLETE.md) for details.
|
||||
See [AUTOCOMPLETE.md](AUTOCOMPLETE.md) for input details.
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
main.py - Main loop, argument parsing, signal handling
|
||||
config.py - Constants (weapons, teams, colors, limits)
|
||||
state.py - Game state (ServerInfo, PlayerTracker, EventDeduplicator)
|
||||
network.py - ZMQ connections (RCON DEALER, Stats SUB sockets)
|
||||
parser.py - JSON event parsing (deaths, medals, switches, stats)
|
||||
formatter.py - Message formatting, color codes, team prefixes
|
||||
ui.py - Curses interface (3-panel: info, output, input)
|
||||
main.py — entry point, arg parsing, signal handling
|
||||
qlpycon.conf — user configuration
|
||||
lib/
|
||||
constants.py — weapons, teams, colors, limits
|
||||
settings.py — config file loader
|
||||
state.py — game state (server info, players, teams)
|
||||
network.py — ZMQ connections (RCON DEALER, stats SUB)
|
||||
parser.py — JSON event parsing
|
||||
formatter.py — message formatting and colorization
|
||||
ui.py — curses interface (info / output / input panels)
|
||||
cvars.py — cvar/command database and autocomplete
|
||||
```
|
||||
|
||||
**Supported Events:**
|
||||
PLAYER_SWITCHTEAM, PLAYER_DEATH/KILL, PLAYER_MEDAL, PLAYER_STATS, MATCH_STARTED/REPORT, PLAYER_CONNECT/DISCONNECT, ROUND_OVER
|
||||
|
||||
## License
|
||||
|
||||
WTFPL
|
||||
|
||||
Reference in New Issue
Block a user