aboutsummaryrefslogtreecommitdiff

SGDFi : interact with SGDF's (Scouts et Guides de France) intranet

Scouts et Guides de France is a Scouting and Guiding organization based in France, member of the Scoutisme Français. For managing its assets and operations, and providing tools to its members, it provides a digital environment which only provides a human access, so no easy machine access.

SGDFi is a Python 3.x which aims at bringing a machine access to this digital environment, allowing read and write access to what is managed by it, mostly through a given adherent's account by imitating a web browser (web scraping, form completing, ajax simulating, and so on).

For more information about how this works and how to make it work, consult the documentation. (link pending)

Examples

These examples CAN'T be used yet, as they're just projections of what I would like as an interface.

from datetime import datetime
from sgdfi import Manager, ALL

start = datetime(2018, 10, 1)
end = datetime(2018, 10, 20)

mgr = sgdfi.Manager()
mgr.login("<code>", "<password>")
mgr.login("<code2>", "<password>")

print("== Place")
print(mgr.places["<place iid>"])
print()

print("== Events in a structure:")
for event in mgr.events["<structure iid>"][start:end]:
        print(event)
        print()

print("== All accessible events:")
for event in mgr.events[ALL][start:end]:
        print(event)
        print()

print("== Operations on adherent:")
for op in mgr.adherents["<adherent iid>"].operations:
        print(op)
        print()

What is left to do

There are plenty of things to do:

  • use MIME types instead of random types for Manager.feed(), and check what we can send to Manager.feed() instead of text to also manage binary file formats such as XLS.
  • attendance register
  • accidents
  • maybe delegate?
  • translate everything from the SDY project.
  • isolate the database?
  • manage tips on adherents through operations, e.g. only some purple shirts can edit an adherent, or only the treasurer can declare that the adherent has payed their contribution.
  • make manager and session independant so that managers can manage more than one session at a time?
  • make manager public? database? representations?
  • document the interface when stable?