diff --git a/README.md b/README.md index 0e65ad5..a9ccd63 100644 --- a/README.md +++ b/README.md @@ -2,43 +2,95 @@ Tired of visiting [cod.tracker.gg](https://cod.tracker.gg/modern-warfare) to check your stats? With this repository, you'll never have to visit that site again. -Get every single statistic Call of Duty tracks in ONE PLACE, in under a minute! +Get every single statistic Call of Duty ***tracks*** in one place, under a minute! -This repository is still a work in progress. +## Table of Contents + - [**Prerequisites**](#prerequisites) + - [**Obtaining your ACT\_SSO\_COOKIE**](#obtaining-your-act_sso_cookie) + - [**Command Line Arguments**](#command-line-arguments) + - [**Examples**](#examples) + - [**Sorting**](#sorting) -Prerequisites -------------- -- `Python 3.x` *(optional)* -- A Web Browser *(Tested with Chromium)* +## Features +- Instantly download detailed statistics for any player, including ***Lifetime Statistics***, ***Match Statistics*** and ***season_loot*** +- Download a list of all maps and game modes in current rotation +- Convert match start times, end times, and duration to human readable formats +- [**Sort**](#sorting) your statistics even better than the in-game Barracks does! +- Split detailed match data into separate files from most recent to least recent for easy viewing +- Convert all code names for weapons, killstreaks, equipment, etc. to human-readable strings + +## Prerequisites - Call of Duty Account - Account API security settings set to open +- `Python 3.x` *(optional)* +- A Web Browser *(Tested with Chromium)* - ~~[Curl](https://curl.se/download.html) ***(Installed by default on Windows)***~~ -Command Line Arguments ------ +## Installation +#### Using the Latest Release **(EASIEST)** +- Navigate to the latest release and download `get_cod_stats.exe` +- Open a command line of your choise, navigate to the directory using `cd` and follow examples below + +#### Cloning the Repository +- Download the ZIP archive or clone the repository `git clone https://github.com/Ahrimdon/detailed-cod-tracker-stats.git && cd detailed-cod-tracker-stats` +- Run the setup using the command `python setup.py`. + +## Obtaining your ACT_SSO_COOKIE +- Go to https://www.callofduty.com and login with your account +- Once logged in, press F12 for your browsers developer tools. Then go to Application --> Storage --> Cookies --> https://www.callof +- Enter the value when prompted + +## Command Line Arguments ``` -usage: get_cod_stats.py [-h] [--replace-data] [--replace-match-data] [--player-name PLAYER_NAME] +usage: get_cod_stats.py [-h] -p PLAYER_NAME [-a] [-sl] [-i] [-m] [-c] [-sm] [-csd] [-cmd] + +Detailed Modern Warfare (2019) Statistics Tool optional arguments: -h, --help show this help message and exit - --replace-data Beautify the data in stats.json - --replace-match-data Beautify the match data in match_info.json - --player-name PLAYER_NAME + +Data Fetching Options: + -p PLAYER_NAME, --player_name PLAYER_NAME Player's username (with #1234567) + -a, --all_stats Fetch all the different types of stats data + -sl, --season_loot Fetch only the season loot data + -i, --identities Fetch only the logged-in identities data + -m, --maps Fetch only the map list data + +Data Cleaning Options: + -c, --clean Beautify all data + -sm, --split_matches Split the matches into separate JSON files within the 'matches' subfolder + -csd, --clean_stats_data + Beautify the data and convert to human-readable strings in stats.json + -cmd, --clean_match_data + Beautify the match data and convert to human-readable strings in match_info.json ``` -Gathering Detailed Stats -------------- -- Go to [Call of Duty's Website](https://www.callofduty.com/) and login with your account -- Once logged in, press `F12` for your browsers developer tools. Then go to `Application --> Storage --> Cookies --> https://www.callofduty.com` and find `ACT_SSO_COOKIE` -- Copy the Value into the into the `COOKIE_VALUE` variable in either `get_stats.bat` or `get_stats.ps1` (This will authenticate you) -- Replace the `PROF` variable with your profile's Activision ID in the following format - `PlayerName%0000000` - * *The `%` replaces the `#` in the usual Activision ID* -- Once stats are downloaded, run `beautify_json.py` to beautify the JSON output and then `beautify_data.py` to sort and replace the JSON keys into a human readable string - > If you don't have Python installed, you can run the executable versions of the scripts `beautify_json.exe` and `beautify_data.exe` +## Command Examples +**Gather Player's Lifetime Statistics & 20 Recent Games** +``` +get_cod_stats.exe -p Ahrimdon#1234567 +``` -Sorting -------------- +**Sort, clean, and organize all data** + +``` +get_cod_stats.exe -c +``` + +**Split matches into separate files** +``` +get_cod_stats.exe -sm +``` + +**Gather all data** +``` +get_cod_stats.exe -p Ahrimdon#1234567 -a +``` +--- +> All data is saved to `/stats/` + +## Sorting * Game Modes are sorted by *Time Played* in descending order * Weapons are sorted by *Kills* in descending order * Field Upgrades are sorted by *Uses* in descending order @@ -46,4 +98,4 @@ Sorting * Lethal and Support Scorestreaks by *Times Awarded* in descending order * Accolades sorted in descending order -> To see an example, look at `example.json` \ No newline at end of file +> To see an example, look in `/examples/` \ No newline at end of file