Skip to content

Commit

Permalink
Support for medals in dcliah and updating readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikechambers committed Oct 31, 2021
1 parent 78ee7f7 commit 6ddf669
Show file tree
Hide file tree
Showing 10 changed files with 151 additions and 156 deletions.
2 changes: 1 addition & 1 deletion examples/session.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ while ($true) {


# assumes dcliah.exe is in your path
$activity = (dcliah.exe --member-id $member_id --platform $platform `
$activity = (dcliah.exe --name mesh#3230 `
--mode $mode --moment custom --custom-time $session_start 2>$null) -join "`n"
#note, to view any errors that might occur, remove 2>$null (this will print
#extra output though, or change to 2>err.txt and it will write to a text file)
Expand Down
2 changes: 1 addition & 1 deletion examples/status_notification.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ while ($true) {
}

# assumes dclia is in your path
$activity = (dclia --member-id $member_id --platform $platform) -join "`n"
$activity = (dclia --name mesh#3230) -join "`n"
$skip_notification = (($activity -eq "Not currently in an activity") -or ($activity -eq "Currently sitting in Orbit"))

#dont send notification the first time we run
Expand Down
4 changes: 2 additions & 2 deletions src/dclia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Manifest can be downloaded and synced with from [dclim](https://github.com/mikec


```
$ dclia --member-id 4611686018429783292 --platform xbox
$ dclia --name mesh#3230
```

outputs:
Expand All @@ -74,7 +74,7 @@ Playing Deep Stone Crypt Raid on Castalia Macula, Europa
#### Check for current activity with tab seperated output:

```
$ dclia --member-id 4611686018429783292 --platform xbox --output-format tsv
$ dclia --name mesh#3230 --output-format tsv
```

outputs:
Expand Down
10 changes: 5 additions & 5 deletions src/dcliad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ OPTIONS:
-D, --data-dir <data-dir>
Directory where Destiny 2 manifest and activity database files are stored. (optional)
This will normally be downloaded using the dclim and dclias tools, and uses a system appropriate directory
This will normally be downloaded using the dclim tool, and uses a system appropriate directory
by default.
-m, --member-id <member-id>
Destiny 2 API member id
Expand Down Expand Up @@ -99,25 +99,25 @@ Activity data store can be created and synced seperately using [dclias](https://
#### View details for last activity played

```
$ dcliad --member-id 4611686018429783292 --platform xbox
$ dcliad --name mesh#3230
```

#### View details for last Iron Banner match played on hunter class

```
$ dcliad --member-id 4611686018429783292 --platform xbox --mode iron_banner --class hunter
$ dcliad --name mesh#3230 --mode iron_banner --class hunter
```

#### View details for last activity played displaying extended details

```
$ dcliad --member-id 4611686018429783292 --platform xbox --details
$ dcliad --name mesh#3230 --details
```

#### View details for a specific activity via its index (retrieved from dcliah)

```
$ dcliad --member-id 4611686018429783292 --platform xbox --activity-index 7329
$ dcliad --name mesh#3230 --activity-index 7329
```

## Questions, Feature Requests, Feedback
Expand Down
2 changes: 1 addition & 1 deletion src/dcliad/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ struct Opt {

/// Directory where Destiny 2 manifest and activity database files are stored. (optional)
///
/// This will normally be downloaded using the dclim and dclias tools, and uses
/// This will normally be downloaded using the dclim tool, and uses
/// a system appropriate directory by default.
#[structopt(short = "D", long = "data-dir", parse(from_os_str))]
data_dir: Option<PathBuf>,
Expand Down
42 changes: 20 additions & 22 deletions src/dcliah/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Command line tool for viewing Destiny 2 Crucible activity history and stats.

The application will display individual game results and stats, aggregate game results and stats, as well as individual weapon stats. You can specify specific crucible game modes, as well as time periods to create custom reports. Private and non-private stats are seperated from each other.
The application will display individual game results and stats, aggregate game results and stats, as well as individual weapon and medal stats. You can specify specific crucible game modes, as well as time periods to create custom reports. Private and non-private stats are seperated from each other.

dcliah pulls its data from the local Destiny 2 activity database store. By default, dcliah will create and update this file with the latest activity data, but it can also be seperately managed using [dclias](https://github.com/mikechambers/dcli/tree/main/src/dclias).

Expand All @@ -19,7 +19,7 @@ The tool expects that the manifest has been downloaded and synced using [dclim](
## USAGE
```
USAGE:
dcliah [FLAGS] [OPTIONS] --member-id <member-id> --platform <platform>
dcliah [FLAGS] [OPTIONS] --name <name>
FLAGS:
-h, --help
Expand Down Expand Up @@ -58,8 +58,7 @@ OPTIONS:
-D, --data-dir <data-dir>
Directory where Destiny 2 manifest and activity database files are stored. (optional)
This will normally be downloaded using the dclim and dclias tools, and uses a system appropriate directory
by default.
This will normally be downloaded using the dclim tool, and uses a system appropriate directory by default.
-e, --end-custom-time <end-custom-time>
Custom end time in RFC 3339 date / time format
Expand All @@ -86,10 +85,9 @@ OPTIONS:
time argument.
For example: --moment custom --end-custom-time 2020-12-08T17:00:00.774187+00:00 [default: now]
-m, --member-id <member-id>
Destiny 2 API member id
This is not the user name, but the member id retrieved from the Destiny API.
-m, --medal-count <medal-count>
The number of medals to display details for. Gold medals will be listed first [default: 5]
-M, --mode <mode>
Activity mode to return stats for
Expand All @@ -116,24 +114,24 @@ OPTIONS:
argument.
For example: --moment custom --custom-time 2020-12-08T17:00:00.774187+00:00 [default: week]
-p, --platform <platform>
Platform for specified id
-n, --name <name>
Bungie name for player
Valid values are: xbox, playstation, stadia or steam.
Name must be in the format of NAME#CODE. Example: foo#3280 You can find your name in game, or on Bungie's
site at: https://www.bungie.net/7/en/User/Account/IdentitySettings
-w, --weapon-count <weapon-count>
The number of weapons to display details for [default: 5]
-W, --weapon-sort <weapon-sort>
Specify weapon stats sort order
Valid values include name, kills (default), games, kills_per_game_kills, wins_percent,
precision_total, precision_percent, type [default: kills]
Valid values include name, kills (default), games, kills_per_game_kills, precision_total, precision_percent,
type, wins_percent [default: kills]
```


| ARGUMENT | OPTIONS |
|---|---|
| --platform | xbox, playstation, stadia, steam |
| --mode | all_pvp (default), control, clash, elimination, mayhem, iron_banner, all_private, rumble, pvp_competitive, quickplay and trials_of_osiris, crimsom_doubles, supremacy, survival, countdown, all_doubles, doubles private_clash, private_control, private_survival, private_rumble, showdown, lockdown, scorched, scorched_team, breakthrough, clash_quickplay, trials_of_the_nine |
| --moment | daily (last daily reset), weekend (last weekend reset on Friday), weekly (last weekly reset on Tuesday), day (last day), week (last week), month (last month), all_time, custom, launch, curse_of_osiris, warmind, season_of_the_outlaw, season_of_the_forge, season_of_the_drifter, season_of_opulence, season_of_the_undying, season_of_dawn, season_of_the_worthy, season_of_arrivals, season_of_the_hunt, season_of_the_chosen, season_of_the_splicer |
| --end-moment | daily (last daily reset), weekend (last weekend reset on Friday), weekly (last weekly reset on Tuesday), day (last day), week (last week), month (last month), all_time, custom, launch, curse_of_osiris, warmind, season_of_the_outlaw, season_of_the_forge, season_of_the_drifter, season_of_opulence, season_of_the_undying, season_of_dawn, season_of_the_worthy, season_of_arrivals, season_of_the_hunt, season_of_the_chosen, season_of_the_splicer, season_of_the_lost |
Expand All @@ -143,50 +141,50 @@ Manifest can be downloaded and synced with from [dclim](https://github.com/mikec

Activity data store can be created and synced seperately using [dclias](https://github.com/mikechambers/dcli/tree/main/src/dclias).

**NOTE** : Currently, due to a [bug](https://github.com/Bungie-net/api/issues/1386) in the Destiny 2 API, you will only get results for private matches when specifying *all_private*. The other options are still included in case the bug is fixed. If viewing private match stats is important to you, please leave a comment [here](https://github.com/mikechambers/dcli/issues/10).
**NOTE** : Currently, due to a [bug](https://github.com/Bungie-net/api/issues/1386) in the Destiny 2 API, you will only get results for private matches when specifying *all_private*. The other options are still included in case the bug is fixed.

### Examples

#### Retrieve all activities for past month for the most recently played character

```
$ dcliah --member-id 4611686018429783292 --platform xbox --moment month
$ dcliah --name mesh#3230 --moment month
```

#### Retrieve all Trials of Osiris stats for the Titan since the weekend reset

```
$ dcliah --member-id 4611686018429783292 --platform xbox --moment weekend --class titan --mode trials_of_osiris
$ dcliah --name mesh#3230 --moment weekend --class titan --mode trials_of_osiris
```

#### Retrieve all stats for Season of Arrivals

```
$ dcliah --member-id 4611686018429783292 --platform xbox --moment season_of_arrivals --end-moment season_of_the_hunt
$ dcliah --name mesh#3230 --moment season_of_arrivals --end-moment season_of_the_hunt
```

#### Retrieve all stats for all time for all characters

```
$ dcliah --member-id 4611686018429783292 --platform xbox --moment all_time --class all
$ dcliah --name mesh#3230 --moment all_time --class all
```

#### Use dclitime to track all stats from a specific time (on unix based systems)

```
$ export SESSION_START=$(dclitime)
$ dcliah --member-id 4611686018429783292 --platform xbox --moment custom --custom-time $SESSION_START
$ dcliah --name mesh#3230 --moment custom --custom-time $SESSION_START
```

#### View all time stats for Hand Canons
```
& dcliah --member-id $MEMBER_ID --platform $PLATFORM --mode all_pvp --moment all_time --weapon-count 10000 | grep "Hand Cannon"
& dcliah --name mesh#3230 --mode all_pvp --moment all_time --weapon-count 10000 | grep "Hand Cannon"
```

or in Windows Powershell

```
& dcliah.exe --member-id $env:MEMBER_ID --platform $env:PLATFORM --mode all_pvp --moment all_time --weapon-count 10000 | Select-String "Hand Cannon"
& dcliah.exe --name mesh#3230 --mode all_pvp --moment all_time --weapon-count 10000 | Select-String "Hand Cannon"
```

## Questions, Feature Requests, Feedback
Expand Down
Loading

0 comments on commit 6ddf669

Please sign in to comment.