# electrofenster/font-extractor architecture

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

- Interactive diagram: https://gitdiagram.com/electrofenster/font-extractor
- Repository: https://github.com/electrofenster/font-extractor

## Overview

##### Project type and purpose
- This is an open-source command-line tool (“font-extractor”) written in Python.

##### File structure
- Top-level:
- get.py — the CLI entrypoint
- libaries/ — a Python package with three scraper modules
- README.md, LICENSE
- Patterns:
- External dependency: BeautifulSoup for HTML/CSS parsing

##### README for additional insights
- Dependencies: beautifulsoup4
- Integration: these files are consumed via SASS `@import` and `map-get`

##### Be very detailed
- Shared BeautifulSoup parsing layer as a reusable service

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% User initiates CLI
    User["User"]:::external
    User -->|"runs `python get.py`"| CLI["get.py"]:::python

    %% Core CLI and docs
    subgraph "Core Components"
        CLI
        README["README.md"]:::docs
        LICENSE["LICENSE"]:::docs
    end

    %% Scraper plugin area
    subgraph "Scraper Plugins"
        direction TB
        Init["__init__.py"]:::python
        FA["fontAwesome.py"]:::python
        IO["ionIcons.py"]:::python
        LI["linearIcons.py"]:::python
    end

    %% Parsing layer
    Parser["BeautifulSoup Parser"]:::parser

    %% External icon font sources
    subgraph "External Sources"
        direction TB
        FA_SRC["FontAwesome CDN"]:::external
        IO_SRC["Ionicons CDN"]:::external
        LI_SRC["Linearicons CDN"]:::external
    end

    %% Output directories
    subgraph "Generated SASS Output"
        direction TB
        FA_OUT["icons/fontawesome"]:::output
        IO_OUT["icons/ionicons"]:::output
        LI_OUT["icons/linearicons"]:::output
    end

    %% Flow from CLI to scrapers
    CLI --> Init
    CLI --> FA
    CLI --> IO
    CLI --> LI

    %% Each scraper fetches, parses, writes
    FA -->|"HTTP GET CSS"| FA_SRC
    IO -->|"HTTP GET CSS"| IO_SRC
    LI -->|"HTTP GET CSS"| LI_SRC

    FA -->|"Parse CSS"| Parser
    IO -->|"Parse CSS"| Parser
    LI -->|"Parse CSS"| Parser

    Parser -->|"icon list"| FA
    Parser -->|"icon list"| IO
    Parser -->|"icon list"| LI

    FA -->|"Write .scss map"| FA_OUT
    IO -->|"Write .scss map"| IO_OUT
    LI -->|"Write .scss map"| LI_OUT

    %% Documentation flow
    CLI -->|"shows usage"| README
    CLI -->|"license info"| LICENSE

    %% Click events
    click CLI "https://github.com/electrofenster/font-extractor/blob/master/get.py"
    click FA "https://github.com/electrofenster/font-extractor/blob/master/libaries/fontAwesome.py"
    click IO "https://github.com/electrofenster/font-extractor/blob/master/libaries/ionIcons.py"
    click LI "https://github.com/electrofenster/font-extractor/blob/master/libaries/linearIcons.py"
    click Init "https://github.com/electrofenster/font-extractor/blob/master/libaries/__init__.py"
    click FA_OUT "https://github.com/electrofenster/font-extractor/tree/master/icons/fontawesome"
    click IO_OUT "https://github.com/electrofenster/font-extractor/tree/master/icons/ionicons"
    click LI_OUT "https://github.com/electrofenster/font-extractor/tree/master/icons/linearicons"
    click README "https://github.com/electrofenster/font-extractor/blob/master/README.md"
    click LICENSE "https://github.com/electrofenster/font-extractor/tree/master/LICENSE"

    %% Styles
    classDef python fill:#1f77b4,stroke:#333,color:#fff;
    classDef external fill:#ff7f0e,stroke:#333,color:#fff;
    classDef output fill:#2ca02c,stroke:#333,color:#fff;
    classDef parser fill:#9467bd,stroke:#333,color:#fff;
    classDef docs fill:#8c564b,stroke:#333,color:#fff;
```
