SodaTracker is a Stella Sora pull history tracker that uses OCR to convert screenshots into a searchable JSON database.
You can say: "Kinda make things difficult application to track your gacha pull history on Stella Sora Game."
at least for now.
- Feature 1: Automatic screenshot cropping to make your files ready to ocread.
- Feature 2: Convert your cropped image to json string.
- Feature 3: Be Creative Myself. Go find yourself a method to serve your fresh json pull string.
To get this project running locally, follow these steps:
-
Clone the repository:
git clone [https://github.com/Retoi-II/SodaTracker.git](https://github.com/Retoi-II/SodaTracker.git)
-
Install Python (if you haven't or you don't know how to host the data you captured)
For reference, i am using 3.12.0 version, so it's 3.12.0++ version :)
-
Install Package Manager
I'd prefer chocolatey as my package manager, you can use whatever you have and perform the installation with equivalent command.
-
Install Magick and Tesseract-OCR
choco install imagemagick -y choco install tesseract-ocr -y
-
Collect the dependency in requirements.txt and library
py -m pip install -r requirements.txt py -m pip install pillow py -m pip install flask py -m pip install pytesseract
Flask is just a lightweight web server, it's just one of the countless framework to serve json data as table or other method, stick with this if you don't know what to do anyway.
-
How do you actually collect your pulls history
- Make sure you only make batch screenshot on one type of banner, don't mix multiple banner tipe in one batch.
- Start your screenshot from the first page as starting point up to last page as end point, you can choose whatever range you want or even starting point itself.
- To make things easier make sure you have snipping tools (if you are using windows) which will saves your screenshot automatically.
- Make sure your game on 1280x720 windowed instance.
- Press Win+Shift+S > choose "Window Mode" > point Stella Sora instance as capture area.
- Do it repeatedly until the point you wish.
- Copy all the captured image to .\preprocess\ocr\screenshots
- Execute the crop.bat
- Open the .preprocess\ocr\screenshot\cropped folder and move all the cropped to above directory, replace the uncropped images.
- Navigate to .preprocess\ocr directory and run the python file
py read_gacha_to_json.py - Check the folder and you will find gacha_history.json
- It doesn't give you "ItemType" and "Star/Rarity" line yet. You can ask AI to do that, find the prompt on .\preprocess folder.
- Do whatever you want with the collected data, as advise you can just copy and pasting the content to flask template i have shared on the root folder.
- You can customize the content served by edit the index.html on .\template directory
-
Load your captured json with flask app
I said you can use my flask template, but there are countless of possibility. You can use whatever method you know to serve a data yourself. In case you decided to just using my flask template this is the command line.
py -m flask --app flask_template.py run -p 5000
I have plan to extend the feature of this project in the future, but i have no time or just lazy for now. If you interested to develop this application, then feel free to contribute yourself.