Skip to content
MizaGBFPublic

About

GBF Asset Lookup, an image viewer for Granblue Fantasy

Topics

Resources

Stars

40 stars

Watchers

2 watching

Forks

Repository files navigation

GBF Asset Lookup

pages-build-deployment
Web page to search for Granblue Fantasy assets.
Click Here to access it.

Front-End

The main page:

  • The Asset Lookup, index.html, to search assets.

The bonus pages:

  • The Spark Maker, spark.html, for users to keep track of their "spark".
  • The Character Ranker game, ranker.html, for users to rank characters.
  • The Smash or Pass game, smash.html, for users to rank characters.

Both are using assets and codes from GBFML.

Note

These pages are static and are currently hosted on Github Pages, but it can technically be hosted anywhere.

Three of the JSON files in the json folder are also used:

  • config.json is the first file loaded upon opening the page. It contains various constants, the layout of the index and such.
  • changelog.json is loaded next. It contains the timestamp of the last update and a list of recently updated elements.
  • data.json is loaded along with config.json and contains the asset catalog and more.

Back-End

Others JSON files are used for debug or update purpose:

More JSON files not specified here might appear in this folder, for development or testing purpose.

Folder Structure

The project requires GBFML to be alongside it.
It can also benefit from having GBFAP too.
The folder structure on the server is as such:

Root Folder/
├── GBFAL/
├── GBFML/
└── GBFAP/ (Optional)

If you wish to run a test server with Python for example, uses python -m http.server in the Root Folder.

This script is in charge of updating the JSON files.

Caution

Using it can be time and bandwidth consuming.

Warning

You can optionally find my libcurl-based HTTP2 client here.

Updater Requirements

  • Python 3.13.
  • Run pip install -r requirements.txt in a command prompt.
  • See requirements.txt for a list of third-party modules.

Usage

Run python updater.py -h for the help.

Tip

For an "every day" use case, you'll only need to:
Use -r after game updates.
Use -u for element uncaps or if an older NPC got new arts, with their IDs.
Use -j, -ej and -ij when new MC classes or skins are released, to find and set their datas and export then import json/job_data_export.json.
Use -lk to update the string lookup and import json/manual_lookup.json.
Use -fj to force import of json/manual_fate.json.
Use -it to force import of json/manual_event_thumbnail.json.
Use -mt to check for updates of existing elements (An equivalent is usually automatically run by -r except for buff icons, so it shouldn't be needed. You can just run -mb once in a while for the buffs.).

Pause

You can pause updater.py with a simple CTRL+C. It opens a CLI letting you save, exit, resume or perform other actions with text commands.

Resume file

When you interrupt some tasks (like the ones invoked by -sc and -sd), the updater creates a resume file (a JSON file without the extension) in the same folder.
If you restart the same action at a later time, that file will be loaded and content already processed will be skipped.

Task System

The Updater uses wrappers around Asyncio Tasks to execute code.
Tasks/Functions calls can be queued into the Task Manager. There are 5 queues available, the first one having the highest priority.
The Task Manager itself won't run more than 90 Tasks concurrently (The number itself can be changed in the code). In the same way, the Updater is limited to 80 concurrent requests.
When a Task or the Updater judges more Task are needed, they will be queued too. That's why the number of Tasks will likely grow when executing the Updater.
It's designed to limit the memory usage while keeping the Updater always busy, to not have idle/dead times.

Additional Notes

  • For testing, just run python-m http.server in a terminal, in the parent folder of the project, with GBFML on the side.
  • GBFAP is the sister project, dealing with GBF animations.
  • For developers, I documented some things in this file.

About

GBF Asset Lookup, an image viewer for Granblue Fantasy

Topics

Resources

Stars

40 stars

Watchers

2 watching

Forks

Used by

Contributors

Languages