Skip to content

Extract highlights from professional Dota 2 matches.

License

Notifications You must be signed in to change notification settings

arch1baald/woodota

Repository files navigation

WooDota

Extract highlights from professional Dota 2 matches.

A few minutes of nostalgia. Click on image to view the video.
Click to play

TODO

  • Update video preview picture (add play icon)
  • Write the final notebook
  • Refactor youtube.py
  • Add youtube to docker-compose or move to another repo
  • Write tests

Quick Start

Environment

Create a .env file and select your os platform. There are two possible choices right now:

  • linux
  • macos
touch .env
echo OS_PLATFORM=macos >> .env

Docker

Run Docker containers.

docker-compose --env-file .env up

Match ID

Each match in Dota 2 has a Match ID. You can find it at the end of Dotabuff links or in the game client.

For example: 6676393091 with Dotabuff: https://dotabuff.com/matches/6676393091.

Notice: Replays of non-professional matches are stored for 2 weeks.

Retrieve URL

To retrieve an URL of the match replay

curl -X GET http://localhost:8000/retrieve/6676393091

Or just follow the link: http://localhost:8000/retrieve/6676393091.

Parse Replay

curl -X GET 'http://localhost:8000/parse?url=http://replay161.valve.net/570/6676393091_316408452.dem.bz2'

The process takes about a minute, depends on the internet connection and compute resources.

Extract Highlights

To extract highlights from the match replay.

curl -X GET http://localhost:8000/getHighlights/6676393091

Or just follow the link: http://localhost:8000/getHighlights/6676393091.

YouTube

Install dependencies

python3 -m virtualenv env
source env/bin/activate
pip install -r requirements.txt

Run Jupyter

jupyter lab

Open notebooks/piterpy.ipynb and follow the instructions.

OLD non-structured docs

Parser repo: https://github.com/arch1baald/clarity-parser

Rebuild API

docker-compose up -d --build --no-deps api

Build and Run Clarity Parser Server

sh scripts/run_clarity.sh

Run Redis and Celery Workers

sh scripts/run_workers.sh

Run Flask API

Open a new terminal window

source env/bin/activate
sh scripts/run_server.sh

Retrieve URLs

Retrieve replay URLs by Tournament ID (Could be found at the end of Dotabuff links). The result will be saved to replays/urls.txt

python scripts/retrieve_match_urls.py --tournament 13256 --limit 15

Parse Matches

Parse match by URL

curl -X GET 'http://localhost:8000/parse?url=http://replay191.valve.net/570/6216665747_89886887.dem.bz2'

Parse first match from urls.txt

curl -X GET -G 'http://localhost:8000/parse' -d url=$(head -n 1 replays/urls.txt)

Parse all matches from urls.txt

python scripts/parse_from_urls.py

About

Extract highlights from professional Dota 2 matches.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published