# lolonao/onetab2sqlite3 architecture

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

- Interactive diagram: https://gitdiagram.com/lolonao/onetab2sqlite3
- Repository: https://github.com/lolonao/onetab2sqlite3

## Overview

##### Main Components

a. Input Components:
- OneTab Export File(s) (.txt format)
- Command Line Interface (CLI arguments)

b. Processing Components:
- Main Script (onetab2sqlite3.py)
- Parser Module (for processing OneTab export format)
- Database Handler (SQLite3 operations)

c. Storage Component:
- SQLite3 Database (output)

##### Specific Elements

a. Input Section:
- Multiple OneTab export files (show as stacked rectangles)
- CLI arguments component (show as a rounded rectangle)

b. Processing Section:
- File Reader component
- Parser component
- SQLite3 Writer component

c. Output Section:
- SQLite3 database with tables (show internal structure)

##### Additional Details

Annotations for:
- Supported file formats
- Key CLI parameters (--db and --file)
- Database schema (if known)
- Future functionality (keyword/category search)

## Diagram (Mermaid)

```mermaid
graph TB
    %% Input Section
    subgraph Input
        F1[OneTab Export File 1]:::input
        F2[OneTab Export File 2]:::input
        F3[OneTab Export File n]:::input
        CLI[Command Line Interface]:::input
    end

    %% Processing Section
    subgraph Processing
        MS[Main Script]:::process
        PR[Parser]:::process
        DB[Database Handler]:::process
    end

    %% Output Section
    subgraph Output
        SQ[(SQLite3 Database)]:::output
        subgraph "Future Features"
            KS[Keyword Search]:::future
            CS[Category Search]:::future
        end
    end

    %% Connections
    F1 --> MS
    F2 --> MS
    F3 --> MS
    CLI --> MS
    MS --> PR
    PR --> DB
    DB --> SQ
    SQ --> KS
    SQ --> CS

    %% Click Events
    click MS "https://github.com/lolonao/onetab2sqlite3/blob/main/onetab2sqlite3.py"
    click PR "https://github.com/lolonao/onetab2sqlite3/blob/main/onetab2sqlite3.py"
    click DB "https://github.com/lolonao/onetab2sqlite3/blob/main/onetab2sqlite3.py"
    click CLI "https://github.com/lolonao/onetab2sqlite3/blob/main/onetab2sqlite3.py"

    %% Legend
    subgraph Legend
        L1[Input Component]:::input
        L2[Processing Component]:::process
        L3[(Storage Component)]:::output
        L4[Future Feature]:::future
    end

    %% Styles
    classDef input fill:#a8d1ff,stroke:#333,stroke-width:2px
    classDef process fill:#90EE90,stroke:#333,stroke-width:2px
    classDef output fill:#FFA07A,stroke:#333,stroke-width:2px
    classDef future fill:#E6E6FA,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5
```
