A package for generating pokemon showdown replays from pokemon showdown logs
Project description
Pokémon Showdown! Replays
Usage
To create a replay you will need a log file produced by a Pokémon Showdown! server.
Installation
pip install pokemon_showdown_replays
Creating replay.pokemonshowdown.com replays
from pokemon_showdown_replays import Replay, Upload
replay_object = Replay.create_replay_object(log, show_full_damage = False, client_location = "https://play.pokemonshowdown.com)
html = Upload.create_replay(replay_object)
Creating play.pokemonshowdown.com download replays
from pokemon_showdown_replays import Replay, Download
replay_object = Replay.create_replay_object(log, show_full_damage = False, replay_embed_location = "https://play.pokemonshowdown.com/js/replay-embed.js")
html = Download.create_replay(replay_object)
The show_full_damage
parameter is optional and defaults to False
. When it is True
and the log produced by the Pokémon Showdown! server has health shown in
full (ie. 347/550 and not 64/100), the replay will show the exact damage dealt by a move and the exact percentage of health a pokemon has left.
For example:
347 / 550 will be shown as 63.1% hp when it is enabled and 64% hp when it is disabled. It will also be 64/100 in the replay's log.
replay_embed_location
can be used to show pokemon that do not exist on play.pokemonshowdown.com in a replay. This works by using the replay embed from the custom
client in which the pokemon has a sprite, allowing it to be shown in the replay.
client_location
works in the same way but uses the whole client instead of just the replay embed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pokemon_showdown_replays-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7e75703b7f8baeb94604713fce4681aef4aee36011707ff3df682442942bca3 |
|
MD5 | 2119399a2afe3d178c169f2895884204 |
|
BLAKE2b-256 | aeaae0684021a3ada3991bada818e4cabec8a9892019b4ca4e7438d5e7babe8b |
Hashes for pokemon_showdown_replays-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea8273d5bedfebeebafd649305cb6823733ea1a7690ce28032d23317f250a70e |
|
MD5 | 3295f7ca4b4c6652bc9191814b9c854c |
|
BLAKE2b-256 | 7d131c9e8a1eca676e265ce3f9e28d68ef38e92df5a54a8e1ae85ea2eb9fa0ac |