# 1c7/crash-course-computer-science-chinese architecture

> Architecture diagram of the GitHub repository 1c7/crash-course-computer-science-chinese, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/1c7/crash-course-computer-science-chinese
- Repository: https://github.com/1c7/crash-course-computer-science-chinese

## Overview

This repository primarily publishes Chinese-English subtitles for a 40-episode Crash Course Computer Science series, in a combined file and as per-episode files. Readers use the subtitle archive as the product; the README describes a curriculum moving from computing foundations through programming and systems to networks, security, and AI. Separate Node.js utilities parse ASS subtitle files to produce plain text or episode summaries, using shared cleanup helpers. The README documents the archive and topics; the sampled scripts show the extraction calls. The screenshot script is peripheral to the published subtitle workflow.

Main entry points: [`content/(字幕)全40集中英字幕文本`](https://github.com/1c7/crash-course-computer-science-chinese/tree/master/content/(%E5%AD%97%E5%B9%95)%E5%85%A840%E9%9B%86%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95%E6%96%87%E6%9C%AC) (Episode subtitles), [`content/extract_from_ass_subtitle/3. extract_ass_to_txt.js`](https://github.com/1c7/crash-course-computer-science-chinese/blob/master/content/extract_from_ass_subtitle/3.%20extract_ass_to_txt.js) (Text extractor), [`content/extract_from_ass_subtitle/2. extract_head.js`](https://github.com/1c7/crash-course-computer-science-chinese/blob/master/content/extract_from_ass_subtitle/2.%20extract_head.js) (Summary extractor), [`content/extract_from_ass_subtitle/common.js`](https://github.com/1c7/crash-course-computer-science-chinese/blob/master/content/extract_from_ass_subtitle/common.js) (Text cleanup helpers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_curriculum["Course subtitles"]
  node_combined["Combined subtitles<br/>[&#40;字幕&#41;全40集中英字幕文本.txt]"]
  node_episodes["Episode subtitles"]
  node_foundations["Computing foundations"]
  node_programming["Programming and systems"]
  node_networks["Interfaces and networks"]
  node_future["Security and AI"]
end

subgraph group_tools["Subtitle extraction"]
  node_assinput["ASS subtitle files"]
  node_text_extract["Text extractor"]
  node_head_extract["Summary extractor<br/>[2. extract_head.js]"]
  node_common["Text cleanup helpers<br/>[common.js]"]
  node_plain_output["Plain text output"]
  node_summary_output["Markdown summary"]
end

node_reader(("Subtitle reader"))

node_reader -->|"reads"| node_combined
node_reader -->|"reads"| node_episodes
node_episodes -->|"covers episodes 1–9"| node_foundations
node_episodes -->|"covers episodes 10–23"| node_programming
node_episodes -->|"covers episodes 24–30"| node_networks
node_episodes -->|"covers episodes 31–40"| node_future
node_assinput -->|"provides subtitles"| node_text_extract
node_assinput -->|"provides subtitles"| node_head_extract
node_text_extract -->|"uses cleanup"| node_common
node_head_extract -->|"uses cleanup"| node_common
node_text_extract -->|"writes text"| node_plain_output
node_head_extract -->|"writes summary"| node_summary_output

click node_combined "https://github.com/1c7/crash-course-computer-science-chinese/blob/master/content/(%E5%AD%97%E5%B9%95)%E5%85%A840%E9%9B%86%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95%E6%96%87%E6%9C%AC.txt"
click node_episodes "https://github.com/1c7/crash-course-computer-science-chinese/tree/master/content/(%E5%AD%97%E5%B9%95)%E5%85%A840%E9%9B%86%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95%E6%96%87%E6%9C%AC"
click node_foundations "https://github.com/1c7/crash-course-computer-science-chinese/tree/master/content/(%E5%AD%97%E5%B9%95)%E5%85%A840%E9%9B%86%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95%E6%96%87%E6%9C%AC"
click node_programming "https://github.com/1c7/crash-course-computer-science-chinese/tree/master/content/(%E5%AD%97%E5%B9%95)%E5%85%A840%E9%9B%86%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95%E6%96%87%E6%9C%AC"
click node_networks "https://github.com/1c7/crash-course-computer-science-chinese/tree/master/content/(%E5%AD%97%E5%B9%95)%E5%85%A840%E9%9B%86%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95%E6%96%87%E6%9C%AC"
click node_future "https://github.com/1c7/crash-course-computer-science-chinese/tree/master/content/(%E5%AD%97%E5%B9%95)%E5%85%A840%E9%9B%86%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95%E6%96%87%E6%9C%AC"
click node_text_extract "https://github.com/1c7/crash-course-computer-science-chinese/blob/master/content/extract_from_ass_subtitle/3.%20extract_ass_to_txt.js"
click node_head_extract "https://github.com/1c7/crash-course-computer-science-chinese/blob/master/content/extract_from_ass_subtitle/2.%20extract_head.js"
click node_common "https://github.com/1c7/crash-course-computer-science-chinese/blob/master/content/extract_from_ass_subtitle/common.js"

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_combined,node_episodes,node_foundations,node_programming,node_networks,node_future toneBlue
class node_assinput,node_text_extract,node_head_extract,node_common,node_plain_output,node_summary_output toneAmber
class node_reader toneIndigo
```

## Components

### Course subtitles

- [Combined subtitles](https://github.com/1c7/crash-course-computer-science-chinese/blob/master/content/(%E5%AD%97%E5%B9%95)%E5%85%A840%E9%9B%86%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95%E6%96%87%E6%9C%AC.txt): `content/(字幕)全40集中英字幕文本.txt`
- [Episode subtitles](https://github.com/1c7/crash-course-computer-science-chinese/tree/master/content/(%E5%AD%97%E5%B9%95)%E5%85%A840%E9%9B%86%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95%E6%96%87%E6%9C%AC): `content/(字幕)全40集中英字幕文本`
- [Computing foundations](https://github.com/1c7/crash-course-computer-science-chinese/tree/master/content/(%E5%AD%97%E5%B9%95)%E5%85%A840%E9%9B%86%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95%E6%96%87%E6%9C%AC): `content/(字幕)全40集中英字幕文本`
- [Programming and systems](https://github.com/1c7/crash-course-computer-science-chinese/tree/master/content/(%E5%AD%97%E5%B9%95)%E5%85%A840%E9%9B%86%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95%E6%96%87%E6%9C%AC): `content/(字幕)全40集中英字幕文本`
- [Interfaces and networks](https://github.com/1c7/crash-course-computer-science-chinese/tree/master/content/(%E5%AD%97%E5%B9%95)%E5%85%A840%E9%9B%86%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95%E6%96%87%E6%9C%AC): `content/(字幕)全40集中英字幕文本`
- [Security and AI](https://github.com/1c7/crash-course-computer-science-chinese/tree/master/content/(%E5%AD%97%E5%B9%95)%E5%85%A840%E9%9B%86%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95%E6%96%87%E6%9C%AC): `content/(字幕)全40集中英字幕文本`

### Subtitle extraction

- **ASS subtitle files**
- [Text extractor](https://github.com/1c7/crash-course-computer-science-chinese/blob/master/content/extract_from_ass_subtitle/3.%20extract_ass_to_txt.js): `content/extract_from_ass_subtitle/3. extract_ass_to_txt.js`
- [Summary extractor](https://github.com/1c7/crash-course-computer-science-chinese/blob/master/content/extract_from_ass_subtitle/2.%20extract_head.js): `content/extract_from_ass_subtitle/2. extract_head.js`
- [Text cleanup helpers](https://github.com/1c7/crash-course-computer-science-chinese/blob/master/content/extract_from_ass_subtitle/common.js): `content/extract_from_ass_subtitle/common.js`
- **Plain text output**
- **Markdown summary**

### Other components

- **Subtitle reader**

## Connections

- Subtitle reader → Combined subtitles: reads (evidence: `README.md`)
- Subtitle reader → Episode subtitles: reads (evidence: `README.md`)
- Episode subtitles → Computing foundations: covers episodes 1–9 (evidence: `README.md`)
- Episode subtitles → Programming and systems: covers episodes 10–23 (evidence: `README.md`)
- Episode subtitles → Interfaces and networks: covers episodes 24–30 (evidence: `README.md`)
- Episode subtitles → Security and AI: covers episodes 31–40 (evidence: `README.md`)
- ASS subtitle files → Text extractor: provides subtitles (evidence: `content/extract_from_ass_subtitle/3. extract_ass_to_txt.js`)
- ASS subtitle files → Summary extractor: provides subtitles (evidence: `content/extract_from_ass_subtitle/2. extract_head.js`)
- Text extractor → Text cleanup helpers: uses cleanup (evidence: `content/extract_from_ass_subtitle/3. extract_ass_to_txt.js`)
- Summary extractor → Text cleanup helpers: uses cleanup (evidence: `content/extract_from_ass_subtitle/2. extract_head.js`)
- Text extractor → Plain text output: writes text (evidence: `content/extract_from_ass_subtitle/3. extract_ass_to_txt.js`)
- Summary extractor → Markdown summary: writes summary (evidence: `content/extract_from_ass_subtitle/2. extract_head.js`)
