Skip to content
This repository was archived by the owner on Dec 22, 2024. It is now read-only.

Repository files navigation

dofas

A scraper for Dofus Auction house

Warning

Because this project is not following the CGU of the game, I stopped the development. The project is basically empty at the moment.

GitHub release Test status Lint status Coverage status Docs
ruff pre-commit licence

DescriptionInstallUsageContribute
Documentation

Description

dofas stands for Dofus Auction house Scraper.

Install

You can install it locally by first cloning the repository :

git clone https://github.com/astariul/dofas.git
cd dofas
pip install -e .

Usage

First of all, you need to extract some template that matches your screen. Take a screenshot of your game, while the Auction House is opened. Save that screenshot somewhere and run :

dofas template --screenshot screenshot_hdv.png --template hdv_template.png --hdv_name "Hôtel de Vente"

Here, we use the screenshot located at screenshot_hdv.png. This command will run the OCR on the full screen, and extract a template (saved in hdv_template.png) of the name Hôtel de Vente (Auction House in French).

Note

We need this template for fast template matching. When the script is running and taking screenshots in real-time, we can't run the OCR on the full screen, it takes way too long. So instead, we run it once, extract the template we need, and later we will use this template for fast matching.

You need to run this step only once (to generate the template).


Contribute

To contribute, install the package locally, create your own branch, add your code (and tests, and documentation), and open a PR !

Pre-commit hooks

Pre-commit hooks are set to check the code added whenever you commit something.

Note

If you never ran the hooks before, install it with :

pip install -e .[hook]
pre-commit install

Then you can just try to commit your code. If your code does not meet the quality required by linters, it will not be committed. You can just fix your code and try to commit again !

Tip

You can manually run the pre-commit hooks with :

pre-commit run --all-files

Tests

When you contribute, you need to make sure all the unit-tests pass. You should also add tests if necessary !

Note

Install the testing dependencies with :

pip install -e .[test]

You can run the tests with :

pytest

Tests are not included in the pre-commit hooks, because running the tests might be slow, and for the sake of developpers we want the pre-commit hooks to be fast !

Documentation

The documentation should be kept up-to-date. You can visualize the documentation locally by running :

mkdocs serve

Note

Before running this, you need to install the documentation dependencies :

pip install -e .[docs]

About

A scraper for Dofus Auction house

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

Generated from astariul/pytere