From 5e4b7af6dc8271b7b21b993013121afd2a5dad12 Mon Sep 17 00:00:00 2001 From: eberloso Date: Tue, 26 Sep 2023 17:08:11 +0200 Subject: [PATCH] Acavar p0 gas --- gestionatr/cli.py | 20 +++--- gestionatr/output/messages/sw_a5_29.py | 85 ++------------------------ 2 files changed, 14 insertions(+), 91 deletions(-) diff --git a/gestionatr/cli.py b/gestionatr/cli.py index 216930fd..fc191349 100644 --- a/gestionatr/cli.py +++ b/gestionatr/cli.py @@ -3,6 +3,7 @@ import six import sys import click +import re from suds.cache import NoCache from suds.client import Client from suds.transport.https import HttpAuthenticated @@ -127,17 +128,18 @@ def request_atr_29(url, user, password, xml_str=None, params=None): xml_str = xml_str.strip() xml_str = xml_str.replace("'utf-8'", "'UTF-8'") xml_str = xml_str.replace("", "") + xml_str = xml_str.replace("""""", "") + xml_str = xml_str.replace("""""", "") + xml_str = xml_str.replace("<", " - - - - - {xml_str} - - - - -""" - -GAS_ENVELOPE_TEMPLATE_SENSE_NAMESPACE_AL_PAS01 = """ - - - - - - {xml_str} - - - - -""" - GAS_ENVELOPE_TEMPLATE_CHATGPT = """ - - -{xml_str} - - - - -""" - -GAS_ENVELOPE_TEMPLATE_CHATGPT_v2 = """ - - - - - + + {xml_str} - - + + """ @@ -112,37 +65,9 @@ def __init__(self): ENVELOP_GAS_BY_DISTR = { 'altres': { - 'template': GAS_ENVELOPE_TEMPLATE_SENSE_NAMESPACE_AL_PAS01, - 'extra_headers': { - "soapAction": "" - }, - }, - 'reintent': { - 'template': GAS_ENVELOPE_TEMPLATE_AMB_NAMESPACE_AL_PAS, - 'extra_headers': { - "soapAction": "" - }, - }, - 'reintent2': { - 'template': GAS_ENVELOPE_TEMPLATE_CHATGPT, - 'extra_headers': { - "soapAction": "" - }, - }, - 'reintent3': { 'template': GAS_ENVELOPE_TEMPLATE_CHATGPT, - 'extra_headers': { - }, - }, - 'reintent4': { - 'template': GAS_ENVELOPE_TEMPLATE_CHATGPT_v2, 'extra_headers': { "soapAction": "" }, }, - 'reintent5': { - 'template': GAS_ENVELOPE_TEMPLATE_CHATGPT_v2, - 'extra_headers': { - }, - }, }