kalkulus avatar

spltools has been deployed as a Streamlit app!

kalkulus

Published: 04 Feb 2025 › Updated: 04 Feb 2025spltools has been deployed as a Streamlit app!

spltools has been deployed as a Streamlit app!

image.png

Following beaker007@beaker007's awesome example, I have launched parts of spltools as a Streamlit app. You can now use some of the functionality in a browser without worrying about the underlying python code at all!

Current functionality:

  • Battle summarizer, with copyable markdown to use in hive posts.
  • Battle log parser.

spltools app

url: https://spltools.streamlit.app/

Over time, I plan to add more functionality to the site!

separator.png

Battle summarizer

The front page of the app contains a single entry field for a battle id:

image.png

Here, you should enter a battle id, which you will find by looking at the url of a Splinterlands battle page:

image.png

You can also enter the full url. This is convenient because you can access it from the Splinterlands frontpage by pressing the share battle button.

After inserting the battle id or url, press Enter or the Run button, and the app will fetch the battle details and produce a summary:

Battle summary example

At the bottom of the page you will find copyable markdown text, that you can directly insert in a hive post:

Markdown text

In the upper right corner of the markdown text block, there is a button to copy the contents:

Copy button

When I paste the copied content into the hive post, it produces the following:

kalkulus vs. sc456
TypeTournament
FormatWild
Mana33
ElementsBlack
RulesUp to Eleven, Shades of Gray, Earthquake
Winnerkalkulus
kalkulus's team:

sc456's team:


separator.png

Battle log parser

Just below the battle id entry field, you will find three tab selectors:

Tab selectors

Tabs two and three contain the battle log in two different formats. The rightmost tab has markdown text for copying into hive posts or other markdown display software:

image.png

The second tab displays the battle log:

Battle log display

As a small note about the battle logs, the two final columns contain the fields Hit chance and RNG (Random Number Generator output). The two work in a Splinterlands battle in the following way: The RNG output must be smaller than the hit chance for a hit to land.

separator.png

Final words

I hope the spltools app will be of interest to you. If you find any bugs or have suggestions, please reach out to me here, or find me in the Splinterlands discord server. Thank you for your attention!

If you are interested in more posts about the spltools python package, you can find the previous ones here:

spltools update posts:

7. spltools functions and classes for battle data
6. spltools setup guide
5. Best brawler code
4. spltools update: Classes for Brawl data
3. spltools update: Reward chest classes
2. spltools update: Checking which set a card belongs to
1. Initial spltools commit


If you have not yet joined Splinterlands please click the referral link below to get started.


Join Splinterlands


Best wishes
@Kalkulus

separator.png

Leave spltools has been deployed as a Streamlit app! to:

Written by

Read more #splinterlands posts


Best Posts From kalkulus

We have not curated any of kalkulus's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From kalkulus