3 Commits

Author SHA1 Message Date
406b89fea1 Feat: publish tag on Matrix 2023-07-08 09:08:09 +02:00
812d392720 feat: publish to matrix
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-08 09:06:25 +02:00
6b77980e6c Fix 7: change the default FOURNISSEUR 2023-07-07 21:26:00 +02:00
2 changed files with 16 additions and 2 deletions

View File

@@ -22,6 +22,19 @@ steps:
PYPI_TOKEN: PYPI_TOKEN:
from_secret: pypi_token from_secret: pypi_token
- name: Notify on matrix
image: plugins/matrix
environment:
MATRIX_ROOMID:
from_secret: MATRIX_ROOMID
MATRIX_ACCESSTOKEN:
from_secret: MATRIX_ACCESSTOKEN
MATRIX_USERID:
from_secret: MATRIX_USERID
settings:
homeserver: https://matrix.poneyworld.net
template: "Une nouvelle version (${DRONE_TAG}) de pdf-oralia est publiée!"
when: when:
event: event:
include: include:

View File

@@ -17,6 +17,7 @@ DF_TYPES = {
"annee": str, "annee": str,
"lot": str, "lot": str,
} }
DEFAULT_FOURNISSEUR = "ROSIER MODICA MOTTEROZ SA"
def is_it(page_text): def is_it(page_text):
@@ -62,8 +63,8 @@ def extract(table, additionnal_fields: dict = {}):
for k, v in additionnal_fields.items(): for k, v in additionnal_fields.items():
r[k] = v r[k] = v
if "honoraire" in row[RECAPITULATIF_DES_OPERATIONS]: if "honoraire" in row[RECAPITULATIF_DES_OPERATIONS].lower():
r["Fournisseur"] = "IMI GERANCE" r["Fournisseur"] = DEFAULT_FOURNISSEUR
extracted.append(r) extracted.append(r)