Parse and export CS2D stats in multiple formats: HTML, JSON, CSV, Markdown, or XML.
This tool parses CS2D server statistics and exports them in your preferred format. It supports:
- HTML (interactive tables)
- JSON (structured data)
- CSV (spreadsheet-friendly)
- Markdown (documentation-friendly)
- XML (legacy systems)
Use -h or --help to see all available options.
See example outputs in the /example-output directory:
cs2d-parser [OPTIONS] <folder> <output>| Argument | Description |
|---|---|
<folder> |
Path to the folder containing userstats.dat |
<output> |
Output file (must end with .html, .json, etc.) |
| Option | Description | Default |
|---|---|---|
-s, --sort <sort> |
Sort leaderboard: 0=score+kills-deaths, 1=assists+kills-deaths, 2=score+assists+deaths |
1 |
-l, --limit <limit> |
Limit the number of players in the output | 100 |
-t, --title <title> |
Title for HTML/Markdown reports | "CS2D Server" |
-p, --pretty-print |
Pretty-print JSON output for readability | Disabled |
-w, --watch |
Monitor userstats.dat for changes and regenerate output automatically |
Disabled |
-h, --help |
Print help | |
-V, --version |
Print version |
cs2d-parser.exe "C:\Program Files (x86)\Steam\steamapps\common\CS2D\sys\stats" "report.json"./cs2d-parser "/home/cs2d/sys/stats" "/var/www/html/dm.html" --title "Deathmatch Server"./cs2d-parser ~/Library/Application\ Support/CS2D/stats ~/Desktop/report.html --watchDownload the latest release for your platform from the Releases page.
- Install Rust.
- Clone this repository:
git clone https://github.com/ernestpasnik/cs2d-parser.git
- Build and install:
cd cs2d-parser cargo build --release
This project is open-source and licensed under the MIT License.
Contributions are welcome! Open an issue or submit a pull request.