diff --git a/LICENSE.md b/LICENSE.md index 1ca04fb..a209023 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Mike Chambers +Copyright (c) 2021 Mike Chambers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/RELEASE.md b/RELEASE.md index c94bee9..17962d3 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,5 +1,10 @@ # dcli Release Notes +## v0.3.2 : January 1, 2021 + +* Fixed wrong version numbers in some apps +* Update Copyright year + ## v0.3.1 : December 30, 2020 * Updated tests to run with latest release diff --git a/src/Cargo.lock b/src/Cargo.lock index a5d4418..f67bb53 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -378,7 +378,7 @@ dependencies = [ [[package]] name = "dclia" -version = "0.3.0" +version = "0.3.2" dependencies = [ "dcli", "structopt", @@ -387,7 +387,7 @@ dependencies = [ [[package]] name = "dcliah" -version = "0.1.0" +version = "0.3.2" dependencies = [ "chrono", "dcli", @@ -397,7 +397,7 @@ dependencies = [ [[package]] name = "dclias" -version = "0.3.0" +version = "0.3.2" dependencies = [ "dcli", "structopt", @@ -406,7 +406,7 @@ dependencies = [ [[package]] name = "dclic" -version = "0.3.0" +version = "0.3.2" dependencies = [ "dcli", "structopt", @@ -415,7 +415,7 @@ dependencies = [ [[package]] name = "dclics" -version = "0.3.0" +version = "0.3.2" dependencies = [ "chrono", "dcli", @@ -425,7 +425,7 @@ dependencies = [ [[package]] name = "dclim" -version = "0.3.0" +version = "0.3.2" dependencies = [ "dcli", "reqwest", @@ -439,7 +439,7 @@ dependencies = [ [[package]] name = "dclims" -version = "0.3.0" +version = "0.3.2" dependencies = [ "dcli", "structopt", @@ -448,7 +448,7 @@ dependencies = [ [[package]] name = "dclis" -version = "0.3.0" +version = "0.3.2" dependencies = [ "dcli", "percent-encoding", @@ -462,7 +462,7 @@ dependencies = [ [[package]] name = "dclitime" -version = "0.3.0" +version = "0.3.2" dependencies = [ "chrono", "dcli", diff --git a/src/dcli/src/activitystoreinterface.rs b/src/dcli/src/activitystoreinterface.rs index 9e166b6..2936056 100644 --- a/src/dcli/src/activitystoreinterface.rs +++ b/src/dcli/src/activitystoreinterface.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/apiclient.rs b/src/dcli/src/apiclient.rs index 7aca9ba..93dba97 100644 --- a/src/dcli/src/apiclient.rs +++ b/src/dcli/src/apiclient.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/apiinterface.rs b/src/dcli/src/apiinterface.rs index 84fb4cf..49d84a1 100644 --- a/src/dcli/src/apiinterface.rs +++ b/src/dcli/src/apiinterface.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -30,16 +30,13 @@ use crate::apiutils::{API_BASE_URL, PGCR_BASE_URL}; use crate::enums::mode::Mode; use crate::enums::platform::Platform; use crate::error::Error; -use crate::response::activities::{ - ActivitiesResponse, Activity, MAX_ACTIVITIES_REQUEST_COUNT, -}; +use crate::response::activities::{ActivitiesResponse, Activity, MAX_ACTIVITIES_REQUEST_COUNT}; use crate::response::character::CharacterData; use crate::response::drs::API_RESPONSE_STATUS_SUCCESS; use crate::response::gpr::{CharacterActivitiesData, GetProfileResponse}; use crate::response::pgcr::{DestinyPostGameCarnageReportData, PGCRResponse}; use crate::response::stats::{ - AllTimePvPStatsResponse, DailyPvPStatsResponse, DailyPvPStatsValuesData, - PvpStatsData, + AllTimePvPStatsResponse, DailyPvPStatsResponse, DailyPvPStatsValuesData, PvpStatsData, }; use crate::utils::Period; @@ -137,9 +134,7 @@ impl ApiInterface { Some(e) => e, None => { return Err(Error::ApiRequest { - description: String::from( - "No response data from API Call.", - ), + description: String::from("No response data from API Call."), }) } }; @@ -286,14 +281,7 @@ impl ApiInterface { // so assume we are out of data. (maybe compare to whether we have found any items). // This would mean we might miss legitimate API errors though. let activities = self - .retrieve_activities( - member_id, - character_id, - platform, - mode, - count, - page, - ) + .retrieve_activities(member_id, character_id, platform, mode, count, page) .await?; if activities.is_none() { @@ -362,14 +350,7 @@ impl ApiInterface { // so assume we are out of data. (maybe compare to whether we have found any items). // This would mean we might miss legitimate API errors though. let activities = self - .retrieve_activities( - member_id, - character_id, - platform, - mode, - count, - page, - ) + .retrieve_activities(member_id, character_id, platform, mode, count, page) .await?; if activities.is_none() { @@ -455,9 +436,7 @@ impl ApiInterface { return Ok(None); } else { return Err(Error::ApiRequest { - description: String::from( - "No response data from API Call.", - ), + description: String::from("No response data from API Call."), }); } } @@ -480,8 +459,7 @@ impl ApiInterface { instance_id = instance_id, ); - let response: PGCRResponse = - self.client.call_and_parse::(&url).await?; + let response: PGCRResponse = self.client.call_and_parse::(&url).await?; let data: DestinyPostGameCarnageReportData = match response.response { Some(e) => e, @@ -490,9 +468,7 @@ impl ApiInterface { return Ok(None); } else { return Err(Error::ApiRequest { - description: String::from( - "No response data from API Call.", - ), + description: String::from("No response data from API Call."), }); } } diff --git a/src/dcli/src/apiutils.rs b/src/dcli/src/apiutils.rs index f227c19..763d0ba 100644 --- a/src/dcli/src/apiutils.rs +++ b/src/dcli/src/apiutils.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/character.rs b/src/dcli/src/character.rs index b331aec..1f8869f 100644 --- a/src/dcli/src/character.rs +++ b/src/dcli/src/character.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/crucible.rs b/src/dcli/src/crucible.rs index f0a049e..f895d54 100644 --- a/src/dcli/src/crucible.rs +++ b/src/dcli/src/crucible.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/cruciblestats.rs b/src/dcli/src/cruciblestats.rs index 1c09c61..90dfb59 100644 --- a/src/dcli/src/cruciblestats.rs +++ b/src/dcli/src/cruciblestats.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -23,8 +23,7 @@ use std::ops; use crate::utils::{ - calculate_efficiency, calculate_kills_deaths_assists, - calculate_kills_deaths_ratio, + calculate_efficiency, calculate_kills_deaths_assists, calculate_kills_deaths_ratio, }; #[derive(Default, Debug)] @@ -59,9 +58,7 @@ impl ops::Add for CrucibleStats { //but we will keep it here for completeness sake and in case the API is //ever updated let best_single_game_kills: Option; - if _cs.best_single_game_kills.is_none() - || self.best_single_game_kills.is_none() - { + if _cs.best_single_game_kills.is_none() || self.best_single_game_kills.is_none() { if _cs.best_single_game_kills.is_none() { best_single_game_kills = self.best_single_game_kills; } else { @@ -75,8 +72,7 @@ impl ops::Add for CrucibleStats { } let kills = self.kills + _cs.kills; - let total_kill_distance = - self.total_kill_distance + _cs.total_kill_distance; + let total_kill_distance = self.total_kill_distance + _cs.total_kill_distance; let assists = self.assists + _cs.assists; let deaths = self.deaths + _cs.deaths; @@ -89,8 +85,7 @@ impl ops::Add for CrucibleStats { //todo : add activities_lost CrucibleStats { - activities_entered: self.activities_entered - + _cs.activities_entered, + activities_entered: self.activities_entered + _cs.activities_entered, activities_won: self.activities_won + _cs.activities_won, activities_lost: self.activities_lost + _cs.activities_lost, assists, @@ -101,17 +96,9 @@ impl ops::Add for CrucibleStats { deaths, average_lifespan, total_lifespan, - opponents_defeated: self.opponents_defeated - + _cs.opponents_defeated, - efficiency: calculate_efficiency( - kills as u32, - deaths as u32, - assists as u32, - ), - kills_deaths_ratio: calculate_kills_deaths_ratio( - kills as u32, - deaths as u32, - ), + opponents_defeated: self.opponents_defeated + _cs.opponents_defeated, + efficiency: calculate_efficiency(kills as u32, deaths as u32, assists as u32), + kills_deaths_ratio: calculate_kills_deaths_ratio(kills as u32, deaths as u32), kills_deaths_assists: calculate_kills_deaths_assists( kills as u32, deaths as u32, diff --git a/src/dcli/src/emblem.rs b/src/dcli/src/emblem.rs index 13c84d5..13c9671 100644 --- a/src/dcli/src/emblem.rs +++ b/src/dcli/src/emblem.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/enums/character.rs b/src/dcli/src/enums/character.rs index 773d368..61f353e 100644 --- a/src/dcli/src/enums/character.rs +++ b/src/dcli/src/enums/character.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/enums/itemtype.rs b/src/dcli/src/enums/itemtype.rs index 29b1bfa..22c5abe 100644 --- a/src/dcli/src/enums/itemtype.rs +++ b/src/dcli/src/enums/itemtype.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/enums/medaltier.rs b/src/dcli/src/enums/medaltier.rs index eb33647..9a7503c 100644 --- a/src/dcli/src/enums/medaltier.rs +++ b/src/dcli/src/enums/medaltier.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/enums/mod.rs b/src/dcli/src/enums/mod.rs index 0bbd1e9..56a06a2 100644 --- a/src/dcli/src/enums/mod.rs +++ b/src/dcli/src/enums/mod.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/enums/mode.rs b/src/dcli/src/enums/mode.rs index bd1d193..d4f50c2 100644 --- a/src/dcli/src/enums/mode.rs +++ b/src/dcli/src/enums/mode.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/enums/moment.rs b/src/dcli/src/enums/moment.rs index 2d3128f..303bbef 100644 --- a/src/dcli/src/enums/moment.rs +++ b/src/dcli/src/enums/moment.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/enums/platform.rs b/src/dcli/src/enums/platform.rs index 2cda841..9ad39f5 100644 --- a/src/dcli/src/enums/platform.rs +++ b/src/dcli/src/enums/platform.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/enums/standing.rs b/src/dcli/src/enums/standing.rs index 9e6b0bb..60de627 100644 --- a/src/dcli/src/enums/standing.rs +++ b/src/dcli/src/enums/standing.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/error.rs b/src/dcli/src/error.rs index 127e7ef..8121361 100644 --- a/src/dcli/src/error.rs +++ b/src/dcli/src/error.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/lib.rs b/src/dcli/src/lib.rs index b0d10f2..1fb59fc 100644 --- a/src/dcli/src/lib.rs +++ b/src/dcli/src/lib.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/manifest/mod.rs b/src/dcli/src/manifest/mod.rs index 987efc5..443a70e 100644 --- a/src/dcli/src/manifest/mod.rs +++ b/src/dcli/src/manifest/mod.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/manifestinterface.rs b/src/dcli/src/manifestinterface.rs index b21ffcb..b1f7a41 100644 --- a/src/dcli/src/manifestinterface.rs +++ b/src/dcli/src/manifestinterface.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/output.rs b/src/dcli/src/output.rs index 72c2fb3..1f5da26 100644 --- a/src/dcli/src/output.rs +++ b/src/dcli/src/output.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/response/character.rs b/src/dcli/src/response/character.rs index 8cce971..337abb0 100644 --- a/src/dcli/src/response/character.rs +++ b/src/dcli/src/response/character.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/response/drs.rs b/src/dcli/src/response/drs.rs index 2dfeba4..3eeef28 100644 --- a/src/dcli/src/response/drs.rs +++ b/src/dcli/src/response/drs.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/response/gpr.rs b/src/dcli/src/response/gpr.rs index 72ee217..a438a7e 100644 --- a/src/dcli/src/response/gpr.rs +++ b/src/dcli/src/response/gpr.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/response/manifest.rs b/src/dcli/src/response/manifest.rs index df38c02..9e559b0 100644 --- a/src/dcli/src/response/manifest.rs +++ b/src/dcli/src/response/manifest.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/response/mod.rs b/src/dcli/src/response/mod.rs index bceed1b..afdac20 100644 --- a/src/dcli/src/response/mod.rs +++ b/src/dcli/src/response/mod.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/response/pgcr.rs b/src/dcli/src/response/pgcr.rs index 0722119..64cdeab 100644 --- a/src/dcli/src/response/pgcr.rs +++ b/src/dcli/src/response/pgcr.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/response/stats.rs b/src/dcli/src/response/stats.rs index 5c50b10..8e7db64 100644 --- a/src/dcli/src/response/stats.rs +++ b/src/dcli/src/response/stats.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/response/utils.rs b/src/dcli/src/response/utils.rs index 1dcf6ae..ae2b871 100644 --- a/src/dcli/src/response/utils.rs +++ b/src/dcli/src/response/utils.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/statscontainer.rs b/src/dcli/src/statscontainer.rs index 375f2e9..3fa24dd 100644 --- a/src/dcli/src/statscontainer.rs +++ b/src/dcli/src/statscontainer.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dcli/src/utils.rs b/src/dcli/src/utils.rs index e1f0941..68a93ec 100644 --- a/src/dcli/src/utils.rs +++ b/src/dcli/src/utils.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dclia/Cargo.toml b/src/dclia/Cargo.toml index 4fd944f..7665493 100644 --- a/src/dclia/Cargo.toml +++ b/src/dclia/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "dclia" -version = "0.3.0" +#version +version = "0.3.2" authors = ["Mike Chambers "] description = "Command line tool for retrieving information on current activity for specified player character." homepage = "https://www.mikechambers.com" diff --git a/src/dclia/src/main.rs b/src/dclia/src/main.rs index a145dd0..3d417ea 100644 --- a/src/dclia/src/main.rs +++ b/src/dclia/src/main.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -85,11 +85,7 @@ struct Opt { /// /// tsv outputs in a tab (\t) seperated format of name / value pairs with lines /// ending in a new line character (\n). - #[structopt( - short = "O", - long = "output-format", - default_value = "default" - )] + #[structopt(short = "O", long = "output-format", default_value = "default")] output: Output, } @@ -219,9 +215,7 @@ async fn main() { //lets find out the mode / activity type name print_verbose("Determining activity mode", opt.verbose); - let activity_type_name: String = match activity_data_a - .current_activity_mode_type - { + let activity_type_name: String = match activity_data_a.current_activity_mode_type { // if its set in the API data, we use that // this is due to this bug: // https://github.com/Bungie-net/api/issues/1341 @@ -239,18 +233,13 @@ async fn main() { ); //otherwise, we go into the manifest to find it match manifest - .get_activity_type_definition( - activity_data_m.activity_type_hash, - ) + .get_activity_type_definition(activity_data_m.activity_type_hash) .await { Ok(e) => e.display_properties.name, Err(e) => { print_verbose( - &format!( - "Activity Mode not found in Manifest : {:?}", - e - ), + &format!("Activity Mode not found in Manifest : {:?}", e), opt.verbose, ); //Todo: this either means an error, unknown activity, or they are in orbit diff --git a/src/dcliah/Cargo.toml b/src/dcliah/Cargo.toml index 11b3854..0f8be83 100644 --- a/src/dcliah/Cargo.toml +++ b/src/dcliah/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "dcliah" -version = "0.1.0" +#version +version = "0.3.2" authors = ["Mike Chambers "] edition = "2018" description = "Command line tool for viewing Destiny 2 activity history." diff --git a/src/dcliah/src/main.rs b/src/dcliah/src/main.rs index f999993..678d4e4 100644 --- a/src/dcliah/src/main.rs +++ b/src/dcliah/src/main.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -38,9 +38,7 @@ use dcli::enums::character::CharacterClassSelection; use dcli::activitystoreinterface::ActivityStoreInterface; -use dcli::utils::{ - determine_data_dir, format_f32, repeat_str, uppercase_first_char, -}; +use dcli::utils::{determine_data_dir, format_f32, repeat_str, uppercase_first_char}; //use dcli::utils::EXIT_FAILURE; use dcli::utils::EXIT_FAILURE; use dcli::utils::{print_error, print_verbose}; @@ -314,8 +312,7 @@ fn print_default( println!("{}", wep_header_str); println!("{}", wep_divider); - let max_weps = - std::cmp::min(*weapon_count as usize, extended.weapons.len()); + let max_weps = std::cmp::min(*weapon_count as usize, extended.weapons.len()); for w in &extended.weapons[..max_weps] { println!( @@ -486,31 +483,25 @@ async fn main() { _ => opt.moment.get_date_time(), }; - let mut store = - match ActivityStoreInterface::init_with_path(&data_dir, opt.verbose) - .await - { - Ok(e) => e, - Err(e) => { - print_error( - "Could not initialize activity store. Have you run dclias?", - e, - ); - std::process::exit(EXIT_FAILURE); - } - }; - - let mut manifest = match ManifestInterface::new(&data_dir, false).await { + let mut store = match ActivityStoreInterface::init_with_path(&data_dir, opt.verbose).await { Ok(e) => e, Err(e) => { print_error( - "Could not initialize manifest. Have you run dclim?", + "Could not initialize activity store. Have you run dclias?", e, ); std::process::exit(EXIT_FAILURE); } }; + let mut manifest = match ManifestInterface::new(&data_dir, false).await { + Ok(e) => e, + Err(e) => { + print_error("Could not initialize manifest. Have you run dclim?", e); + std::process::exit(EXIT_FAILURE); + } + }; + if !opt.no_sync { match store.sync(&opt.member_id, &opt.platform).await { Ok(_e) => (), diff --git a/src/dclias/Cargo.toml b/src/dclias/Cargo.toml index ba91cbf..e5fbefe 100644 --- a/src/dclias/Cargo.toml +++ b/src/dclias/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "dclias" -version = "0.3.0" +#version +version = "0.3.2" authors = ["Mike Chambers "] edition = "2018" description = "Command line tool for downloading and syncing Destiny 2 Crucible activity history." diff --git a/src/dclias/src/main.rs b/src/dclias/src/main.rs index 53eb407..b9f0196 100644 --- a/src/dclias/src/main.rs +++ b/src/dclias/src/main.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dclic/Cargo.toml b/src/dclic/Cargo.toml index 3a215c7..1c2a246 100644 --- a/src/dclic/Cargo.toml +++ b/src/dclic/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "dclic" -version = "0.3.0" +#version +version = "0.3.2" authors = ["Mike Chambers "] edition = "2018" description = "Command line tool for retrieving Destiny 2 character information for specified member id." diff --git a/src/dclic/src/main.rs b/src/dclic/src/main.rs index e294e6d..f92328d 100644 --- a/src/dclic/src/main.rs +++ b/src/dclic/src/main.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dclics/Cargo.toml b/src/dclics/Cargo.toml index 6516c1b..b21f788 100644 --- a/src/dclics/Cargo.toml +++ b/src/dclics/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "dclics" -version = "0.3.0" +#version +version = "0.3.2" authors = ["Mike Chambers "] description = "Command line tool for retrieving current Destiny 2 Crucible activity stats." homepage = "https://www.mikechambers.com" diff --git a/src/dclics/src/main.rs b/src/dclics/src/main.rs index 9e6f51e..fdaf6f4 100644 --- a/src/dclics/src/main.rs +++ b/src/dclics/src/main.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dclim/Cargo.toml b/src/dclim/Cargo.toml index 433d62f..a7e1aca 100644 --- a/src/dclim/Cargo.toml +++ b/src/dclim/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "dclim" -version = "0.3.0" +#version +version = "0.3.2" authors = ["Mike Chambers "] edition = "2018" description = "Command line tool for managing and syncing the remote Destiny 2 API manifest database." diff --git a/src/dclim/src/main.rs b/src/dclim/src/main.rs index 40bb857..aeac5e5 100644 --- a/src/dclim/src/main.rs +++ b/src/dclim/src/main.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dclim/src/manifest_info.rs b/src/dclim/src/manifest_info.rs index 5abe3c3..b4ea6ac 100644 --- a/src/dclim/src/manifest_info.rs +++ b/src/dclim/src/manifest_info.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dclims/Cargo.toml b/src/dclims/Cargo.toml index 719c2cf..e94265c 100644 --- a/src/dclims/Cargo.toml +++ b/src/dclims/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "dclims" -version = "0.3.0" +#version +version = "0.3.2" authors = ["Mike Chambers "] edition = "2018" description = "Command line tool for searching the Destiny 2 manifest by hash ids." diff --git a/src/dclims/src/main.rs b/src/dclims/src/main.rs index f11443d..04dccd5 100644 --- a/src/dclims/src/main.rs +++ b/src/dclims/src/main.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -26,8 +26,7 @@ use dcli::error::Error; use dcli::manifestinterface::{FindResult, ManifestInterface}; use dcli::output::Output; use dcli::utils::{ - determine_data_dir, print_error, print_verbose, EXIT_FAILURE, TSV_DELIM, - TSV_EOL, + determine_data_dir, print_error, print_verbose, EXIT_FAILURE, TSV_DELIM, TSV_EOL, }; use structopt::StructOpt; @@ -69,11 +68,7 @@ struct Opt { /// /// tsv outputs in a tab (\t) seperated format of columns with lines /// ending in a new line character (\n). - #[structopt( - short = "O", - long = "output-format", - default_value = "default" - )] + #[structopt(short = "O", long = "output-format", default_value = "default")] output: Output, ///Print out additional information @@ -107,14 +102,13 @@ async fn main() { } }; - let results: Vec = - match search_manifest_by_hash(opt.hash, data_dir).await { - Ok(e) => e, - Err(e) => { - print_error("Error searching manifest.", e); - std::process::exit(EXIT_FAILURE); - } - }; + let results: Vec = match search_manifest_by_hash(opt.hash, data_dir).await { + Ok(e) => e, + Err(e) => { + print_error("Error searching manifest.", e); + std::process::exit(EXIT_FAILURE); + } + }; match opt.output { Output::Default => { @@ -147,8 +141,7 @@ fn print_default(results: Vec) { .description .as_ref() .unwrap_or(&default); - let icon_path = - r.display_properties.icon_path.as_ref().unwrap_or(&default); + let icon_path = r.display_properties.icon_path.as_ref().unwrap_or(&default); println!( "{:<0col_w$}{}", @@ -181,8 +174,7 @@ fn print_tsv(results: Vec) { .description .as_ref() .unwrap_or(&default); - let icon_path = - r.display_properties.icon_path.as_ref().unwrap_or(&default); + let icon_path = r.display_properties.icon_path.as_ref().unwrap_or(&default); print!( "{i}{delim}{n}{delim}{d}{delim}{hi}{delim}{ip}{eol}", diff --git a/src/dclis/Cargo.toml b/src/dclis/Cargo.toml index c687263..c9576d6 100644 --- a/src/dclis/Cargo.toml +++ b/src/dclis/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "dclis" -version = "0.3.0" +#version +version = "0.3.2" authors = ["Mike Chambers "] edition = "2018" description = "Command line tool for retrieving primary Destiny 2 member ids." diff --git a/src/dclis/src/main.rs b/src/dclis/src/main.rs index 188e229..586a175 100644 --- a/src/dclis/src/main.rs +++ b/src/dclis/src/main.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dclis/src/memberidsearch.rs b/src/dclis/src/memberidsearch.rs index 6a40e1b..57da329 100644 --- a/src/dclis/src/memberidsearch.rs +++ b/src/dclis/src/memberidsearch.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dclitime/Cargo.toml b/src/dclitime/Cargo.toml index d7467ba..2cc6210 100644 --- a/src/dclitime/Cargo.toml +++ b/src/dclitime/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "dclitime" -version = "0.3.0" +#version +version = "0.3.2" authors = ["Mike Chambers "] edition = "2018" description = "Command line tool for retrieving Destiny 2 related date / time stamps" diff --git a/src/dclitime/src/datetimeformat.rs b/src/dclitime/src/datetimeformat.rs index f2da188..66661b8 100644 --- a/src/dclitime/src/datetimeformat.rs +++ b/src/dclitime/src/datetimeformat.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/src/dclitime/src/main.rs b/src/dclitime/src/main.rs index 3a99ca1..5cb67c9 100644 --- a/src/dclitime/src/main.rs +++ b/src/dclitime/src/main.rs @@ -1,5 +1,5 @@ /* -* Copyright 2020 Mike Chambers +* Copyright 2021 Mike Chambers * https://github.com/mikechambers/dcli * * Permission is hereby granted, free of charge, to any person obtaining a copy of