Browse Source

Explain how to enable new Weboob backends in Flatisfy in CONTRIBUTING.md

merge-requests/3/head
Lucas Verney 5 years ago
parent
commit
947f53252a
  1. 11
      CONTRIBUTING.md
  2. 4
      flatisfy/filters/duplicates.py

11
CONTRIBUTING.md

@ -45,5 +45,14 @@ locale. @@ -45,5 +45,14 @@ locale.
WIP commits into a single one, to maintain the invariant of "one feature, one
commit".
Thanks!
## Adding support for a new Weboob backend
To enable a new Weboob `CapHousing` backend in Flatisfy, you should add it to
the list of available backends in
[flatisfy/fetch.py#L69-70](https://git.phyks.me/Phyks/flatisfy/blob/master/flatisfy/fetch.py#L69-70)
and update the list of `BACKEND_PRECEDENCES` for deduplication in
[flatisfy/filters/duplicates.py#L24-31](https://git.phyks.me/Phyks/flatisfy/blob/master/flatisfy/filters/duplicates.py#L24-31).
Thats' all!

4
flatisfy/filters/duplicates.py

@ -20,7 +20,9 @@ from flatisfy import tools @@ -20,7 +20,9 @@ from flatisfy import tools
LOGGER = logging.getLogger(__name__)
# Some backends give more infos than others. Here is the precedence we want to
# use.
# use. First is most important one, last is the one that will always be
# considered as less trustable if two backends have similar info about a
# housing.
BACKENDS_PRECEDENCE = [
"seloger",
"pap",

Loading…
Cancel
Save