# gateoverflow/go-pdfs architecture

> Architecture diagram of the GitHub repository gateoverflow/go-pdfs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gateoverflow/go-pdfs
- Repository: https://github.com/gateoverflow/go-pdfs

## Overview

GO-PDFs is an MLCFlow-script repository for generating and distributing PDFs from GATE Overflow HTML. The principal documented workflow starts with HTML retrieval, then PDF generation through the make-go-pdf entry point and make-pdf-from-html, which invokes wkhtmltopdf. Separate scripts add PDF covers, copy PDFs to remote storage, and upload release assets. README capabilities include multiple GATE CSE volumes, Engineering Mathematics, DA, and other exam PDFs. Metadata for several scripts is not sampled, so their orchestration and connections are left unspecified.

Main entry points: [`script/make-pdf-from-html`](https://github.com/gateoverflow/go-pdfs/tree/main/script/make-pdf-from-html) (Render HTML), [`script/add-pdf-cover`](https://github.com/gateoverflow/go-pdfs/tree/main/script/add-pdf-cover) (Add cover), [`script/get-go-html`](https://github.com/gateoverflow/go-pdfs/tree/main/script/get-go-html) (Retrieve HTML), [`script/make-go-pdf`](https://github.com/gateoverflow/go-pdfs/tree/main/script/make-go-pdf) (PDF entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["HTML inputs"]
  node_htmlstore[("HTML source")]
  node_gethtml["Retrieve HTML"]
end

subgraph group_generation["PDF generation"]
  node_makego["PDF entry point"]
  node_makepdf["Render HTML"]
  node_wkhtml["wkhtmltopdf"]
  node_pdf["Generated PDF"]
  node_cover["Add cover"]
  node_pdftk["PDF toolkit"]
  node_formats["PDF variants"]
end

subgraph group_distribution["PDF distribution"]
  node_cloudcopy["Copy PDFs"]
  node_cloudstore[("PDF storage")]
  node_release["Publish release"]
  node_releaseassets[("GitHub releases")]
end

node_operator(("PDF operator"))

node_operator -->|"requests HTML"| node_gethtml
node_gethtml -->|"copies from"| node_htmlstore
node_operator -->|"requests PDF"| node_makego
node_makego -->|"invokes"| node_makepdf
node_makepdf -->|"runs"| node_wkhtml
node_makepdf -->|"generates"| node_pdf
node_operator -.->|"requests cover"| node_cover
node_cover -->|"runs"| node_pdftk
node_cover -->|"combines with"| node_pdf
node_operator -.->|"requests copy"| node_cloudcopy
node_cloudcopy -->|"copies PDF"| node_cloudstore
node_operator -.->|"requests upload"| node_release
node_release -->|"uploads assets"| node_releaseassets
node_operator -->|"selects format"| node_formats

click node_gethtml "https://github.com/gateoverflow/go-pdfs/tree/main/script/get-go-html"
click node_makego "https://github.com/gateoverflow/go-pdfs/tree/main/script/make-go-pdf"
click node_makepdf "https://github.com/gateoverflow/go-pdfs/tree/main/script/make-pdf-from-html"
click node_cover "https://github.com/gateoverflow/go-pdfs/tree/main/script/add-pdf-cover"
click node_cloudcopy "https://github.com/gateoverflow/go-pdfs/tree/main/script/put-go-pdfs"
click node_release "https://github.com/gateoverflow/go-pdfs/tree/main/script/upload-pdf-github-release"
click node_formats "https://github.com/gateoverflow/go-pdfs/tree/main/script/make-go-pdf"

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_htmlstore,node_gethtml toneBlue
class node_makego,node_makepdf,node_wkhtml,node_pdf,node_cover,node_pdftk,node_formats toneAmber
class node_cloudcopy,node_cloudstore,node_release,node_releaseassets toneMint
class node_operator toneIndigo
```

## Components

### HTML inputs

- **HTML source**
- [Retrieve HTML](https://github.com/gateoverflow/go-pdfs/tree/main/script/get-go-html): `script/get-go-html`

### PDF generation

- [PDF entry point](https://github.com/gateoverflow/go-pdfs/tree/main/script/make-go-pdf): `script/make-go-pdf`
- [Render HTML](https://github.com/gateoverflow/go-pdfs/tree/main/script/make-pdf-from-html): `script/make-pdf-from-html`
- **wkhtmltopdf**
- **Generated PDF**
- [Add cover](https://github.com/gateoverflow/go-pdfs/tree/main/script/add-pdf-cover): `script/add-pdf-cover`
- **PDF toolkit**
- [PDF variants](https://github.com/gateoverflow/go-pdfs/tree/main/script/make-go-pdf): `script/make-go-pdf`

### PDF distribution

- [Copy PDFs](https://github.com/gateoverflow/go-pdfs/tree/main/script/put-go-pdfs): `script/put-go-pdfs`
- **PDF storage**
- [Publish release](https://github.com/gateoverflow/go-pdfs/tree/main/script/upload-pdf-github-release): `script/upload-pdf-github-release`
- **GitHub releases**

### Other components

- **PDF operator**

## Connections

- PDF operator → Retrieve HTML: requests HTML
- Retrieve HTML → HTML source: copies from
- PDF operator → PDF entry point: requests PDF
- PDF entry point → Render HTML: invokes
- Render HTML → wkhtmltopdf: runs
- Render HTML → Generated PDF: generates
- PDF operator → Add cover: requests cover
- Add cover → PDF toolkit: runs
- Add cover → Generated PDF: combines with
- PDF operator → Copy PDFs: requests copy
- Copy PDFs → PDF storage: copies PDF
- PDF operator → Publish release: requests upload
- Publish release → GitHub releases: uploads assets
- PDF operator → PDF variants: selects format
