# ivnvxd/arc-export architecture

> Architecture diagram of the GitHub repository ivnvxd/arc-export, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ivnvxd/arc-export
- Repository: https://github.com/ivnvxd/arc-export

## Overview

Arc Pinned Tabs to HTML Bookmarks Converter is a command-line script that reads Arc sidebar JSON and produces browser-importable HTML bookmarks. The main workflow is CLI entry point → JSON input → pinned-space and bookmark conversion → HTML serialization → output file. The source excerpt shows the internal calls; the README documents the CLI options and input locations.

Main entry points: [`main.py`](https://github.com/ivnvxd/arc-export/blob/main/main.py) (CLI entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_command["Command line"]
  node_entry["CLI entry<br/>[main.py]"]
  node_version["Version lookup<br/>[main.py]"]
end

subgraph group_conversion["Bookmark conversion"]
  node_space_map["Pinned spaces<br/>[main.py]"]
  node_bookmark_tree["Bookmark tree<br/>[main.py]"]
  node_html_builder["HTML serializer<br/>[main.py]"]
end

subgraph group_files["File input and output"]
  node_reader["JSON reader<br/>[main.py]"]
  node_arc_json["Arc sidebar JSON"]
  node_writer["HTML writer<br/>[main.py]"]
  node_html_file["HTML bookmarks"]
end

node_user(("CLI user"))

node_user -->|"runs"| node_entry
node_entry -->|"reads via"| node_reader
node_reader -->|"loads"| node_arc_json
node_entry -->|"converts via"| node_space_map
node_entry -->|"converts via"| node_bookmark_tree
node_entry -->|"serializes via"| node_html_builder
node_entry -->|"writes via"| node_writer
node_writer -->|"writes"| node_html_file
node_entry -->|"queries when requested"| node_version
node_version -->|"prints metadata"| node_user

click node_entry "https://github.com/ivnvxd/arc-export/blob/main/main.py"
click node_version "https://github.com/ivnvxd/arc-export/blob/main/main.py"
click node_reader "https://github.com/ivnvxd/arc-export/blob/main/main.py"
click node_space_map "https://github.com/ivnvxd/arc-export/blob/main/main.py"
click node_bookmark_tree "https://github.com/ivnvxd/arc-export/blob/main/main.py"
click node_html_builder "https://github.com/ivnvxd/arc-export/blob/main/main.py"
click node_writer "https://github.com/ivnvxd/arc-export/blob/main/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_version,node_user toneBlue
class node_space_map,node_bookmark_tree,node_html_builder toneAmber
class node_reader,node_arc_json,node_writer,node_html_file toneMint
```

## Components

### Command line

- [CLI entry](https://github.com/ivnvxd/arc-export/blob/main/main.py): `main.py`
- [Version lookup](https://github.com/ivnvxd/arc-export/blob/main/main.py): `main.py`

### Bookmark conversion

- [Pinned spaces](https://github.com/ivnvxd/arc-export/blob/main/main.py): `main.py`
- [Bookmark tree](https://github.com/ivnvxd/arc-export/blob/main/main.py): `main.py`
- [HTML serializer](https://github.com/ivnvxd/arc-export/blob/main/main.py): `main.py`

### File input and output

- [JSON reader](https://github.com/ivnvxd/arc-export/blob/main/main.py): `main.py`
- **Arc sidebar JSON**
- [HTML writer](https://github.com/ivnvxd/arc-export/blob/main/main.py): `main.py`
- **HTML bookmarks**

### Other components

- **CLI user**

## Connections

- CLI user → CLI entry: runs (evidence: `README.md`)
- CLI entry → JSON reader: reads via (evidence: `main.py`)
- JSON reader → Arc sidebar JSON: loads (evidence: `main.py`)
- CLI entry → Pinned spaces: converts via (evidence: `main.py`)
- CLI entry → Bookmark tree: converts via (evidence: `main.py`)
- CLI entry → HTML serializer: serializes via (evidence: `main.py`)
- CLI entry → HTML writer: writes via (evidence: `main.py`)
- HTML writer → HTML bookmarks: writes (evidence: `main.py`)
- CLI entry → Version lookup: queries when requested (evidence: `main.py`)
- Version lookup → CLI user: prints metadata (evidence: `main.py`)
