doduda
The Ankama Launcher Terminal Client for Developers.
Download the latest Dofus 2 version from Ankama and convert the interesting parts to a developer friendly format.
doduda && doduda map
Features
See doduda --help
for all parameters.
Load
Download the latest Dofus version.
The results are saved to ./data
.
Map
Make the cryptic data easier to use in apps.
The command assumes that all categories (except images) are already downloaded.
Watchdog
Listen for new Dofus versions and react to their release.
You can use that for getting anything that supports webhooks to react to Dofus version updates. Some ideas are:
Render
Generate pre-rendered, high resolution .png
images from the vector files.
This requires Docker to be installed and running.
Installation
doduda
is a single binary that you can download and run without dependencies. There are precompiled versions for Linux, macOS and Windows.
Precompiled binaries (recommended)
Get the latest doduda
binary from the release page.
Go install (needs Go >= 1.21)
You need to have $GOPATH/bin
in your $PATH
for this to work, so export PATH=$PATH:$(go env GOPATH)/bin
if you haven't already.
go install github.com/dofusdude/doduda@latest
Build from source (needs Go >= 1.21)
git clone https://github.com/dofusdude/doduda
cd doduda
go build
The dofusdude auto-update cycle
This tool is the first step in a pipeline that updates the data on GitHub when a new Dofus version is released.
- Two watchdogs (
doduda listen
) listen for new Dofus versions. One for main and one for beta. When something releases, the watchdog calls the GitHub API to start a workflow that uses doduda
to download and parse the update to check for new elements and item_types. They hold global IDs for the API, so they must be consistent with each update.
- At the end of the
doduda
workflow, it triggers the corresponding data repository to do a release, which then downloads the latest doduda
binary (because it is a different workflow) and runs it to produce the final dataset. The data repository opens a release and uploads the files.
- After a release,
doduapi
needs to know that a new update is available. The data repository workflow calls the update endpoint. The API then fetches the latest version from GitHub, indexes, starts the image upscaler (if necessary) and does a atomic switch of the database when ready.
Known Problems
-
Run doduda
with --headless
in a server environment or automations to avoid "no tty" errors.
-
If you get an error regarding a missing Docker socket when running doduda render
, find out where your docker.sock
is and link it to the missing path or export your path as DOCKER_HOST
environment variable export DOCKER_HOST=unix://<your docker.sock path>
.
Credit
The code in the unpack
directory is a port of the PyDofus project to Go. Thanks to balciseri for the work on PyDofus!
The terminal visualizations are made with vhs.
Many thanks to Ankama for developing and updating Dofus! All data belongs to them. I just make it more accessible for the developer community.