# nicorenard/symlists_extractor architecture

> Architecture diagram of the GitHub repository nicorenard/symlists_extractor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nicorenard/symlists_extractor
- Repository: https://github.com/nicorenard/symlists_extractor

## Overview

##### 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

## Diagram (Mermaid)

```mermaid
flowchart TD
    User["User/Invoker"]:::user
    User -->|"execute with args"| CLI["symlists_extractor.py\n(args: URL, login, password)"]:::code

    subgraph "Python Environment (venv)"
        Python["Python 3.10+ Interpreter"]:::runtime
        CLI
        Libraries["sympasoap Library"]:::code
    end

    CLI -->|"invoke client methods"| Libraries
    Libraries -->|"SOAP over HTTP"| Service["Sympa SOAP Web Service"]:::service
    Service -->|"SOAP response"| Libraries
    Libraries -->|"parsed data"| CLI
    CLI -->|"write JSON"| Output["Output JSON File"]:::artifact

    Docs["README.md"]:::docs
    License["LICENSE"]:::docs
    Requirements["requirements.txt"]:::docs

    Docs --- User
    License --- User
    Requirements --- Python

    click CLI "https://github.com/nicorenard/symlists_extractor/blob/main/symlists_extractor.py"
    click Requirements "https://github.com/nicorenard/symlists_extractor/blob/main/requirements.txt"
    click Docs "https://github.com/nicorenard/symlists_extractor/blob/main/README.md"
    click License "https://github.com/nicorenard/symlists_extractor/tree/main/LICENSE"

    classDef code fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef service fill:#90EE90,stroke:#000,stroke-width:1px
    classDef artifact fill:#FFD700,stroke:#000,stroke-width:1px
    classDef runtime fill:#D3D3D3,stroke:#000,stroke-width:1px
    classDef user fill:#E0E0E0,stroke:#000,stroke-width:1px
    classDef docs fill:#F0F0F0,stroke:#000,stroke-width:1px
```
