aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas "Cakeisalie5" Touhey <thomas@touhey.fr>2018-10-23 03:26:22 +0200
committerThomas "Cakeisalie5" Touhey <thomas@touhey.fr>2018-10-23 03:26:22 +0200
commita4f7679dcef512e5a80bddab4591894ed85c51dc (patch)
tree7a5b1715d9e6f82beb5475c858367d39ed8ae812
parent5dbce6f9480c8a7d9b115f9b2b7fae97f5f3c4bb (diff)
More docs!
-rw-r--r--Pipfile.lock78
-rw-r--r--docs/intranet/attendees.rst13
-rw-r--r--docs/intranet/functions.rst24
-rw-r--r--docs/intranet/index.rst3
-rw-r--r--docs/intranet/misc.rst12
-rw-r--r--docs/intranet/rallies-list-new.pngbin0 -> 62752 bytes
-rw-r--r--docs/intranet/rallies-register-pay.pngbin0 -> 67974 bytes
-rw-r--r--docs/intranet/rallies-register-validate.pngbin0 -> 14472 bytes
-rw-r--r--docs/intranet/rallies.rst106
-rwxr-xr-xsgdfi/_decode.py13
10 files changed, 195 insertions, 54 deletions
diff --git a/Pipfile.lock b/Pipfile.lock
index 0076810..e5b6e39 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -38,10 +38,10 @@
},
"certifi": {
"hashes": [
- "sha256:376690d6f16d32f9d1fe8932551d80b23e9d393a8578c5633a2ed39a64861638",
- "sha256:456048c7e371c089d0a77a5212fb37a2c2dce1e24146e3b7e0261736aaeaa22a"
+ "sha256:339dc09518b07e2fa7eda5450740925974815557727d6bd35d319c1524a04a4c",
+ "sha256:6d58c986d22b038c8c0df30d639f23a3e6d172a05c3583e766f4c0b785c0986a"
],
- "version": "==2018.8.24"
+ "version": "==2018.10.15"
},
"chardet": {
"hashes": [
@@ -94,37 +94,36 @@
},
"numpy": {
"hashes": [
- "sha256:1b1cf8f7300cf7b11ddb4250b3898c711a6187df05341b5b7153db23ffe5d498",
- "sha256:27a0d018f608a3fe34ac5e2b876f4c23c47e38295c47dd0775cc294cd2614bc1",
- "sha256:3fde172e28c899580d32dc21cb6d4a1225d62362f61050b654545c662eac215a",
- "sha256:497d7c86df4f85eb03b7f58a7dd0f8b948b1f582e77629341f624ba301b4d204",
- "sha256:4e28e66cf80c09a628ae680efeb0aa9a066eb4bb7db2a5669024c5b034891576",
- "sha256:58be95faf0ca2d886b5b337e7cba2923e3ad1224b806a91223ea39f1e0c77d03",
- "sha256:5b4dfb6551eaeaf532054e2c6ef4b19c449c2e3a709ebdde6392acb1372ecabc",
- "sha256:63f833a7c622e9082df3cbaf03b4fd92d7e0c11e2f9d87cb57dbf0e84441964b",
- "sha256:71bf3b7ca15b1967bba3a1ef6a8e87286382a8b5e46ac76b42a02fe787c5237d",
- "sha256:733dc5d47e71236263837825b69c975bc08728ae638452b34aeb1d6fa347b780",
- "sha256:82f00a1e2695a0e5b89879aa25ea614530b8ebdca6d49d4834843d498e8a5e92",
- "sha256:866bf72b9c3bfabe4476d866c70ee1714ad3e2f7b7048bb934892335e7b6b1f7",
- "sha256:8aeac8b08f4b8c52129518efcd93706bb6d506ccd17830b67d18d0227cf32d9e",
- "sha256:8d2cfb0aef7ec8759736cce26946efa084cdf49797712333539ef7d135e0295e",
- "sha256:981224224bbf44d95278eb37996162e8beb6f144d2719b144e86dfe2fce6c510",
- "sha256:981daff58fa3985a26daa4faa2b726c4e7a1d45178100125c0e1fdaf2ac64978",
- "sha256:9ad36dbfdbb0cba90a08e7343fadf86f43cf6d87450e8d2b5d71d7c7202907e4",
- "sha256:a251570bb3cb04f1627f23c234ad09af0e54fc8194e026cf46178f2e5748d647",
- "sha256:b5ff7dae352fd9e1edddad1348698e9fea14064460a7e39121ef9526745802e6",
- "sha256:c898f9cca806102fcacb6309899743aa39efb2ad2a302f4c319f54db9f05cd84",
- "sha256:cf4b970042ce148ad8dce4369c02a4078b382dadf20067ce2629c239d76460d1",
- "sha256:d1569013e8cc8f37e9769d19effdd85e404c976cd0ca28a94e3ddc026c216ae8",
- "sha256:dca261e85fe0d34b2c242ecb31c9ab693509af2cf955d9caf01ee3ef3669abd0",
- "sha256:ec8bf53ef7c92c99340972519adbe122e82c81d5b87cbd955c74ba8a8cd2a4ad",
- "sha256:f2e55726a9ee2e8129d6ce6abb466304868051bcc7a09d652b3b07cd86e801a2",
- "sha256:f4dee74f2626c783a3804df9191e9008946a104d5a284e52427a53ff576423cb",
- "sha256:f592fd7fe1f20b5041928cce1330937eca62f9058cb41e69c2c2d83cffc0d1e3",
- "sha256:ffab5b80bba8c86251291b8ce2e6c99a61446459d4c6637f5d5cc8c9ce37c972"
+ "sha256:032df9b6571c5f1d41ea6f6a189223208cb488990373aa686aca55570fcccb42",
+ "sha256:094f8a83e5bd0a44a7557fa24a46db6ba7d5299c389ddbc9e0e18722f567fb63",
+ "sha256:1c0c80e74759fa4942298044274f2c11b08c86230b25b8b819e55e644f5ff2b6",
+ "sha256:2aa0910eaeb603b1a5598193cc3bc8eacf1baf6c95cbc3955eb8e15fa380c133",
+ "sha256:2f5ebc7a04885c7d69e5daa05208faef4db7f1ae6a99f4d36962df8cd54cdc76",
+ "sha256:32a07241cb624e104b88b08dea2851bf4ec5d65a1f599d7735041ced7171fd7a",
+ "sha256:3c7959f750b54b445f14962a3ddc41b9eadbab00b86da55fbb1967b2b79aad10",
+ "sha256:3d8f9273c763a139a99e65c2a3c10f1109df30bedae7f011b10d95c538364704",
+ "sha256:63bca71691339d2d6f8a7c970821f2b12098a53afccc0190d4e1555e75e5223a",
+ "sha256:7ae9c3baff3b989859c88e0168ad10902118595b996bf781eaf011bb72428798",
+ "sha256:866a7c8774ccc7d603667fad95456b4cf56d79a2bb5a7648ac9f0082e0b9416e",
+ "sha256:8bc4b92a273659e44ca3f3a2f8786cfa39d8302223bcfe7df794429c63d5f5a1",
+ "sha256:919f65e0732195474897b1cafefb4d4e7c2bb8174a725e506b62e9096e4df28d",
+ "sha256:9d1598573d310104acb90377f0a8c2319f737084689f5eb18012becaf345cda5",
+ "sha256:9fff90c88bfaad2901be50453d5cd7897a826c1d901f0654ee1d73ab3a48cd18",
+ "sha256:a245464ddf6d90e2d6287e9cef6bcfda2a99467fdcf1b677b99cd0b6c7b43de2",
+ "sha256:a988db28f54e104a01e8573ceb6f28202b4c15635b1450b2e3b2b822c6564f9b",
+ "sha256:b12fe6f31babb9477aa0f9692730654b3ee0e71f33b4568170dfafd439caf0a2",
+ "sha256:b7599ff4acd23f5de983e3aec772153b1043e131487a5c6ad0f94b41a828877a",
+ "sha256:c9f4dafd6065c4c782be84cd67ceeb9b1d4380af60a7af32be10ebecd723385e",
+ "sha256:ce3622b73ccd844ba301c1aea65d36cf9d8331e7c25c16b1725d0f14db99aaf4",
+ "sha256:d0f36a24cf8061a2c03e151be3418146717505b9b4ec17502fa3bbdb04ec1431",
+ "sha256:d263f8f14f2da0c079c0297e829e550d8f2c4e0ffef215506bd1d0ddd2bff3de",
+ "sha256:d8837ff272800668aabdfe70b966631914b0d6513aed4fc1b1428446f771834d",
+ "sha256:ef694fe72a3995aa778a5095bda946e0d31f7efabd5e8063ad8c6238ab7d3f78",
+ "sha256:f1fd1a6f40a501ba4035f5ed2c1f4faa68245d1407bf97d2ee401e4f23d1720b",
+ "sha256:fa337b6bd5fe2b8c4e705f4102186feb9985de9bb8536d32d5129a658f1789e0",
+ "sha256:febd31cd0d2fd2509ca2ec53cb339f8bf593c1bd245b9fc55c1917a68532a0af"
],
- "markers": "python_version != '3.1.*' and python_version != '3.0.*' and python_version >= '2.7' and python_version != '3.2.*' and python_version != '3.3.*'",
- "version": "==1.15.2"
+ "version": "==1.15.3"
},
"pandas": {
"hashes": [
@@ -187,10 +186,10 @@
},
"requests": {
"hashes": [
- "sha256:63b52e3c866428a224f97cab011de738c36aec0185aa91cfacd418b5d58911d1",
- "sha256:ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a"
+ "sha256:99dcfdaaeb17caf6e526f32b6a7b780461512ab3f1d992187801694cba42770c",
+ "sha256:a84b8c9ab6239b578f22d1c21d51b696dcfe004032bb80ea832398d6909d7279"
],
- "version": "==2.19.1"
+ "version": "==2.20.0"
},
"six": {
"hashes": [
@@ -201,11 +200,10 @@
},
"urllib3": {
"hashes": [
- "sha256:a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf",
- "sha256:b5725a0bd4ba422ab0e66e89e030c806576753ea3ee08554382c14e685d117b5"
+ "sha256:41c3db2fc01e5b907288010dec72f9d0a74e37d6994e6eb56849f59fea2265ae",
+ "sha256:8819bba37a02d143296a4d032373c4dd4aca11f6d4c9973335ca75f9c8475f59"
],
- "markers": "python_version != '3.1.*' and python_version != '3.3.*' and python_version >= '2.6' and python_version < '4' and python_version != '3.2.*' and python_version != '3.0.*'",
- "version": "==1.23"
+ "version": "==1.24"
}
},
"develop": {}
diff --git a/docs/intranet/attendees.rst b/docs/intranet/attendees.rst
new file mode 100644
index 0000000..4311f63
--- /dev/null
+++ b/docs/intranet/attendees.rst
@@ -0,0 +1,13 @@
+Attendance register
+===================
+
+For most events where there are underage children, the leaders have to fill in
+an attendance register on the intranet. This is a legal obligation, and helps
+the territory, which touches helps from french governmental organization such
+as the PSCAF, to know how to redistribute this help amongst groups.
+
+Paths
+-----
+
+``/ActivitesAnnee/EditerRegistrePresence.aspx``
+ A form to modify the attendee register.
diff --git a/docs/intranet/functions.rst b/docs/intranet/functions.rst
new file mode 100644
index 0000000..e54e54e
--- /dev/null
+++ b/docs/intranet/functions.rst
@@ -0,0 +1,24 @@
+Functions
+=========
+
+The types of interactions a person can have with SGDF's intranet is determined
+through their function. Any person has one or more delegations, which is made
+of a function and the structure to which their function applies.
+
+A delegation has a start date and an end date: that's represented through
+a nomination. The process of nomination depends on the function, for most
+functions people are nominated by the scale master (the group delegate,
+territory delegate or general delegate), and some others are co-nominated
+by representants of the upper and lower scale.
+
+Paths
+-----
+
+``/nominations/DemandeNomination.aspx``
+ A form to request for nomination.
+
+``/WebServices/AutoComplete.asmx/GetFonctions``
+ An XML document containing function data for autocompleting.
+
+ Takes a ``q`` GET parameter which can be empty (e.g. ``?q=``) to get
+ all functions.
diff --git a/docs/intranet/index.rst b/docs/intranet/index.rst
index 513bc4b..b94d7a7 100644
--- a/docs/intranet/index.rst
+++ b/docs/intranet/index.rst
@@ -62,8 +62,11 @@ See these documents for more details:
ids
adherents
structures
+ functions
events
places
+ attendees
+ rallies
operations
misc
diff --git a/docs/intranet/misc.rst b/docs/intranet/misc.rst
index f480222..d5c53ff 100644
--- a/docs/intranet/misc.rst
+++ b/docs/intranet/misc.rst
@@ -38,17 +38,5 @@ Other locations
- for adherents, the first and common names with wildcards at the end.
- for structures, the structure name with wildcards before and after.
-``/ActivitesAnnee/EditerRegistrePresence.aspx``
- A form to modify the attendee register.
-
-``/nominations/DemandeNomination.aspx``
- A form to request for nomination.
-
``/BiensLocauxAssurances/RechercherBien.aspx``
List owned places.
-
-``/WebServices/AutoComplete.asmx/GetFonctions``
- An XML document containing function data for autocompleting.
-
- Takes a ``q`` GET parameter which can be empty (e.g. ``?q=``) to get
- all functions.
diff --git a/docs/intranet/rallies-list-new.png b/docs/intranet/rallies-list-new.png
new file mode 100644
index 0000000..fa023e7
--- /dev/null
+++ b/docs/intranet/rallies-list-new.png
Binary files differ
diff --git a/docs/intranet/rallies-register-pay.png b/docs/intranet/rallies-register-pay.png
new file mode 100644
index 0000000..1d9eb7a
--- /dev/null
+++ b/docs/intranet/rallies-register-pay.png
Binary files differ
diff --git a/docs/intranet/rallies-register-validate.png b/docs/intranet/rallies-register-validate.png
new file mode 100644
index 0000000..bcd57d2
--- /dev/null
+++ b/docs/intranet/rallies-register-validate.png
Binary files differ
diff --git a/docs/intranet/rallies.rst b/docs/intranet/rallies.rst
new file mode 100644
index 0000000..3e1ef37
--- /dev/null
+++ b/docs/intranet/rallies.rst
@@ -0,0 +1,106 @@
+Rallies and rally registrations
+===============================
+
+TODO
+
+Representation
+--------------
+
+- Name.
+- Start date (JJ/MM/AAAA).
+- End date (JJ/MM/AAAA).
+- Organizing structure.
+- Status (open to registrations, …).
+
+And probably other things (transport, price, roles, …).
+
+Paths
+-----
+
+``GET /Rassemblements/TableauDeBordRassemblements.aspx``
+ The main page for listing rallies.
+
+``POST /Rassemblements/TableauDeBordRassemblements.aspx``
+ List of rallies and form to register to a rally. Parameters:
+
+ ``ctl00_MainContent__rechercher__pnlRecherche_CurrentState``
+ If the page is a search, ``true``, otherwise, ``false``.
+
+ ``ctl00_MainContent__rechercher__pnlResultats_CurrentState``
+ If the page is a form for registering to a rally, ``true``,
+ otherwise ``false``. Contains the possible roles for the rally.
+
+ ``ctl00$MainContent$_rechercher$_tbNom``
+ The search text (doesn't seem to yield results).
+
+ ``ctl00$MainContent$_rechercher$_cpDateDebut_textBoxDate``
+ The start date, as ``JJ/MM/AAAA``.
+
+ ``ctl00$MainContent$_rechercher$_cpDateFin_textBoxDate``
+ The end date, as ``JJ/MM/AAAA``.
+
+ ``ctl00$MainContent$_rechercher$_btnPopupStructure$_tbResult``
+ The name of the structure in which to search, e.g.
+ ``1ERE+PIONNIERS+CARAVELLES+YERRES``.
+
+ If an entry is selected:
+
+ ``ctl00$MainContent$_rechercher$_gvResultats$ctlXX$_btnSinscrire.x``,
+ ``ctl00$MainContent$_rechercher$_gvResultats$ctlXX$_btnSinscrire.y``
+ ``x`` is 7 and ``y`` is 5 (other non-zero numeric values are
+ probably fine as well but these values work).
+
+ ``XX`` represents the entry number on two decimal digits starting
+ from ``02``.
+
+ If the registration form is validated:
+
+ ``ctl00$MainContent$_rechercher$_btnInscrire``
+ The ``"Inscrire"`` text. The page redirects to the following page.
+
+``GET /Rassemblements/InscriptionRassemblementV2.aspx``
+ Confirmation for registering to a rally.
+
+ First step : confirm the registration creation. Uses the following GET
+ parameters:
+
+ ``idRassemblement``
+ The rally iid.
+
+ ``individu``
+ The person iid to register.
+
+ ``role``
+ The role iid to register the person as.
+
+ ``structure``
+ The structure iid to register for.
+
+ ``type``
+ iid? (``c0OghYGFpmrX6gBsRjmWvg==``)
+
+ Then ???
+
+ The registration has been created, and we're redirected to the same
+ page for confirming the registration and selected some more options
+ with the following GET parameters:
+
+ ``id``
+ The registration iid.
+
+ ``inscription_cree``
+ ``1`` to signify we're at the second step of the process.
+
+ The registration is confirmed through an AJAX call which also takes
+ a few additional parameters from within the page:
+
+ TODO
+
+ Then we're redirected to the same page for confirming everything we're
+ going to pay. It takes the following GET parameters:
+
+ ``id``
+ The registration iid.
+
+ We confirm through an AJAX call which also takes the following
+ POST arguments?
diff --git a/sgdfi/_decode.py b/sgdfi/_decode.py
index f63eb78..5dd8872 100755
--- a/sgdfi/_decode.py
+++ b/sgdfi/_decode.py
@@ -337,10 +337,19 @@ class Decoder:
except (AssertionError, AttributeError):
raise ValueError(f"Invalid JSON hint: {hint}") from None
- # Then load using the standard json module, and send it to
- # the function.
+ # Then load using the standard json module.
+ # If it is a {'d': '…'} payload, it is a WebService answer and
+ # we should redecode the content pointed by the 'd' key, which
+ # is a string representing a JSON content.
+ # Then send the to the function.
data = _jsonloads(content)
+
+ try:
+ data = _jsonloads(data['d'])
+ except:
+ pass
+
return func(data)
else:
raise ValueError(f"unknown type: {repr(type)}")