How nicorenard/symlists_extractor works
Project Type and Purpose
• This is a small, open-source CLI utility written in Python (>=3.10).
• Purpose: connect to a Sympa mailing-list server via its SOAP API, extract all lists that are “subscribed as members” but not “included,” and emit a JSON file summarizing those relationships.
File/Directory Structure
• Top-level files only:
• LICENSE
• README.md
• requirements.txt
• symlists_extractor.py
• No frontend/backend split—just one entry-point script and a dependency list.
Key Components
a. User & Execution Environment
• Developer or cron job invoking python symlists_extractor.py arg1 arg2 arg3
• Virtual environment (venv) housing Python interpreter and dependencies
b. CLI Script (symlists_extractor.py)
• Argument parsing (URL, admin login, password)
• Core logic: invoke the sympasoap client, filter results, build Python dict
• JSON emitter: write output file to local FS
c. sympasoap Library
• Dependency listed in requirements.txt
• Provides generated SOAP client stubs for Sympa WSDL
d. External Service
• Sympa SOAP Web Service endpoint (URL passed in)
• The mailing-list server that responds with lists and subscriptions
e. Output Artifact
• JSON file with structure { list: [ orphaned_sublists… ] }
Relationships & Data Flow
• User → (invokes) → CLI Script
• CLI Script → (calls) → sympasoap Library → (sends SOAP requests over HTTP) → Sympa Server
• Sympa Server → (returns SOAP responses) → sympasoap Library → CLI Script
• CLI Script → (writes) → local JSON file
Architectural Patterns & Principles
• Single-responsibility: one script handles orchestration, one library handles SOAP
• Layered interaction: CLI layer → Application logic layer → Integration (SOAP) layer → External service
• Idempotent CLI: no persistent state besides output file