Files
blitz-tools/README.md
T

69 lines
3.8 KiB
Markdown
Raw Normal View History

2018-09-30 20:07:10 +08:00
# blitz-tools
2020-01-22 22:15:28 +02:00
Python scripts to analyze WoT Blitz replays and stats. All the scripts require [Python 3.7](https://www.python.org/downloads/) or higher. I am using 3.8 myself so you may have to change the Python interpreter version in the scripts' first line.
2018-09-30 20:09:33 +08:00
2018-10-02 20:17:51 +08:00
### Replays
2020-04-23 11:02:06 +03:00
* [upload_wotb_replays.py](upload_wotb_replays.py): An asynchronous replay uploader.
2020-07-09 15:31:14 +03:00
* [analyze_wotb_replays.py](analyze_wotb_replays.py): A tool to calculate statistics of a set of replays. **Upload the replays first** with [upload_wotb_replays.py](upload_wotb_replays.py) and then calculate the statistics with analyze_wotb_replays.py based on the resulting **.json** files.
2018-10-02 20:17:51 +08:00
### Tank data
2019-12-25 23:25:33 +02:00
* [get_tankopedia.py](get_tankopedia.py): Get the lastest tankopedia data from wotinspector.com. The script fetches only a limited set of data. You may edit to your needs.
* [extract_tankopedia.py](extract_tankopedia.py): Extract Blitz data directly from the Blitz app files. You need to download the Blitz App APK package and unzip it to a folder. Requires [Python 3.7](https://www.python.org/downloads/) or higher.
2018-10-02 20:17:51 +08:00
### Utils
2018-12-15 02:45:49 +02:00
* [blitzutils.py](blitzutils.py): A utils class for various Blitz related to functions. *Other scripts use this*, so you need to place it to the same folder with the other scripts
2018-10-02 20:17:51 +08:00
### Data
2019-12-25 23:38:35 +02:00
* [tanks.json](tanks.json): Tankopedia in WG JSON format extracted from the Blitz app files with [extract_tankopedia.py]](extractTankopedia.py]). Contains only limited information required by the scripts.
* [maps.json](maps.json): Blitz map names extracted from the Blitz app files with [extract_tankopedia.py]](extract_tankopedia.py]).
2018-10-24 12:35:34 +03:00
2018-12-15 02:43:13 +02:00
### Quick instructions
2020-01-22 22:15:28 +02:00
1. Install [Python 3.8](https://www.python.org/downloads/) on to your computer/laptop
2020-07-08 22:36:53 +03:00
2. Install the required Python modules: motor, aiohttp, aioconsole, aiofiles, aiosqlite, beautifulsoup4, lxml, xmltodict, progress
2020-01-14 21:45:08 +02:00
```
# Remember to run the command with a Python interpreter >= 3.7
2020-07-01 17:59:18 +03:00
python -m pip install motor aiohttp aioconsole aiofiles aiosqlite beautifulsoup4 lxml xmltodict progress
2020-01-14 21:45:08 +02:00
```
2020-07-08 22:36:53 +03:00
3. Download all the files including the [maps.json](maps.json) and [tanks.json](tanks.json) files. A recommened way is to install [GitHub Desktop](https://desktop.github.com/) and clone the repository via _git_. This makes it easy to receive the updates.
2019-01-15 21:54:09 +02:00
2020-07-08 22:36:53 +03:00
4. Upload your replays.
```
2020-07-09 15:31:14 +03:00
# Windows, run directly from Command Prompt or Powershell
2020-07-08 22:36:53 +03:00
# Check the options
python.exe .\upload_wotb_replays.py --help
# Syntax
python.exe .\upload_wotb_replays.py REPLAY_FILE.wotbreplay
# example
python.exe .\upload_wotb_replays.py 20200223_0122__jylpah_T-54_grossberg.wotbreplay
# Linux
./upload_wotb_replays.py --help
```
5. Analyze replays.
```
2020-07-09 15:31:14 +03:00
# Windows, run directly from Command Prompt or Powershell
2020-07-08 22:36:53 +03:00
python.exe .\analyze_wotb_replays.py --help
# Syntax
python.exe .\analyze_wotb_replays.py REPLAY_FILE.wotbreplay.json
# Example
python.exe .\analyze_wotb_replays.py 20200223_0122__jylpah_T-54_grossberg.wotbreplay.json
# Linux
./analyze_wotb_replays.py --help
```
2018-12-15 02:43:13 +02:00
2020-04-28 16:11:43 +03:00
### Blitz releases
[WoT Blitz releases](releases.md): launch dates and key content.
2018-12-15 02:43:13 +02:00
2020-07-09 15:31:14 +03:00
### Other
2020-07-01 17:59:18 +03:00
2020-07-09 15:31:14 +03:00
* Please remember to run the scripts from command line, not from the Python interpreter. On Windows open Command Prompt or Powershell.
2020-07-09 15:34:00 +03:00
* [GitHub Desktop](https://desktop.github.com/) is the recommended way of downloading the scripts you can update the scripts easily via git/GitHub Deskop. To prevent GitHub Desktop from uploading your other files to github.com, you can "ignore" the files by right-clicking a file on GitHub Desktop or by manually editing the _.gitignore_ file.
2020-07-09 15:31:14 +03:00
* Even though the code has an option to use MongoDB, you should not bother with that. The MongoDB support is solely for my own purposes and you do not need MongoDB to run the scripts.
2020-07-01 17:59:18 +03:00
You can reach me via email: [[email protected]](mailto:[email protected]) or [Discord](https://discordapp.com/): Jylpah#4662. Happy tanking and stats analysis!