aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas "Cakeisalie5" Touhey <thomas@touhey.fr>2018-10-10 13:24:15 +0200
committerThomas "Cakeisalie5" Touhey <thomas@touhey.fr>2018-10-10 13:24:15 +0200
commit11e40c69748dcfd0fe5b38bfa290cd7d68ac3d33 (patch)
treef69780cd0eef01381741e7146a7801f1f06f6e5b
parent105fd65703f780fbca81d6fd3e0957129b035f8b (diff)
Added units decoding in code comprehension.
-rwxr-xr-xsgdfi/_dbs/_code.py10
-rwxr-xr-xsgdfi/_dbs/_st.py10
2 files changed, 16 insertions, 4 deletions
diff --git a/sgdfi/_dbs/_code.py b/sgdfi/_dbs/_code.py
index 5a9abfb..eb48d46 100755
--- a/sgdfi/_dbs/_code.py
+++ b/sgdfi/_dbs/_code.py
@@ -97,9 +97,15 @@ class Code:
if value[7:9] == '00':
styp = _StructureType.GROUPE
+ elif value[7] == '1':
+ styp = _StructureType.UNITE_8_11_ANS
+ elif value[7] == '2':
+ styp = _StructureType.UNITE_11_14_ANS
+ elif value[7] == '3':
+ styp = _StructureType.UNITE_14_17_ANS
+ elif value[7] == '7':
+ styp = _StructureType.UNITE_6_8_ANS
else:
- # TODO: units and stuff?
-
styp = _StructureType.ASSOCIES_L
elif value[1] in '234567':
# Adherent. X7 is unused for now, but is probably reserved.
diff --git a/sgdfi/_dbs/_st.py b/sgdfi/_dbs/_st.py
index 74e7cc6..bf01e29 100755
--- a/sgdfi/_dbs/_st.py
+++ b/sgdfi/_dbs/_st.py
@@ -35,11 +35,17 @@ class StructureType(_Enum):
""" Centre national. """
CENTRE_NATIONAL = 15
+ """ Unité farfadets. """
+ UNITE_6_8_ANS = 30
+
""" Unité louveteaux-jeanettes. """
- UNITE_8_11_ANS = 30
+ UNITE_8_11_ANS = 31
+
+ """ Unité scouts-guides. """
+ UNITE_11_14_ANS = 32
""" Unité pionniers-caravelles. """
- UNITE_14_17_ANS = 32
+ UNITE_14_17_ANS = 33
_StructureTypeData = {
StructureType.UNITE_8_11_ANS: "Unité 8-11 ans",