From e2c2a56274233c3f5393a10da3c926743982bcce Mon Sep 17 00:00:00 2001
From: Bastien Le Querrec <blq@laquadrature.net>
Date: Thu, 2 Jan 2025 20:04:24 +0100
Subject: [PATCH] =?UTF-8?q?pref02:=20ajout=20de=20la=20pr=C3=A9fecture=20d?=
 =?UTF-8?q?e=20l'Aisne?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .gitlab-ci.yml   |  5 +++++
 Attrap_pref02.py | 12 ++++++++++++
 Makefile         |  4 +++-
 README.md        |  1 +
 cli.py           |  1 +
 5 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 Attrap_pref02.py

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 107df02..c13359e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -104,6 +104,11 @@ test_pref01:
     PREF: "pref01"
   extends: .default_pref
 
+test_pref02:
+  variables:
+    PREF: "pref02"
+  extends: .default_pref
+
 test_pref2b:
   variables:
     PREF: "pref2b"
diff --git a/Attrap_pref02.py b/Attrap_pref02.py
new file mode 100644
index 0000000..b5310db
--- /dev/null
+++ b/Attrap_pref02.py
@@ -0,0 +1,12 @@
+from Attrap_prefdpt import Attrap_prefdpt
+
+
+class Attrap_pref02(Attrap_prefdpt):
+
+    # Config
+    hostname = 'https://www.aisne.gouv.fr'
+    raa_page = f'{hostname}/Publications/Recueil-des-Actes-Administratifs'
+    full_name = 'Aisne'
+    short_code = 'pref02'
+    timezone = 'Europe/Paris'
+    year_regex = 'RAA [Aa]nnée ([0-9]{4})'
diff --git a/Makefile b/Makefile
index d77b803..d67b14c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,10 @@
-make: ppparis pref01 pref2b pref03 pref04 pref05 pref06 pref09 pref10 pref11 pref13 pref25 pref29 pref31 pref33 pref34 pref35 pref38 pref39 pref42 pref44 pref49 pref50 pref59 pref62 pref63 pref64 pref65 pref66 pref69 pref73 pref75 pref80 pref81 pref83 pref87 pref91 pref92 pref93 pref94 pref976 prefidf prefpaca
+make: ppparis pref01 pref02 pref2b pref03 pref04 pref05 pref06 pref09 pref10 pref11 pref13 pref25 pref29 pref31 pref33 pref34 pref35 pref38 pref39 pref42 pref44 pref49 pref50 pref59 pref62 pref63 pref64 pref65 pref66 pref69 pref73 pref75 pref80 pref81 pref83 pref87 pref91 pref92 pref93 pref94 pref976 prefidf prefpaca
 ppparis:
 	bin/python3 cli.py ppparis
 pref01:
 	bin/python3 cli.py pref01
+pref02:
+	bin/python3 cli.py pref02
 pref2b:
 	bin/python3 cli.py pref2b
 pref03:
diff --git a/README.md b/README.md
index 2c4008c..8a01e26 100644
--- a/README.md
+++ b/README.md
@@ -58,6 +58,7 @@ Vous pouvez également activer le safe mode en spécifiant la variable d'environ
 
 - Préfecture de police de Paris (identifiant : `ppparis`)
 - Préfecture de l'Ain (identifiant : `pref01`)
+- Préfecture de l'Aisne (identifiant : `pref02`)
 - Préfecture de Haute-Corse (identifiant : `pref2b`)
 - Préfecture de l'Allier (identifiant : `pref03`)
 - Préfecture des Alpes-de-Haute-Provence (identifiant : `pref04`)
diff --git a/cli.py b/cli.py
index 1cc3167..aec2c89 100755
--- a/cli.py
+++ b/cli.py
@@ -46,6 +46,7 @@ __MASTODON_INSTANCE = os.getenv('MASTODON_INSTANCE')
 available_administrations = [
     'ppparis',
     'pref01',
+    'pref02',
     'pref2b',
     'pref03',
     'pref04',
-- 
GitLab