diff --git a/README.md b/README.md index f5e7d1f..e544e49 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,14 @@ Currently, because it is rather hard to dig up the dps.report links, as compared to gw2raidar, the script defaults to only uploading successful logs to dps.report. +dps.report supports multiple generators. By default RaidHeros is used, but the site +also supports using EliteInsights. You can configure this by setting a configuration +value + +``` +dps_report_generator: "ei", +``` + ### configure-gw2raidar-token.ps1 This script is provided to ease the generation of the GW2 Raidar API token. It diff --git a/l0g-101086-config.sample.json b/l0g-101086-config.sample.json index b9d12fb..0975efe 100644 --- a/l0g-101086-config.sample.json +++ b/l0g-101086-config.sample.json @@ -15,6 +15,7 @@ "restsharp_path": "%UserProfile%\\Documents\\Guild Wars 2\\addons\\arcdps\\RestSharp.dll", "gw2raidar_token": "", "dps_report_token": "", + "dps_report_generator": "ei", "guilds": [ { "name": "[guild]", diff --git a/l0g-101086.psm1 b/l0g-101086.psm1 index b9acb7d..45ee186 100644 --- a/l0g-101086.psm1 +++ b/l0g-101086.psm1 @@ -217,9 +217,16 @@ $commonConfigurationFields = name="dps_report_token" type=[string] } + @{ + # dps.report allows using alternative generators besides raid heros. This parameter + # is used to configure the generator used by the site, and must match a valid value + # from their API. Currently "rh" means RaidHeros, "ei" means EliteInsights, and + # leaving it blank will use the current default generator. + name="dps_report_generator" + type=[string] + } ) - <# .Description Configuration fields which are valid for a v1 configuration file. Anything diff --git a/upload-logs.ps1 b/upload-logs.ps1 index 8a9b9c0..4931e61 100644 --- a/upload-logs.ps1 +++ b/upload-logs.ps1 @@ -39,6 +39,14 @@ $extra_upload_data = $config.extra_upload_data $gw2raidar_start_map = $config.gw2raidar_start_map $simple_arc_parse = $config.simple_arc_parse_path +# Determine what generator to use +$valid_generators = @( "rh", "ei" ) +$dps_report_generator = $config.dps_report_generator.Trim() +if ($dps_report_generator -and -not $valid_generators.Contains($dps_report_generator)) { + Read-Host -Prompt "The dps.report generator $dps_report_generator is unknown..." + exit +} + # Make sure RestSharp.dll exists if (-not (X-Test-Path $config.restsharp_path)) { Read-Host -Prompt "This script requires RestSharp to be installed. Press enter to exit" @@ -313,6 +321,9 @@ ForEach($f in $files) { # Include the dps.report user token $req.AddParameter("userToken", $dpsreport_token) + # Set the generator if it was configured + $req.AddParameter("generator", $dps_report_generator) + $req.AddFile("file", $f) | Out-Null $resp = $client.Execute($req)