From 1b4c429c40c6d1a9d4f93b928f161d03b89217d0 Mon Sep 17 00:00:00 2001 From: Jylpah Date: Mon, 26 Oct 2020 16:33:25 +0200 Subject: [PATCH] BattleRecordCategory.get_categories_all() added, fix --extra option categories --- analyze_wotb_replays.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/analyze_wotb_replays.py b/analyze_wotb_replays.py index 0ebc147..8fabcb4 100755 --- a/analyze_wotb_replays.py +++ b/analyze_wotb_replays.py @@ -163,6 +163,11 @@ class BattleRecordCategory(): RESULT_CAT_FRMT = '{:>20s}' + @classmethod + def get_categories_all(cls): + return cls._result_categories.keys() + + @classmethod def get_default_categories(cls): return cls._result_categories_default @@ -873,7 +878,7 @@ async def main(argv): parser.add_argument('-id', dest='account_id', type=int, default=WG_ID, help='WG account_id to analyze') parser.add_argument('-a', '--account', type=str, default=WG_ACCOUNT, help='WG account nameto analyze. Format: ACCOUNT_NAME@SERVER') parser.add_argument('--mode', default=OPT_MODE, choices=OPT_MODES, help='Select stats mode. Options: ' + ', '.join(OPT_MODES[1:])) - parser.add_argument('--extra', choices=BattleRecordCategory.get_extra_categories(), default=None, nargs='*', help='Print extra categories: ' + ', '.join( cat + '=' + BattleRecordCategory._result_categories[cat][0] for cat in BattleRecordCategory.get_extra_categories())) + parser.add_argument('--extra', choices=BattleRecordCategory.get_categories_all(), default=None, nargs='*', help='Print extra categories: ' + ', '.join( cat + '=' + BattleRecordCategory._result_categories[cat][0] for cat in BattleRecordCategory.get_categories_all())) parser.add_argument('--only_extra', action='store_true', default=False, help='Print only the extra categories') parser.add_argument('--hist', action='store_true', default=OPT_HIST, help='Print player histograms: ' + ', '.join( histogram_fields[k][0] for k in histogram_fields)) parser.add_argument('--stat_func', default=OPT_STAT_FUNC, choices=STAT_FUNC.keys(), help='Select how to calculate for ally/enemy performance: tank-tier stats, global player stats')