diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3d044d7..ab6a079 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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! diff --git a/flatisfy/filters/duplicates.py b/flatisfy/filters/duplicates.py index 0240c03..971fdc4 100644 --- a/flatisfy/filters/duplicates.py +++ b/flatisfy/filters/duplicates.py @@ -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",