doduda

command module
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2024 License: GPL-3.0 Imports: 26 Imported by: 0

README

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.

load example

The results are saved to ./data.

Map

Make the cryptic data easier to use in apps.

map example

The command assumes that all categories (except images) are already downloaded.

Watchdog

Listen for new Dofus versions and react to their release.

watchdog example

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.

render example

Installation

doduda is a single binary that you can download and run without dependencies. There are precompiled versions for Linux, macOS and Windows.

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.

  1. 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.
  2. 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.
  3. 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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL