chore(README.md): update readme

This commit is contained in:
Rim 2025-02-28 01:54:41 -05:00
parent 8f95e49713
commit ae9498a2e7

228
README.md
View File

@ -1,136 +1,134 @@
# Modern Warfare 2019 Detailed Statistic Tracker # Modern Warfare 2019 Advanced Statistics Tracker
Tired of visiting [cod.tracker.gg](https://cod.tracker.gg/modern-warfare) to check your player stats? With this repository, you'll never have to visit that site again. Access comprehensive Call of Duty statistics directly from your command line. No more visiting third-party tracking websites when you can retrieve **every statistic** Call of Duty records in under a minute.
Get every single statistic Call of Duty <u>***tracks***</u> in one place, under a minute! > View example outputs in the `/examples/` directory
> To see an example, look in `/examples/`
## Table of Contents
- [Features](#features)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Using the Latest Release **(Easiest)**](#using-the-latest-release-easiest)
- [Cloning the Repository](#cloning-the-repository)
- [Obtaining your ACT\_SSO\_COOKIE](#obtaining-your-act_sso_cookie)
- [Obtaining Your userInfo.json File](#obtaining-your-userinfojson-file)
- [Command Line Arguments](#command-line-arguments)
- [Command Examples](#command-examples)
- [Sorting](#sorting)
## Features ## 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 - **Complete Statistics Access**: Download detailed player statistics including lifetime stats, match history, and seasonal rewards
- Convert match start times, end times, and duration to human readable formats - **Enhanced Sorting**: Sort statistics more effectively than the in-game Barracks
- [**Sort**](#sorting) your statistics even better than the in-game Barracks does! - **Human-Readable Formats**: Convert timestamps and code names to user-friendly formats
- Split detailed match data into separate files from most recent to least recent for easy viewing - **Detailed Match History**: Split match data into separate files for easier analysis
- Convert all code names for weapons, killstreaks, equipment, etc. to human-readable strings - **Game Information**: Access lists of all maps and game modes in current rotation
## Prerequisites ## Prerequisites
- Call of Duty Account
- Account API security settings set to open
- `Python 3.x` *(optional)* (Tested with Python 3.9.13)
- A Web Browser *(Tested with Chromium)*
- ~~[Curl](https://curl.se/download.html) ***(Installed by default on Windows)***~~
## Installation - Call of Duty account with API security settings set to "Open"
#### Using the Latest Release **(Easiest)** - Web browser (Chromium-based recommended)
- Navigate to the latest release and download `cod_api_tool.exe` - Python 3.x (optional, tested with Python 3.9.13)
- Open a command line of your choise, navigate to the directory using `cd` and follow examples below
```
cd "C:\Users\John\Desktop\detailed-cod-tracker"
cod_api_tool.exe [-h] [-p PLAYER_NAME] [-a] [-sl] [-id] [-m] [-i] [-f] [-e] [-cp] [-ca] [-s] [-c] [-sm] [-csd] [-cmd] [-cff] [-cef] ## Installation Options
```
#### Cloning the Repository ### Option 1: Download the Latest Release (Recommended)
- Download the ZIP archive or clone the repository `git clone https://github.com/Ahrimdon/detailed-cod-tracker.git && cd detailed-cod-tracker`
- Run the setup using the command `python setup.py`.
## Obtaining your ACT_SSO_COOKIE 1. Download `cod_api_tool.exe` from the [latest release](https://github.com/Ahrimdon/detailed-cod-tracker/releases/latest)
- Go to https://www.callofduty.com and login with your account 2. Open a command prompt in the download directory
- Once logged in, press `F12` for your browsers developer tools. Then go to Application --> Storage --> 3. Execute the tool using the syntax below:
Cookies --> https://www.callofduty.com/ --> ACT_SSO_COOKIE
- Enter the value when prompted
## Obtaining Your userInfo.json File
- For some reason, Activision broke the userInfo API URL which in turn, broke the API Wrapper's logic to obtain certain user information. Unfortunately, this also means we also cannot use Curl. Follow the steps below if you wish to obtain General Info, friendFeed, eventFeed, Cod Point Balance, Connected Accounts, and Account Settings.
1. Clone the repository, `git clone https://github.com/Ahrimdon/detailed-cod-tracker.git && cd detailed-cod-tracker`
2. Obtain your [*ACT_SSO_COOKIE*](#obtaining-your-act_sso_cookie)
3. Go to `https://profile.callofduty.com/cod/userInfo/{ACT_SSO_COOKIE}` and copy the contents into `userInfo.json` in the repo's directory
> *Note:* Create the `userInfo.json` file manually
4. In the newly created `userInfo.json`, delete "*userInfo(*" and "*);*" at the beginning and end of the file. Alternatively, you can find and replace using the regular expression inside `sanitize_userInfo_regex.txt`
5. Run `cod_api_tool.py` using the `-a` argument (e.g. `python cod_api_tool.py -p Ahrimdon -a`)
If done correctly, this should return the extra API information.
## Command Line Arguments
```
usage: cod_api_tool.py [-h] [-p PLAYER_NAME] [-a] [-sl] [-id] [-m] [-i] [-f] [-e] [-cp] [-ca] [-s] [-c] [-sm] [-csd] [-cmd] [-cff] [-cef]
Detailed Modern Warfare (2019) Statistics Tool
optional arguments:
-h, --help show this help message and exit
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
-id, --identities Fetch only the logged-in identities data
-m, --maps Fetch only the map list data
-i, --info Fetch only general information
-f, --friendFeed Fetch only your friend feed
-e, --eventFeed Fetch only your event feed
-cp, --cod_points Fetch only your COD Point balance
-ca, --connected_accounts
Fetch only the map list data
-s, --settings Fetch only your account settings
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
-cff, --clean_friend_feed
Clean the friend feed data
-cef, --clean_event_feed
Clean the event feed data
```
## Command Examples
**Gather Player's Lifetime Statistics & 20 Recent Games**
```
cod_api_tool.exe -p Ahrimdon#1234567
```
**Sort, clean, and organize all data**
``` ```
cod_api_tool.exe -c cod_api_tool.exe [arguments]
``` ```
**Split matches into separate files** ### Option 2: Clone the Repository
1. Clone the repository:
``` ```
cod_api_tool.exe -sm git clone https://github.com/Ahrimdon/detailed-cod-tracker.git
cd detailed-cod-tracker
``` ```
**Gather all data** 2. Run the setup script:
``` ```
cod_api_tool.exe -p Ahrimdon#1234567 -a python setup.py
``` ```
> All data is saved to `/stats/` ## Authentication Setup
## Sorting ### Obtaining your ACT_SSO_COOKIE
* Game Modes are sorted by *Time Played* in descending order
* Weapons are sorted by *Kills* in descending order 1. Log in to [Call of Duty](https://www.callofduty.com)
* Field Upgrades are sorted by *Uses* in descending order 2. Open developer tools (F12)
* Lethal and Tactical equipment are sorted by *Uses* in descending order 3. Navigate to: Application → Storage → Cookies → https://www.callofduty.com/
* Lethal and Support Scorestreaks by *Times Awarded* in descending order 4. Copy the value of `ACT_SSO_COOKIE`
* Accolades sorted in descending order 5. Provide this value when prompted by the tool
### Setting up userInfo.json (Required for Advanced Features)
Due to recent API changes, additional steps are required for certain features:
1. Navigate to `https://profile.callofduty.com/cod/userInfo/{ACT_SSO_COOKIE}` (replace with your actual cookie)
2. Copy the entire content
3. Create a file named `userInfo.json` in the tool's directory
4. Paste the content and remove `userInfo(` from the beginning and `);` from the end
- Alternatively, use the regex pattern in `sanitize_userInfo_regex.txt`
5. Run the tool with the `-a` flag to access advanced features
## Command Line Reference
```
usage: cod_api_tool.py [-h] [-tz {GMT,EST,CST,PST}] [-p PLAYER_NAME] [-a]
[-sl] [-id] [-m] [-i] [-f] [-e] [-cp] [-ca] [-s] [-c]
[-sm] [-csd] [-cmd] [-cff] [-cef]
```
### Default Options
| Argument | Description |
|----------|-------------|
| `-h`, `--help` | Show help message and exit |
| `-tz`, `--timezone` | Specify timezone (GMT, EST, CST, PST) |
### Data Fetching Options
| Argument | Description |
|----------|-------------|
| `-p PLAYER_NAME`, `--player_name PLAYER_NAME` | Target player's username (with #1234567) |
| `-a`, `--all_stats` | Fetch all available statistics |
| `-sl`, `--season_loot` | Fetch only seasonal reward data |
| `-id`, `--identities` | Fetch only logged-in identities data |
| `-m`, `--maps` | Fetch only map list data |
| `-i`, `--info` | Fetch only general information |
| `-f`, `--friendFeed` | Fetch only friend feed |
| `-e`, `--eventFeed` | Fetch only event feed |
| `-cp`, `--cod_points` | Fetch only COD Point balance |
| `-ca`, `--connected_accounts` | Fetch only connected accounts data |
| `-s`, `--settings` | Fetch only account settings |
### Data Processing Options
| Argument | Description |
|----------|-------------|
| `-c`, `--clean` | Beautify all data |
| `-sm`, `--split_matches` | Split matches into separate JSON files |
| `-csd`, `--clean_stats_data` | Beautify stats.json data |
| `-cmd`, `--clean_match_data` | Beautify match_info.json data |
| `-cff`, `--clean_friend_feed` | Clean friend feed data |
| `-cef`, `--clean_event_feed` | Clean event feed data |
## Examples
**Basic Usage: Retrieve Player Statistics**
```
cod_api_tool.exe -p YourUsername#1234567
```
**Full Data Collection with Cleaning**
```
cod_api_tool.exe -p YourUsername#1234567 -a -c -sm
```
**Process Existing Data**
```
cod_api_tool.exe -c -sm
```
> All data is saved to the `/stats/` directory
## Advanced Sorting
The tool offers enhanced sorting capabilities:
- Game modes sorted by **Time Played** (descending)
- Weapons sorted by **Kills** (descending)
- Field upgrades sorted by **Uses** (descending)
- Equipment (lethal and tactical) sorted by **Uses** (descending)
- Scorestreaks sorted by **Times Awarded** (descending)
- Accolades sorted in descending order