mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
feat: release 0.5.0 (#191)
* feat: add initial crates readmes * feat: add initial CLI readme * fix: some links * feat: fix node badge, split changelogs, fix some other links add docs in cli * feat: feature the gamedig site in the lib * feat: fill in cli package fields * feat: set CLI version to 0.1.0 * feat: update changelogs to set vers * feat: update the release workflow
This commit is contained in:
parent
bcb9ac64c0
commit
275fb7d4cd
8 changed files with 613 additions and 433 deletions
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
|
|
@ -4,8 +4,11 @@ on:
|
|||
release:
|
||||
types: [created]
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
if: startsWith(github.event.release.tag_name, 'cli-')
|
||||
name: Release ${{ matrix.target }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<img src="https://img.shields.io/crates/d/gamedig?color=purple" alt="Crates.io">
|
||||
</a>
|
||||
<a href="https://github.com/gamedig/node-gamedig">
|
||||
<img src="./.github/badges/node.svg" alt="Node-GameDig Game Coverage">
|
||||
<img src="https://raw.githubusercontent.com/gamedig/rust-gamedig/main/.github/badges/node.svg" alt="Node-GameDig Game Coverage">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
|
@ -83,9 +83,13 @@ Response (note that some games have a different structure):
|
|||
|
||||
Want to see more examples? Checkout the [examples](crates/lib/examples) folder.
|
||||
|
||||
## Command Line Interface
|
||||
The library also has an official CLI: [GameDig-CLI](https://crates.io/crates/gamedig-cli).
|
||||
|
||||
## Documentation
|
||||
The documentation is available at [docs.rs](https://docs.rs/gamedig/latest/gamedig/).
|
||||
Curious about the history and what changed between versions? Everything is in the [CHANGELOG](CHANGELOG.md) file.
|
||||
Curious about the history and what changed between versions?
|
||||
Everything is in the changelogs file: [lib](crates/lib/CHANGELOG.md) and [cli](crates/lib/CHANGELOG.md).
|
||||
|
||||
## Contributing
|
||||
If you want to see your favorite game/service being supported here, open an issue, and I'll prioritize it (or do a pull request if you want to implement it yourself)!
|
||||
|
|
|
|||
20
crates/cli/CHANGELOG.md
Normal file
20
crates/cli/CHANGELOG.md
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
Who knows what the future holds...
|
||||
|
||||
# 0.X.Y - DD/MM/YYYY
|
||||
Nothing... yet.
|
||||
|
||||
# 0.1.0 - 15/03/2024
|
||||
### Changes:
|
||||
- Added the CLI (by @cainthebest).
|
||||
- Added DNS lookup support (by @Douile).
|
||||
- Added JSON output option (by @Douile).
|
||||
- Added BSON output in hex or base64 (by @cainthebest).
|
||||
- Added XML output option (by @cainthebest).
|
||||
- Added ExtraRequestSettings as CLI arguments (by @Douile).
|
||||
- Added TimeoutSettings as CLI argument (by @Douile).
|
||||
- Added Comprehensive end-user documentation for the CLI interface (by @Douile & @cainthebest).
|
||||
- Tweaked compile-time flags to allow for a more preformant binary (by @cainthebest).
|
||||
- Added client for socket capture, dev tools are not included by default (by @Douile).
|
||||
- Added license information to the CLI (by @cainthebest).
|
||||
- Added source code information to the CLI (by @cainthebest).
|
||||
|
|
@ -5,11 +5,16 @@ authors = [
|
|||
]
|
||||
description = "A command line interface for gamedig"
|
||||
license = "MIT"
|
||||
version = "0.4.1"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
default-run = "gamedig-cli"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
homepage = "https://gamedig.github.io/"
|
||||
documentation = "https://docs.rs/gamedig-cli/latest/gamedig-cli/"
|
||||
repository = "https://github.com/gamedig/rust-gamedig"
|
||||
readme = "README.md"
|
||||
keywords = ["server", "query", "game", "check", "status"]
|
||||
rust-version = "1.65.0"
|
||||
categories = ["parsing", "command-line-interface"]
|
||||
|
||||
[features]
|
||||
default = ["json", "bson", "xml", "browser"]
|
||||
|
|
|
|||
52
crates/cli/README.md
Normal file
52
crates/cli/README.md
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# rust-GameDig CLI
|
||||
The official [rust-GameDig](https://crates.io/crates/gamedig) Command Line Interface.
|
||||
|
||||
[](https://github.com/gamedig/rust-gamedig/actions) [](https://crates.io/crates/gamedig-cli) [](https://crates.io/crates/gamedig-cli) [](https://github.com/gamedig/rust-gamedig/blob/main/LICENSE.md) [](https://github.com/gamedig/node-gamedig)
|
||||
|
||||
## Community
|
||||
Checkout the GameDig Community Discord Server [here](https://discord.gg/NVCMn3tnxH).
|
||||
Note that it isn't be a replacement for GitHub issues, if you have found a problem
|
||||
within the library or want to request a feature, it's better to do so here rather than
|
||||
on Discord.
|
||||
|
||||
## Usage
|
||||
Just by running `gamedig-cli` prints the usage.
|
||||
**Note**: Passing `--help` (or `-h`) shows the usage.
|
||||
|
||||
Here's also a quick rundown of a simple query with the `json-pretty` format:
|
||||
|
||||
Pick a game/service/protocol (check the [GAMES](https://github.com/gamedig/rust-gamedig/blob/main/GAMES.md), [SERVICES](https://github.com/gamedig/rust-gamedig/blob/main/SERVICES.md) and [PROTOCOLS](https://github.com/gamedig/rust-gamedig/blob/main/PROTOCOLS.md) files to see the currently supported ones), provide the ip and the port (be aware that some game servers use a separate port for the info queries, the port can also be optional if the server is running the default ports) then query on it.
|
||||
|
||||
[Team Fortress 2](https://store.steampowered.com/app/440/Team_Fortress_2/) query example:
|
||||
```
|
||||
gamedig-cli query -g teamfortress2 -i 127.0.0.1 -f json-pretty
|
||||
```
|
||||
What we are doing here:
|
||||
* `-g` (or `--game`) specifies the game.
|
||||
* `-i` (or `--ip`) target ip.
|
||||
* `-f` (or `--format`) our preferred format.
|
||||
|
||||
Note: We haven't specified a port (via `-p` or `--port`), so the default one for the game will be used (`27015` in this case).
|
||||
|
||||
Response (note that some games have a different structure):
|
||||
```json
|
||||
{
|
||||
"name": "A cool server.",
|
||||
"description": null,
|
||||
"game_mode": "Team Fortress",
|
||||
"game_version": "8690085",
|
||||
"map": "cp_foundry",
|
||||
"players_maximum": 24,
|
||||
"players_online": 0,
|
||||
"players_bots": 0,
|
||||
"has_password": false,
|
||||
"players": []
|
||||
}
|
||||
```
|
||||
|
||||
## Documentation
|
||||
The documentation is available at [docs.rs](https://docs.rs/gamedig/latest/gamedig-cli/).
|
||||
Curious about the history and what changed between versions? Everything is in the [CHANGELOG](https://github.com/gamedig/rust-gamedig/blob/main/crates/cli/CHANGELOG.md) file.
|
||||
|
||||
## Contributing
|
||||
Please read [CONTRIBUTING](https://github.com/gamedig/rust-gamedig/blob/main/CONTRIBUTING.md).
|
||||
|
|
@ -2,6 +2,9 @@
|
|||
Who knows what the future holds...
|
||||
|
||||
# 0.X.Y - DD/MM/YYYY
|
||||
Nothing... yet!
|
||||
|
||||
# 0.5.0 - 15/03/2024
|
||||
### Changes:
|
||||
Games:
|
||||
- [Valheim](https://store.steampowered.com/app/892970/Valheim/) support.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "gamedig"
|
||||
version = "0.4.1"
|
||||
version = "0.5.0"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"rust-GameDig contributors [https://github.com/gamedig/rust-gamedig/contributors]",
|
||||
|
|
@ -8,7 +8,7 @@ authors = [
|
|||
]
|
||||
license = "MIT"
|
||||
description = "Query game servers and not only."
|
||||
homepage = "https://github.com/gamedig/rust-gamedig"
|
||||
homepage = "https://gamedig.github.io/"
|
||||
documentation = "https://docs.rs/gamedig/latest/gamedig/"
|
||||
repository = "https://github.com/gamedig/rust-gamedig"
|
||||
readme = "README.md"
|
||||
|
|
|
|||
93
crates/lib/README.md
Normal file
93
crates/lib/README.md
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
<h1 align="center">rust-GameDig</h1>
|
||||
|
||||
<h5 align="center">The fast library for querying game servers/services.</h5>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://github.com/gamedig/rust-gamedig/actions">
|
||||
<img src="https://github.com/gamedig/rust-gamedig/actions/workflows/ci.yml/badge.svg" alt="CI">
|
||||
</a>
|
||||
<a href="https://crates.io/crates/gamedig">
|
||||
<img src="https://img.shields.io/crates/v/gamedig.svg?color=yellow" alt="Latest Version">
|
||||
</a>
|
||||
<a href="https://crates.io/crates/gamedig">
|
||||
<img src="https://img.shields.io/crates/d/gamedig?color=purple" alt="Crates.io">
|
||||
</a>
|
||||
<a href="https://github.com/gamedig/node-gamedig">
|
||||
<img src="https://raw.githubusercontent.com/gamedig/rust-gamedig/main/.github/badges/node.svg" alt="Node-GameDig Game Coverage">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<h5 align="center">
|
||||
This library brings what
|
||||
<a href="https://github.com/gamedig/node-gamedig">
|
||||
node-GameDig
|
||||
</a>
|
||||
does (and not only), to pure Rust!
|
||||
</h5>
|
||||
|
||||
**Warning**: This project goes through frequent API breaking changes and hasn't been thoroughly tested.
|
||||
|
||||
## Community
|
||||
Checkout the GameDig Community Discord Server [here](https://discord.gg/NVCMn3tnxH).
|
||||
Note that it isn't be a replacement for GitHub issues, if you have found a problem
|
||||
within the library or want to request a feature, it's better to do so here rather than
|
||||
on Discord.
|
||||
|
||||
## Usage
|
||||
Minimum Supported Rust Version is `1.65.0` and the code is cross-platform.
|
||||
|
||||
Pick a game/service/protocol (check the [GAMES](https://github.com/gamedig/rust-gamedig/blob/main/GAMES.md), [SERVICES](https://github.com/gamedig/rust-gamedig/blob/main/SERVICES.md) and [PROTOCOLS](https://github.com/gamedig/rust-gamedig/blob/main/PROTOCOLS.md) files to see the currently supported ones), provide the ip and the port (be aware that some game servers use a separate port for the info queries, the port can also be optional if the server is running the default ports) then query on it.
|
||||
|
||||
[Team Fortress 2](https://store.steampowered.com/app/440/Team_Fortress_2/) query example:
|
||||
```rust
|
||||
use gamedig::games::teamfortress2;
|
||||
|
||||
fn main() {
|
||||
let response = teamfortress2::query(&"127.0.0.1".parse().unwrap(), None);
|
||||
// None is the default port (which is 27015), could also be Some(27015)
|
||||
|
||||
match response { // Result type, must check what it is...
|
||||
Err(error) => println!("Couldn't query, error: {}", error),
|
||||
Ok(r) => println!("{:#?}", r)
|
||||
}
|
||||
}
|
||||
```
|
||||
Response (note that some games have a different structure):
|
||||
```json5
|
||||
{
|
||||
protocol: 17,
|
||||
name: "Team Fortress 2 Dedicated Server.",
|
||||
map: "ctf_turbine",
|
||||
game: "tf2",
|
||||
appid: 440,
|
||||
players_online: 0,
|
||||
players_details: [],
|
||||
players_maximum: 69,
|
||||
players_bots: 0,
|
||||
server_type: Dedicated,
|
||||
has_password: false,
|
||||
vac_secured: true,
|
||||
version: "7638371",
|
||||
port: Some(27015),
|
||||
steam_id: Some(69753253289735296),
|
||||
tv_port: None,
|
||||
tv_name: None,
|
||||
keywords: Some("alltalk,nocrits"),
|
||||
rules: [
|
||||
"mp_autoteambalance": "1",
|
||||
"mp_maxrounds": "5",
|
||||
//....
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Want to see more examples? Checkout the [examples](https://github.com/gamedig/rust-gamedig/tree/main/crates/lib/examples) folder.
|
||||
|
||||
## Documentation
|
||||
The documentation is available at [docs.rs](https://docs.rs/gamedig/latest/gamedig/).
|
||||
Curious about the history and what changed between versions? Everything is in the [CHANGELOG](https://github.com/gamedig/rust-gamedig/blob/main/crates/lib/CHANGELOG.md) file.
|
||||
|
||||
## Contributing
|
||||
If you want to see your favorite game/service being supported here, open an issue, and I'll prioritize it (or do a pull request if you want to implement it yourself)!
|
||||
|
||||
Before contributing please read [CONTRIBUTING](https://github.com/gamedig/rust-gamedig/blob/main/CONTRIBUTING.md).
|
||||
Loading…
Add table
Add a link
Reference in a new issue