dsh-hackertube 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +146 -238
- package/README.md +147 -240
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -1,315 +1,223 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
[简体中文](README.md) | English
|
|
4
|
-
|
|
5
|
-
Browse and watch the videos Hacker News has recommended over two decades, without leaving the DeepSeek Harness panel. A high-quality English video library within reach, which makes the harness a richer and more enjoyable place to work.
|
|
6
|
-
|
|
7
|
-

|
|
8
|
-
|
|
9
|
-
The dataset comes from [HackerTube](https://karpathy.bearblog.dev/hacker-tube/) by Andrej Karpathy. The site ships a complete data export, and the author describes its purpose in his post:
|
|
10
|
-
|
|
11
|
-
> Export of the site's data available to give to your agent to easily create your own version.
|
|
1
|
+
<div align="center">
|
|
12
2
|
|
|
13
|
-
|
|
3
|
+
# HackerTube for DeepSeek Harness
|
|
14
4
|
|
|
15
|
-
|
|
5
|
+
**Two Decades of Hacker News Top Technical Videos — Right Inside Your IDE**
|
|
16
6
|
|
|
17
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/dsh-hackertube)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
[](https://github.com/chow651/dsh-hackertube)
|
|
11
|
+
[](package.json)
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
[English](README.en.md) | [简体中文](README.md)
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+
<br />
|
|
22
16
|
|
|
23
|
-
|
|
17
|
+
<p align="center">
|
|
18
|
+
No need to switch back and forth between editor tabs and a browser.<br />
|
|
19
|
+
Browse and watch 6,454 high-impact engineering talks, lectures, and documentaries<br />
|
|
20
|
+
recommended over twenty years on Hacker News, directly in your <b>DeepSeek Harness</b> workspace.<br />
|
|
21
|
+
Featuring full bilingual support, subtitle-aware AI answers, and a native Agent search tool.
|
|
22
|
+
</p>
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+

|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
</div>
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
---
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
## ✨ Key Features
|
|
32
31
|
|
|
33
|
-
**
|
|
32
|
+
- 📺 **Seamless In-Editor Player**: Dedicated local relay avoids third-party embed and referrer restrictions. Watch high-value engineering talks side-by-side with your code without tab-switching.
|
|
33
|
+
- 🤖 **Subtitle-Aware AI Q&A**: Asking "what is this part about?" extracts the exact subtitle window around your current playhead (±3 mins) for grounded, precise technical explanations.
|
|
34
|
+
- 🇨🇳 **Built-in Bilingual Localization**: Ships with 6,454 Chinese titles and 166 taxonomy categories ready on install. Summaries and discussions support both on-demand model translation and machine translation fallback.
|
|
35
|
+
- 🔍 **Native Agent Tool**: Registers `hackertube_search` so your AI agent can query 20 years of HN technical recommendations directly inside coding conversations.
|
|
36
|
+
- 🎯 **Smart Alternative Mirrors**: Automatically identifies quality mirrors and subtitled versions on Chinese platforms (Bilibili) using strict physical duration fingerprints. Shows a direct entry only when found; remains completely silent otherwise.
|
|
37
|
+
- ⚡ **Zero Runtime Dependencies & Vector Recommendations**: Pure native Node.js implementation with 384-dimensional vector centroid recommendations. Fast cold starts and host-side persistence.
|
|
34
38
|
|
|
35
|
-
|
|
36
|
-
|---|---|---|
|
|
37
|
-
| Browse and play | Yes | Yes |
|
|
38
|
-
| Interface language | English | Chinese and English |
|
|
39
|
-
| Chinese titles and categories | No | Complete, active on install |
|
|
40
|
-
| Summary and comment translation | No | On demand, model first |
|
|
41
|
-
| AI Q&A with subtitle context | No | Yes |
|
|
42
|
-
| Share card | No | Yes |
|
|
43
|
-
| Likes and watch history | Browser local | Persisted on the host |
|
|
44
|
-
| Personalized recommendations | No | Yes |
|
|
45
|
-
| Agent search tool | No | Yes |
|
|
46
|
-
| Chinese-platform mirror | No | On demand, only when found |
|
|
39
|
+
---
|
|
47
40
|
|
|
48
|
-
|
|
41
|
+
## 🚀 Quick Start
|
|
49
42
|
|
|
50
|
-
|
|
43
|
+
> **Prerequisite**: A running installation of [DeepSeek Harness](https://github.com/chow651/dsh-hackertube).
|
|
51
44
|
|
|
52
|
-
|
|
45
|
+
### Option 1: Let Your Agent Install It (Recommended)
|
|
53
46
|
|
|
54
|
-
|
|
47
|
+
Simply send this prompt to your agent inside DeepSeek Harness:
|
|
55
48
|
|
|
56
|
-
|
|
57
|
-
|---|---:|---:|
|
|
58
|
-
| Software Engineering & Languages | 11 | 980 |
|
|
59
|
-
| Systems, Networks & Security | 10 | 702 |
|
|
60
|
-
| AI, Machine Learning & Data | 9 | 576 |
|
|
61
|
-
| Mathematics & Theoretical CS | 9 | 360 |
|
|
62
|
-
| Hardware & Electronics | 8 | 582 |
|
|
63
|
-
| Computing History & Culture | 8 | 1026 |
|
|
64
|
-
| Design, Graphics & Visual Media | 9 | 439 |
|
|
65
|
-
| Business, Startups & Economics | 9 | 644 |
|
|
66
|
-
| Politics, History & Society | 9 | 1018 |
|
|
67
|
-
| Physics, Space & Chemistry | 8 | 600 |
|
|
68
|
-
| Life Sciences, Mind & Health | 11 | 598 |
|
|
69
|
-
| Earth, Energy & Environment | 8 | 354 |
|
|
70
|
-
| Engineering, Transport & Making | 12 | 805 |
|
|
71
|
-
| Games & Game Development | 8 | 355 |
|
|
72
|
-
| Arts, Comedy, Music & Film | 12 | 1344 |
|
|
73
|
-
| Ideas, Learning & Language | 9 | 689 |
|
|
74
|
-
|
|
75
|
-
A video can belong to more than one area, so the video counts add up to more than 6,454.
|
|
76
|
-
|
|
77
|
-
## Installation
|
|
78
|
-
|
|
79
|
-
Requires DeepSeek Harness.
|
|
80
|
-
|
|
81
|
-
### Let your agent install it
|
|
82
|
-
|
|
83
|
-
Paste this into a DeepSeek Harness session. The agent installs the plugin, enables it, and checks the result:
|
|
84
|
-
|
|
85
|
-
```
|
|
49
|
+
```text
|
|
86
50
|
Install and enable the HackerTube plugin: plugin_manager install_bundle target=dsh-hackertube.
|
|
87
51
|
If npm fails, use target=github:chow651/dsh-hackertube instead.
|
|
88
52
|
Then confirm dsh-hackertube is enabled in the plugin list and remind me to refresh the page.
|
|
89
53
|
```
|
|
90
54
|
|
|
91
|
-
### Install
|
|
55
|
+
### Option 2: Install via Plugin Manager
|
|
92
56
|
|
|
93
|
-
|
|
57
|
+
Run directly in the DSH terminal:
|
|
94
58
|
|
|
95
|
-
```
|
|
59
|
+
```bash
|
|
96
60
|
plugin_manager install_bundle target=dsh-hackertube
|
|
61
|
+
# Or directly from the GitHub repository:
|
|
62
|
+
# plugin_manager install_bundle target=github:chow651/dsh-hackertube
|
|
97
63
|
```
|
|
98
64
|
|
|
99
|
-
|
|
65
|
+
### Option 3: Manual Package Install
|
|
100
66
|
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Install with npm or pnpm
|
|
106
|
-
|
|
107
|
-
```
|
|
67
|
+
```bash
|
|
68
|
+
# Inside your DSH profile directory
|
|
108
69
|
npm install dsh-hackertube
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
```
|
|
70
|
+
# or
|
|
112
71
|
pnpm add dsh-hackertube
|
|
113
72
|
```
|
|
114
73
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
After installing, enable `dsh-hackertube` in the plugin list and refresh the page. No configuration, no API key, and no data to fetch beforehand.
|
|
118
|
-
|
|
119
|
-
## Features
|
|
120
|
-
|
|
121
|
-

|
|
122
|
-
|
|
123
|
-
The panel holds 6,454 videos across 16 areas and 150 categories, ordered by how strongly Hacker News recommends them. The home grid loads 60 cards at first and appends more as you scroll.
|
|
124
|
-
|
|
125
|
-
The watch page has the player, the Hacker News discussion for that video, and a related rail on the right. The rail has a second pane for AI questions. It hands the model the subtitle lines within three minutes of the current playhead, so you can ask what a particular segment covers.
|
|
74
|
+
Enable `dsh-hackertube` in your plugin list and refresh the workspace. **No API keys or manual database initialization required.**
|
|
126
75
|
|
|
127
|
-
|
|
76
|
+
---
|
|
128
77
|
|
|
129
|
-
|
|
78
|
+
## 🤖 Native Agent Tool Integration
|
|
130
79
|
|
|
131
|
-
|
|
80
|
+
The plugin registers `hackertube_search` with DeepSeek Harness. Your agent can search the library semantically during development workflows:
|
|
132
81
|
|
|
133
|
-
###
|
|
82
|
+
### Example Exchange
|
|
134
83
|
|
|
135
|
-
|
|
136
|
-
|---|---|
|
|
137
|
-
| `/` | Focus the search field |
|
|
138
|
-
| `j` `k` | Move between cards |
|
|
139
|
-
| `Enter` | Open the focused card |
|
|
140
|
-
| `l` | Like |
|
|
141
|
-
| `w` | Add to watch later |
|
|
142
|
-
| `h` | Back to home |
|
|
143
|
-
| `?` | Show all shortcuts |
|
|
144
|
-
| `Esc` | Close overlay |
|
|
84
|
+
> **You**: Is there any video explaining the Raft consensus algorithm? Ideally by the author.
|
|
145
85
|
|
|
146
|
-
|
|
86
|
+
**Agent** calls `hackertube_search({ query: "Raft consensus", limit: 5 })` and replies:
|
|
147
87
|
|
|
148
|
-
|
|
88
|
+
> Yes, Raft's author Diego Ongaro delivered a comprehensive lecture at Stanford: *Raft User Study Lecture* (58 min, recommended by 4 HN members). HN comments highlight that it is much more approachable than reading the paper alone. You can also watch the accompanying *Paxos Lecture* (67 min) for foundational background.
|
|
89
|
+
> 🔗 https://www.youtube.com/watch?v=YbZ3zDzDnrw
|
|
149
90
|
|
|
150
|
-
|
|
91
|
+
### Tool Parameters
|
|
151
92
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
93
|
+
| Parameter | Type | Required | Description |
|
|
94
|
+
|---|---|---|---|
|
|
95
|
+
| `query` | string | Yes | Search query in English or Chinese (e.g. `compiler optimization`, `micrograd`) |
|
|
96
|
+
| `limit` | number | No | Number of results to return (default `5`, max `15`) |
|
|
97
|
+
| `lang` | string | No | Language for returned text: `zh` (default) or `en` |
|
|
155
98
|
|
|
156
|
-
|
|
99
|
+
---
|
|
157
100
|
|
|
158
|
-
|
|
101
|
+
## 💡 Comparison with the Original Site
|
|
159
102
|
|
|
160
|
-
|
|
161
|
-
official channel → explicitly subtitled → Chinese title or high views → the rest by views
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
The small tag after the button is that tier: `Official`, `Subbed`, `Translated`, or `Repost`. A repost is never dropped for low view count — some channels have no official presence at all, and a good repost is the only option.
|
|
165
|
-
|
|
166
|
-
Derivative works do not count. Commentary, adaptations and reaction videos are excluded, because clicking through has to land on the same film. The exclusion is skipped when the description carries the source address, since repost channels often put words like "analysis" in the title of a genuine subtitled copy.
|
|
167
|
-
|
|
168
|
-
Lookups are on demand: one query when you open the watch page, about 0.8 seconds the first time, 0 milliseconds from the local cache afterwards. Videos you never open are never queried, and no request reaches the other site for them.
|
|
169
|
-
|
|
170
|
-
The hit rate is roughly half. Obscure videos and rights-heavy broadcast material simply have no repost — that is about what exists on the other side, not about how well the lookup works.
|
|
171
|
-
|
|
172
|
-
## A tool for your agent
|
|
173
|
-
|
|
174
|
-
The plugin registers a tool named `hackertube_search`. Once installed, your agent can search this video library from any conversation, without opening the panel.
|
|
175
|
-
|
|
176
|
-
### One full exchange
|
|
177
|
-
|
|
178
|
-
You ask:
|
|
179
|
-
|
|
180
|
-
> Which video should I actually watch to understand backpropagation?
|
|
181
|
-
|
|
182
|
-
The agent calls `hackertube_search({ query: "backpropagation", limit: 5, lang: "en" })`, and the tool returns (excerpt):
|
|
103
|
+
Built upon Andrej Karpathy's open [HackerTube data export](https://karpathy.bearblog.dev/hacker-tube/), tailored specifically for developer environments:
|
|
183
104
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
The agent answers:
|
|
105
|
+
| Capability | Original Site | HackerTube DSH Plugin |
|
|
106
|
+
|---|---|---|
|
|
107
|
+
| **Context** | Standalone web browser | **Embedded inside DSH workspace** |
|
|
108
|
+
| **Localization** | English only | **Full EN/ZH bilingual**, 6,454 translated titles ready |
|
|
109
|
+
| **AI Q&A** | None | **Subtitle-aware temporal Q&A** |
|
|
110
|
+
| **Agent Tool** | None | **Native `hackertube_search` tool** |
|
|
111
|
+
| **Mirror Sources** | YouTube only | **Smart physical fingerprint matching for mirrors** |
|
|
112
|
+
| **State Persistence** | Ephemeral browser storage | **Host-side local persistence** (safe across cache clears) |
|
|
113
|
+
| **Recommendations** | None | **384-d vector centroid + HN co-recommendation graph** |
|
|
114
|
+
| **Offline Resilience** | Full network dependent | **Local caching + graceful offline degradation** |
|
|
195
115
|
|
|
196
|
-
|
|
197
|
-
> https://www.youtube.com/watch?v=VMj-3S1tku0
|
|
116
|
+
---
|
|
198
117
|
|
|
199
|
-
|
|
118
|
+
## 🖥️ Watch Page & Shortcuts
|
|
200
119
|
|
|
201
|
-
|
|
202
|
-
- A few lectures on compiler optimization
|
|
203
|
-
- Which Karpathy video covers backpropagation
|
|
120
|
+

|
|
204
121
|
|
|
205
|
-
###
|
|
122
|
+
### Keyboard Shortcuts
|
|
206
123
|
|
|
207
|
-
|
|
124
|
+
| Key | Action | Key | Action |
|
|
125
|
+
|---|---|---|---|
|
|
126
|
+
| `/` | Focus search bar | `j` / `k` | Navigate cards up/down |
|
|
127
|
+
| `Enter` | Open selected video | `l` | Like / Unlike |
|
|
128
|
+
| `w` | Add to Watch Later | `h` | Return to Home |
|
|
129
|
+
| `?` | Show shortcut cheatsheet | `Esc` | Close details or overlay |
|
|
208
130
|
|
|
209
|
-
|
|
210
|
-
|---|---|
|
|
211
|
-
| `query` | Search terms, English or Chinese |
|
|
212
|
-
| `limit` | Result count, default 5, max 15 |
|
|
213
|
-
| `lang` | Language for the returned text, `zh` or `en`, default `zh` |
|
|
131
|
+
### 🎯 Smart Alternative Mirrors
|
|
214
132
|
|
|
215
|
-
|
|
133
|
+
For users facing network restrictions or seeking localized subtitles, the watch view dynamically checks for verified Chinese platform (Bilibili) mirrors:
|
|
216
134
|
|
|
217
|
-
|
|
135
|
+
- **Strict Fingerprint Verification**: Compares exact duration (within ±2s tolerance), chronological release order, and bidirectional description references to rule out homonymous uploads or derivative commentary.
|
|
136
|
+
- **Tier Quality Ranking**: Prioritizes `Official Channel` → `Subtitled / Translated` → `High-definition Repost`.
|
|
137
|
+
- **Zero Noise & Silent Lookup**: Lookups are on-demand and cached locally. If no valid mirror exists, **no placeholder is rendered** — keeping the interface clean and distraction-free.
|
|
218
138
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
| First install, empty cache | about 10 seconds |
|
|
222
|
-
| Later launches, list load | 45 ms |
|
|
223
|
-
| Opening a watch page | 10 ms |
|
|
224
|
-
| Related, the 3,778 videos with co-recommendation data | 2 ms |
|
|
225
|
-
| Related, the other 2,676 videos, by vector similarity | about 0.7 s on first use |
|
|
226
|
-
| Machine translation of summary and recommendation note | 0.4 to 1.8 s on first use |
|
|
139
|
+
<details>
|
|
140
|
+
<summary><b>📂 Click to expand: 16 Core Knowledge Domains (6,454 Videos)</b></summary>
|
|
227
141
|
|
|
228
|
-
|
|
142
|
+
<br />
|
|
229
143
|
|
|
230
|
-
|
|
144
|
+

|
|
231
145
|
|
|
232
|
-
|
|
146
|
+
| Area | Subcategories | Videos |
|
|
147
|
+
|---|---:|---:|
|
|
148
|
+
| Software Engineering & Languages | 11 | 980 |
|
|
149
|
+
| Systems, Networks & Security | 10 | 702 |
|
|
150
|
+
| AI, Machine Learning & Data | 9 | 576 |
|
|
151
|
+
| Mathematics & Theoretical CS | 9 | 360 |
|
|
152
|
+
| Hardware & Electronics | 8 | 582 |
|
|
153
|
+
| Computing History & Culture | 8 | 1026 |
|
|
154
|
+
| Design, Graphics & Visual Media | 9 | 439 |
|
|
155
|
+
| Business, Startups & Economics | 9 | 644 |
|
|
156
|
+
| Politics, History & Society | 9 | 1018 |
|
|
157
|
+
| Physics, Space & Chemistry | 8 | 600 |
|
|
158
|
+
| Life Sciences, Mind & Health | 11 | 598 |
|
|
159
|
+
| Earth, Energy & Environment | 8 | 354 |
|
|
160
|
+
| Engineering, Transport & Making | 12 | 805 |
|
|
161
|
+
| Games & Game Development | 8 | 355 |
|
|
162
|
+
| Arts, Comedy, Music & Film | 12 | 1344 |
|
|
163
|
+
| Ideas, Learning & Language | 9 | 689 |
|
|
233
164
|
|
|
234
|
-
|
|
165
|
+
> Note: Cross-domain videos may belong to multiple categories, so category totals exceed 6,454.
|
|
235
166
|
|
|
236
|
-
|
|
237
|
-
|---|---|---|
|
|
238
|
-
| 6,454 video titles | Translation table shipped in the repository | Immediately after install |
|
|
239
|
-
| 166 category names | Shipped in the repository | Immediately after install |
|
|
240
|
-
| Summary, recommendation note, quoted comment | Translated when the page opens | Model first, machine translation as fallback |
|
|
241
|
-
| Hacker News comment bodies | Per comment or in bulk, on demand | About 1 second, then cached |
|
|
167
|
+
</details>
|
|
242
168
|
|
|
243
|
-
|
|
169
|
+
---
|
|
244
170
|
|
|
245
|
-
|
|
171
|
+
## ⚡ Architecture & Performance
|
|
246
172
|
|
|
247
|
-
|
|
173
|
+
- **Zero Runtime Dependencies**: Archive unpacking uses Node.js native `zlib`; no third-party npm packages required at runtime.
|
|
174
|
+
- **Latency Benchmarks**:
|
|
175
|
+
- Initial catalogue render: **~45 ms**
|
|
176
|
+
- Watch view open: **~10 ms**
|
|
177
|
+
- Co-recommendation query: **~2 ms**
|
|
178
|
+
- Vector cosine neighbor search: **~0.7 s** on initial run, instant in-memory afterwards
|
|
179
|
+
- **Graceful Degradation**:
|
|
248
180
|
|
|
249
|
-
|
|
|
181
|
+
| Module | Requirements | Behavior When Missing / Offline |
|
|
250
182
|
|---|---|---|
|
|
251
|
-
|
|
|
252
|
-
| Chinese
|
|
253
|
-
|
|
|
254
|
-
| AI
|
|
255
|
-
|
|
|
256
|
-
|
|
|
257
|
-
| Alternative mirror | The Chinese platform is reachable | No button appears, everything else works |
|
|
183
|
+
| **Browsing & Basic Playback** | DSH Web Container & Network | Local offline search remains available |
|
|
184
|
+
| **Chinese Titles & Categories** | None | Shipped with repo, 100% offline available |
|
|
185
|
+
| **Summaries & Comment Translation** | Model or Translation Endpoint | Automatically falls back to English source |
|
|
186
|
+
| **AI Q&A** | Configured DSH model | Warns model unavailable; playback unaffected |
|
|
187
|
+
| **Subtitle Extraction** | Optional `yt-dlp` + `ffmpeg` | AI answers lose subtitle context; playback unaffected |
|
|
188
|
+
| **Alternative Mirror** | Domestic platform connectivity | Hides button silently; normal playback unaffected |
|
|
258
189
|
|
|
259
|
-
|
|
190
|
+
<details>
|
|
191
|
+
<summary><b>📁 Data Source & Local Cache Directory Layout</b></summary>
|
|
260
192
|
|
|
261
|
-
|
|
193
|
+
<br />
|
|
262
194
|
|
|
263
|
-
|
|
195
|
+
Cached under `$DSH_PROFILE_DIR/.dsh-hackertube/` (default: `~/.dsh/.dsh-hackertube/`):
|
|
264
196
|
|
|
197
|
+
```text
|
|
198
|
+
.dsh-hackertube/
|
|
199
|
+
├── export/ # Unpacked official export (~48 MB: videos, mentions, embeddings.npy)
|
|
200
|
+
├── i18n/ # Translation caches (titles, taxonomy, model output, MT cache)
|
|
201
|
+
├── list.json # YouTube metadata snapshot (views, duration, dates)
|
|
202
|
+
├── prefs.json # Likes, watch later list, playback progress history
|
|
203
|
+
├── subs/ # On-demand subtitle files
|
|
204
|
+
└── mirror.json # Alternative mirror lookup cache
|
|
265
205
|
```
|
|
266
|
-
videos.jsonl 6,454 videos with title, channel, summary, recommendation note, tags, categories, HN stats
|
|
267
|
-
mentions.jsonl 39,834 HN comments with author, month, stance, and body
|
|
268
|
-
related.jsonl 3,778 co-recommendation rows
|
|
269
|
-
embeddings.npy 6,454 × 384 float16 vectors, used to fill in videos without co-recommendation data
|
|
270
|
-
embedding_ids.json Row index to video id
|
|
271
|
-
taxonomy.json 150 categories in 16 areas
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
Unpacking uses the zlib module built into Node, so the plugin ships with no npm runtime dependencies.
|
|
275
|
-
|
|
276
|
-
The export has no duration, view count, publish date, or thumbnail, since those are YouTube metadata. The list therefore still requests 65 upstream pages in parallel to fill them in, cached for one day.
|
|
277
|
-
|
|
278
|
-
## Cache
|
|
279
|
-
|
|
280
|
-
Everything lives under `$DSH_PROFILE_DIR/.dsh-hackertube/`, by default `~/.dsh/.dsh-hackertube/`. Deleting the directory resets the plugin to a clean state.
|
|
281
|
-
|
|
282
|
-
```
|
|
283
|
-
export/ Unpacked official data, about 48 MB
|
|
284
|
-
i18n/zh-titles.json Title translations
|
|
285
|
-
i18n/zh-taxonomy.json Category translations
|
|
286
|
-
i18n/zh.json Model translations for detail text
|
|
287
|
-
i18n/zh-mt.json Machine translations for detail text
|
|
288
|
-
i18n/zh-comments.json Comment translation cache
|
|
289
|
-
list.json YouTube metadata and list snapshot
|
|
290
|
-
prefs.json Likes, watch later, history
|
|
291
|
-
subs/ Subtitles
|
|
292
|
-
mirror.json Mirror lookups and timestamps
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
## Known limitations
|
|
296
|
-
|
|
297
|
-
Title translations are model output checked by rules. Most read naturally, and roughly a thousand remain close to word-for-word.
|
|
298
|
-
|
|
299
|
-
A Chinese query is machine translated into English before it can reach English tags. That costs one request per query, debounced by 300 ms and cached in memory. Offline, only local matching applies.
|
|
300
206
|
|
|
301
|
-
|
|
207
|
+
Delete this directory at any time to reset to a pristine state.
|
|
302
208
|
|
|
303
|
-
|
|
209
|
+
</details>
|
|
304
210
|
|
|
305
|
-
|
|
211
|
+
---
|
|
306
212
|
|
|
307
|
-
## Credits
|
|
213
|
+
## 📌 Credits & Disclaimer
|
|
308
214
|
|
|
309
|
-
|
|
215
|
+
- Core data is powered by the [HackerTube](https://karpathy.bearblog.dev/hacker-tube/) project created by **[Andrej Karpathy](https://github.com/karpathy)**.
|
|
216
|
+
- Discussion snippets originate from [Hacker News](https://news.ycombinator.com). Video content copyright belongs to respective YouTube creators.
|
|
217
|
+
- This is an independent open-source plugin and is not officially affiliated with Andrej Karpathy, Hacker News, or YouTube.
|
|
310
218
|
|
|
311
|
-
|
|
219
|
+
---
|
|
312
220
|
|
|
313
|
-
## License
|
|
221
|
+
## 📄 License
|
|
314
222
|
|
|
315
|
-
MIT
|
|
223
|
+
[MIT License](LICENSE) © 2026
|
package/README.md
CHANGED
|
@@ -1,315 +1,222 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
简体中文 | [English](README.en.md)
|
|
4
|
-
|
|
5
|
-
在 DSH 面板内浏览并播放 Hacker News 二十年间反复推荐的技术视频,无需切换到浏览器。触手可及的高质量英文视频信源,让你的 DeepSeek Harness 变得更丰富有趣。
|
|
6
|
-
|
|
7
|
-

|
|
8
|
-
|
|
9
|
-
数据集来自 Andrej Karpathy 的 [HackerTube](https://karpathy.bearblog.dev/hacker-tube/)。站点提供完整的数据导出,作者在博客中说明其用途:
|
|
10
|
-
|
|
11
|
-
> Export of the site's data available to give to your agent to easily create your own version.
|
|
12
|
-
|
|
13
|
-
本插件使用的正是这份官方导出。非官方项目,与 Andrej Karpathy、Hacker News、YouTube 均无隶属关系。
|
|
14
|
-
|
|
15
|
-
原站同样可以直接访问。并入面板之后它多出一些原站做不到的事情,逐条列在[与原始站点的差别](#与原始站点的差别)一节。
|
|
16
|
-
|
|
17
|
-
## 与原始站点的差别
|
|
18
|
-
|
|
19
|
-
原站是一个纯浏览型的目录:打开、看片、关掉,界面全英文。并入 DSH 面板之后,它在七件事上不一样。
|
|
20
|
-
|
|
21
|
-
**不用离开当前窗口。** 播放器、详情、HN 讨论、相关推荐都在面板内,边写代码边看,不用来回切标签页。
|
|
22
|
-
|
|
23
|
-
**内容是中文的。** 6454 条标题与 166 个分类名随仓库附带,装完就是中文。摘要、推荐理由、HN 评论按需翻译,优先走模型,模型不可用时退到机翻。
|
|
1
|
+
<div align="center">
|
|
24
2
|
|
|
25
|
-
|
|
3
|
+
# HackerTube for DeepSeek Harness
|
|
26
4
|
|
|
27
|
-
|
|
5
|
+
**将 Hacker News 二十年精选的 6,454 支高分技术视频搬进你的 IDE**
|
|
28
6
|
|
|
29
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/dsh-hackertube)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
[](https://github.com/chow651/dsh-hackertube)
|
|
11
|
+
[](package.json)
|
|
30
12
|
|
|
31
|
-
|
|
13
|
+
[简体中文](README.md) | [English](README.en.md)
|
|
32
14
|
|
|
33
|
-
|
|
15
|
+
<br />
|
|
34
16
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
| 摘要与评论翻译 | 无 | 按需,模型优先 |
|
|
41
|
-
| AI 问答(带字幕上下文) | 无 | 有 |
|
|
42
|
-
| 分享卡片 | 无 | 有 |
|
|
43
|
-
| 收藏与播放历史 | 浏览器本地 | 宿主侧持久化 |
|
|
44
|
-
| 个性化推荐 | 无 | 有 |
|
|
45
|
-
| Agent 检索工具 | 无 | 有 |
|
|
46
|
-
| 中文平台备用源 | 无 | 按需,命中才出现 |
|
|
17
|
+
<p align="center">
|
|
18
|
+
无需在编辑器与浏览器之间来回切换。<br />
|
|
19
|
+
在 <b>DeepSeek Harness</b> 侧边栏畅享 Hacker News 社区精选的高质量技术演讲、AI 课程与系统架构视频。<br />
|
|
20
|
+
开箱即用的全量中文、字幕级上下文 AI 深度解析、原生 Agent 检索工具,让高价值信源触手可及。
|
|
21
|
+
</p>
|
|
47
22
|
|
|
48
|
-
|
|
23
|
+

|
|
49
24
|
|
|
50
|
-
|
|
25
|
+
</div>
|
|
51
26
|
|
|
52
|
-
|
|
27
|
+
---
|
|
53
28
|
|
|
54
|
-
|
|
29
|
+
## ✨ 核心特性
|
|
55
30
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
| 硬件与电子 | 8 | 582 |
|
|
63
|
-
| 计算机历史与文化 | 8 | 1026 |
|
|
64
|
-
| 设计、图形与视觉媒体 | 9 | 439 |
|
|
65
|
-
| 商业、创业与经济 | 9 | 644 |
|
|
66
|
-
| 政治、历史与社会 | 9 | 1018 |
|
|
67
|
-
| 物理、太空与化学 | 8 | 600 |
|
|
68
|
-
| 生命科学、心智与健康 | 11 | 598 |
|
|
69
|
-
| 地球、能源与环境 | 8 | 354 |
|
|
70
|
-
| 工程、交通与制作 | 12 | 805 |
|
|
71
|
-
| 游戏与游戏开发 | 8 | 355 |
|
|
72
|
-
| 艺术、喜剧、音乐与电影 | 12 | 1344 |
|
|
73
|
-
| 思想、学习与语言 | 9 | 689 |
|
|
31
|
+
- 📺 **沉浸式内嵌播放**:专为 DSH 打造的独立安全中转服务,边写代码边看技术精华,无需切换窗口,告别空白屏与第三方防盗链限制。
|
|
32
|
+
- 🤖 **字幕级上下文 AI 问答**:问「这一段在讲什么」时,自动抓取播放点前后 3 分钟的精确字幕送入模型,直击技术细节,拒绝空洞概括。
|
|
33
|
+
- 🇨🇳 **开箱即用全量汉化**:随仓库内置全部 6,454 条标题与 166 个分类的中文对照,装完即用;详情摘要与 HN 讨论支持「模型精翻 + 本地机翻」双引擎按需解析。
|
|
34
|
+
- 🔍 **原生 Agent 检索工具**:注册 `hackertube_search` 原生 Tool,Agent 在协助日常开发时可直接检索 20 年精选视频信源并给出推荐。
|
|
35
|
+
- 🎯 **国内镜像无缝直达**:自动嗅探 B 站高质量搬运与中文字幕(基于物理时长指纹校验),命中即显直达入口,无则静默不打扰。
|
|
36
|
+
- ⚡ **零运行时依赖 & 毫秒级推荐**:纯原生 Node.js 实现(0 外部 npm 依赖),内置 384 维向量质心推荐算法;历史与喜好本地持久化。
|
|
74
37
|
|
|
75
|
-
|
|
38
|
+
---
|
|
76
39
|
|
|
77
|
-
##
|
|
40
|
+
## 🚀 快速开始
|
|
78
41
|
|
|
79
|
-
|
|
42
|
+
> **前提条件**:已安装并运行 [DeepSeek Harness](https://github.com/chow651/dsh-hackertube)。
|
|
80
43
|
|
|
81
|
-
###
|
|
44
|
+
### 方式一:让 Agent 一句话自动安装(推荐)
|
|
82
45
|
|
|
83
|
-
|
|
46
|
+
直接在 DeepSeek Harness 对话框中把这句话发给 Agent:
|
|
84
47
|
|
|
85
|
-
```
|
|
48
|
+
```text
|
|
86
49
|
安装并启用 HackerTube 插件:plugin_manager install_bundle target=dsh-hackertube。
|
|
87
|
-
npm
|
|
88
|
-
|
|
50
|
+
若 npm 访问受限则使用 target=github:chow651/dsh-hackertube。
|
|
51
|
+
装完确认插件列表中 dsh-hackertube 已启用,并提醒我刷新页面。
|
|
89
52
|
```
|
|
90
53
|
|
|
91
|
-
###
|
|
54
|
+
### 方式二:使用插件管理器安装
|
|
92
55
|
|
|
93
|
-
|
|
56
|
+
在 DSH 终端执行:
|
|
94
57
|
|
|
95
|
-
```
|
|
58
|
+
```bash
|
|
96
59
|
plugin_manager install_bundle target=dsh-hackertube
|
|
60
|
+
# 或直接从 GitHub 仓库安装:
|
|
61
|
+
# plugin_manager install_bundle target=github:chow651/dsh-hackertube
|
|
97
62
|
```
|
|
98
63
|
|
|
99
|
-
|
|
64
|
+
### 方式三:手动包管理安装
|
|
100
65
|
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### 用 npm 或 pnpm 安装
|
|
106
|
-
|
|
107
|
-
```
|
|
66
|
+
```bash
|
|
67
|
+
# 在 DSH profile 目录下执行
|
|
108
68
|
npm install dsh-hackertube
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
```
|
|
69
|
+
# 或
|
|
112
70
|
pnpm add dsh-hackertube
|
|
113
71
|
```
|
|
114
72
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
安装后在插件列表中启用 `dsh-hackertube` 并刷新页面。无需额外配置,无需 API key,也不需要在安装前预取任何数据。
|
|
118
|
-
|
|
119
|
-
## 功能
|
|
120
|
-
|
|
121
|
-

|
|
122
|
-
|
|
123
|
-
收录 6454 个视频,分属 16 个大类与 150 个二级分类,按 HN 推荐力度排序。首页首次加载 60 条,滚动时分批追加。
|
|
124
|
-
|
|
125
|
-
详情页包含播放器、该视频在 HN 上的讨论,以及右侧的相关推荐。右侧另有 AI 问答页,会把当前播放位置前后三分钟的字幕片段一并交给模型,因此可以询问某一段的具体内容。
|
|
73
|
+
安装完成后在插件列表中启用 `dsh-hackertube` 并刷新页面即可。**无需任何 API Key,无需预配置,开箱即用。**
|
|
126
74
|
|
|
127
|
-
|
|
75
|
+
---
|
|
128
76
|
|
|
129
|
-
|
|
77
|
+
## 🤖 原生 Agent 工具集成
|
|
130
78
|
|
|
131
|
-
|
|
79
|
+
插件向 DeepSeek Harness 注册了 `hackertube_search` 原生工具。在日常写代码或向 Agent 提问时,Agent 可直接按语义检索视频库并给出带技术依据的参考:
|
|
132
80
|
|
|
133
|
-
###
|
|
81
|
+
### 对话示例
|
|
134
82
|
|
|
135
|
-
|
|
136
|
-
|---|---|
|
|
137
|
-
| `/` | 聚焦搜索框 |
|
|
138
|
-
| `j` `k` | 在卡片间上下移动 |
|
|
139
|
-
| `Enter` | 打开当前卡片 |
|
|
140
|
-
| `l` | 标记喜欢 |
|
|
141
|
-
| `w` | 加入稍后看 |
|
|
142
|
-
| `h` | 返回首页 |
|
|
143
|
-
| `?` | 显示快捷键一览 |
|
|
144
|
-
| `Esc` | 关闭浮层 |
|
|
83
|
+
> **你**:有没有讲 Raft 共识算法的视频?最好是作者本人讲的。
|
|
145
84
|
|
|
146
|
-
|
|
85
|
+
**Agent** 自动调用 `hackertube_search({ query: "Raft 共识算法", limit: 5 })`,秒级分析后回答:
|
|
147
86
|
|
|
148
|
-
|
|
87
|
+
> 有,推荐看 Raft 作者 Diego Ongaro 本人在 Stanford 的公开演讲《Raft 讲座》(58 分钟,HN 4 人力荐)。社区评价它比论文更加通俗直观;若需了解前置知识,可以搭配同系列的《Paxos 讲座》(67 分钟)一起看。
|
|
88
|
+
> 🔗 https://www.youtube.com/watch?v=YbZ3zDzDnrw
|
|
149
89
|
|
|
150
|
-
|
|
90
|
+
### 工具参数
|
|
151
91
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
92
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
93
|
+
|---|---|---|---|
|
|
94
|
+
| `query` | string | 是 | 检索关键词,支持中英文混搜(如 `编译器优化`、`micrograd`) |
|
|
95
|
+
| `limit` | number | 否 | 返回条数,默认 `5`,最多 `15` |
|
|
96
|
+
| `lang` | string | 否 | 返回文本语言,`zh`(默认)或 `en` |
|
|
155
97
|
|
|
156
|
-
|
|
98
|
+
---
|
|
157
99
|
|
|
158
|
-
|
|
100
|
+
## 💡 与原始 HackerTube 站点的对比
|
|
159
101
|
|
|
160
|
-
|
|
161
|
-
官方入驻号 → 明确标注中字或熟肉 → 中文标题或高播放 → 其余按播放量
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
按钮后面的小标就是档位,`官方`、`中字`、`中文`、`转载` 四种。转载不会因为播放量低被丢掉——有的频道根本没有官方入驻,高质量转载就是唯一选项。
|
|
165
|
-
|
|
166
|
-
二次创作不算。解说、改编、reaction 这类重新演绎的内容会被排除,点过去看到的必须是同一支片子。但简介里有原视频地址时不排除,因为搬运号常把「万字解析」这类词当自家噱头,标在真熟肉标题上。
|
|
167
|
-
|
|
168
|
-
查询是按需的:打开详情页才查一次,首次约 0.8 秒,之后读本地缓存是 0 毫秒。没打开过的视频不会被查,也不会向对方站点发出任何请求。
|
|
169
|
-
|
|
170
|
-
命中率大约一半。冷门视频、版权严格的官媒内容基本找不到对应搬运,这是内容存量决定的——不是查询能力不够,是对面真的没有。
|
|
171
|
-
|
|
172
|
-
## 给 agent 用的工具
|
|
173
|
-
|
|
174
|
-
插件注册了一个工具 `hackertube_search`。装了插件之后,不用打开面板,agent 在对话里就能检索这个视频库。
|
|
175
|
-
|
|
176
|
-
### 一次完整的对话
|
|
177
|
-
|
|
178
|
-
你问:
|
|
179
|
-
|
|
180
|
-
> 有没有讲 Raft 共识算法的视频?最好是作者本人讲的。
|
|
181
|
-
|
|
182
|
-
agent 调用 `hackertube_search({ query: "Raft 共识算法", limit: 5 })`,工具返回(节选):
|
|
102
|
+
本项目基于 Andrej Karpathy 开源的 [HackerTube 官方导出数据](https://karpathy.bearblog.dev/hacker-tube/),针对 IDE 开发者工作流进行了全面重构:
|
|
183
103
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
agent 据此回答:
|
|
104
|
+
| 能力维度 | 原始站点 | 本插件 (DSH Plugin) |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| **交互场景** | 独立网页浏览 | **嵌入 DSH 工作台**,边写代码边看 |
|
|
107
|
+
| **语言支持** | 纯英文 | **全量中英双语**,6,454 条中文标题装完即用 |
|
|
108
|
+
| **AI 问答** | 无 | **带播放点字幕上下文**的深度问答 |
|
|
109
|
+
| **Agent 调用** | 无 | **内置 Agent 原生检索工具** |
|
|
110
|
+
| **观看备用源** | 仅 YouTube | **智能嗅探国内高质量搬运/中字** |
|
|
111
|
+
| **进度与偏好** | 浏览器本地临时存储 | **宿主本地持久化**,清理浏览器缓存不丢失 |
|
|
112
|
+
| **个性化推荐** | 无 | **384 维向量质心 + HN 共推荐图谱** |
|
|
113
|
+
| **离线友好度** | 依赖全量实时请求 | **本地高速缓存 + 优雅降级策略** |
|
|
195
114
|
|
|
196
|
-
|
|
197
|
-
> https://www.youtube.com/watch?v=YbZ3zDzDnrw
|
|
115
|
+
---
|
|
198
116
|
|
|
199
|
-
|
|
117
|
+
## 🖥️ 界面与交互
|
|
200
118
|
|
|
201
|
-
|
|
202
|
-
- 找几个讲编译器优化的演讲
|
|
203
|
-
- Karpathy 讲反向传播的是哪一个
|
|
119
|
+

|
|
204
120
|
|
|
205
|
-
###
|
|
121
|
+
### 快捷键支持
|
|
206
122
|
|
|
207
|
-
|
|
123
|
+
| 按键 | 作用 | 按键 | 作用 |
|
|
124
|
+
|---|---|---|---|
|
|
125
|
+
| `/` | 聚焦搜索框 | `j` / `k` | 上下移动选中卡片 |
|
|
126
|
+
| `Enter` | 打开选中视频 | `l` | 喜欢 / 取消喜欢 |
|
|
127
|
+
| `w` | 加入稍后看 | `h` | 返回首页 |
|
|
128
|
+
| `?` | 显示快捷键指南 | `Esc` | 关闭详情或浮层 |
|
|
208
129
|
|
|
209
|
-
|
|
210
|
-
|---|---|
|
|
211
|
-
| `query` | 检索词,中英文均可 |
|
|
212
|
-
| `limit` | 返回条数,默认 5,最多 15 |
|
|
213
|
-
| `lang` | 返回文案的语言,`zh` 或 `en`,默认 `zh` |
|
|
130
|
+
### 🎯 国内备用源智能直达
|
|
214
131
|
|
|
215
|
-
|
|
132
|
+
为方便网络受限或偏好中文字幕的开发者,插件在详情页提供智能国内平台(B站)备用入口:
|
|
216
133
|
|
|
217
|
-
|
|
134
|
+
- **严格指纹校验**:基于物理视频时长(±2s 容差)、发布时序及双向引用凭据进行刚性校验,杜绝同名搬运与二创误判。
|
|
135
|
+
- **版本质量优选**:自动在多个搬运中优先挑选 `官方` → `中字/熟肉` → `高清` 版本。
|
|
136
|
+
- **静默按需查询**:仅在打开详情页时按需毫秒级检索并缓存;若未检索到对应搬运则**完全静默不打扰**,不增加额外占位。
|
|
218
137
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
| 首次安装(空缓存) | 约 10 秒 |
|
|
222
|
-
| 后续启动,列表加载 | 45 毫秒 |
|
|
223
|
-
| 打开详情页 | 10 毫秒 |
|
|
224
|
-
| 相关推荐,有共推荐关系的 3778 个视频 | 2 毫秒 |
|
|
225
|
-
| 相关推荐,其余 2676 个视频(向量近邻) | 首次约 0.7 秒 |
|
|
226
|
-
| 摘要与推荐理由机翻 | 首次 0.4 至 1.8 秒 |
|
|
138
|
+
<details>
|
|
139
|
+
<summary><b>📂 点击展开:16 个技术领域分类分布(6,454 支视频)</b></summary>
|
|
227
140
|
|
|
228
|
-
|
|
141
|
+
<br />
|
|
229
142
|
|
|
230
|
-
|
|
143
|
+

|
|
231
144
|
|
|
232
|
-
|
|
145
|
+
| 大类 | 子分类数 | 包含视频数 |
|
|
146
|
+
|---|---:|---:|
|
|
147
|
+
| 软件工程与编程语言 | 11 | 980 |
|
|
148
|
+
| 系统、网络与安全 | 10 | 702 |
|
|
149
|
+
| AI、机器学习与数据 | 9 | 576 |
|
|
150
|
+
| 数学与理论计算机科学 | 9 | 360 |
|
|
151
|
+
| 硬件与电子 | 8 | 582 |
|
|
152
|
+
| 计算机历史与文化 | 8 | 1026 |
|
|
153
|
+
| 设计、图形与视觉媒体 | 9 | 439 |
|
|
154
|
+
| 商业、创业与经济 | 9 | 644 |
|
|
155
|
+
| 政治、历史与社会 | 9 | 1018 |
|
|
156
|
+
| 物理、太空与化学 | 8 | 600 |
|
|
157
|
+
| 生命科学、心智与健康 | 11 | 598 |
|
|
158
|
+
| 地球、能源与环境 | 8 | 354 |
|
|
159
|
+
| 工程、交通与制作 | 12 | 805 |
|
|
160
|
+
| 游戏与游戏开发 | 8 | 355 |
|
|
161
|
+
| 艺术、喜剧、音乐与电影 | 12 | 1344 |
|
|
162
|
+
| 思想、学习与语言 | 9 | 689 |
|
|
233
163
|
|
|
234
|
-
|
|
164
|
+
> 注:部分跨领域视频可能归属于多个分类,因此各分类视频数之和大于总数。
|
|
235
165
|
|
|
236
|
-
|
|
237
|
-
|---|---|---|
|
|
238
|
-
| 6454 条视频标题 | 随仓库附带的译文表 | 安装后立即生效 |
|
|
239
|
-
| 166 条分类名称 | 随仓库附带 | 安装后立即生效 |
|
|
240
|
-
| 摘要、推荐理由、评论引用 | 打开时自动翻译 | 优先使用模型,模型不可用时使用机翻 |
|
|
241
|
-
| HN 评论正文 | 逐条翻译或整段翻译 | 首次约 1 秒,之后读取缓存 |
|
|
166
|
+
</details>
|
|
242
167
|
|
|
243
|
-
|
|
168
|
+
---
|
|
244
169
|
|
|
245
|
-
|
|
170
|
+
## ⚡ 性能与技术架构
|
|
246
171
|
|
|
247
|
-
|
|
172
|
+
- **零运行时依赖**:解压采用 Node.js 原生 `zlib`,无任何额外 npm 运行时依赖,极轻极简。
|
|
173
|
+
- **极致响应速度**:
|
|
174
|
+
- 启动后列表渲染:**~45 ms**
|
|
175
|
+
- 详情页打开耗时:**~10 ms**
|
|
176
|
+
- 关联推荐(共推荐关系):**~2 ms**
|
|
177
|
+
- 向量余弦近邻检索:首次约 **0.7 s**,后续全内存命中
|
|
178
|
+
- **优雅降级机制**:
|
|
248
179
|
|
|
249
|
-
|
|
|
180
|
+
| 功能模块 | 运行条件 | 离线 / 依赖缺失时的降级表现 |
|
|
250
181
|
|---|---|---|
|
|
251
|
-
|
|
|
252
|
-
|
|
|
253
|
-
|
|
|
254
|
-
| AI
|
|
255
|
-
|
|
|
256
|
-
|
|
|
257
|
-
| 备用观看源 | 中文平台可达 | 不出现按钮,其余功能正常 |
|
|
182
|
+
| **浏览、检索与基础播放** | DSH Web 容器与网络 | 本地离线索引可用,支持本地搜索 |
|
|
183
|
+
| **中文标题与全部分类** | 无任何外部依赖 | 随仓库自带,100% 永久离线生效 |
|
|
184
|
+
| **摘要与长评论翻译** | 模型或网络翻译通道 | 自动回退展示英文原文 |
|
|
185
|
+
| **AI 问答** | DSH 已配置模型 | 提示模型未就绪,基础播放与浏览不受影响 |
|
|
186
|
+
| **字幕提取** | 可选本地 `yt-dlp` + `ffmpeg` | 缺失时仅影响 AI 获取实时字幕,视频照常播放 |
|
|
187
|
+
| **国内备用源** | 国内平台网络连通 | 无法连通时不展示备用入口,正常走原版播放 |
|
|
258
188
|
|
|
259
|
-
|
|
189
|
+
<details>
|
|
190
|
+
<summary><b>📁 数据源与本地缓存存储结构</b></summary>
|
|
260
191
|
|
|
261
|
-
|
|
192
|
+
<br />
|
|
262
193
|
|
|
263
|
-
|
|
194
|
+
数据首次加载后缓存在 `$DSH_PROFILE_DIR/.dsh-hackertube/`(默认路径为 `~/.dsh/.dsh-hackertube/`):
|
|
264
195
|
|
|
196
|
+
```text
|
|
197
|
+
.dsh-hackertube/
|
|
198
|
+
├── export/ # 官方解压数据包(~48 MB,含 videos、mentions、embeddings.npy 等)
|
|
199
|
+
├── i18n/ # 中文译文缓存(标题、分类、模型精翻、机翻持久化)
|
|
200
|
+
├── list.json # YouTube 播放量、时长与发布时间元数据快照
|
|
201
|
+
├── prefs.json # 用户的喜欢、稍后看与播放进度历史
|
|
202
|
+
├── subs/ # 按需缓存的字幕文件
|
|
203
|
+
└── mirror.json # 备用源检索结果与时效缓存
|
|
265
204
|
```
|
|
266
|
-
videos.jsonl 6454 条视频,含标题、频道、摘要、推荐理由、标签、分类、HN 统计
|
|
267
|
-
mentions.jsonl 39834 条 HN 评论,含作者、月份、立场、原文
|
|
268
|
-
related.jsonl 3778 条共推荐关系
|
|
269
|
-
embeddings.npy 6454 × 384 维 float16 向量,用于补齐无共推荐关系的视频
|
|
270
|
-
embedding_ids.json 向量行号与视频 id 的对应
|
|
271
|
-
taxonomy.json 150 个分类,16 个大类
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
解压使用 Node 内置的 zlib,插件不引入任何 npm 运行时依赖。
|
|
275
|
-
|
|
276
|
-
导出不包含时长、播放量、发布时间与封面,这些字段属于 YouTube 元数据,因此列表仍会并行请求 65 页上游接口补齐,结果缓存一天。
|
|
277
|
-
|
|
278
|
-
## 缓存目录
|
|
279
|
-
|
|
280
|
-
全部位于 `$DSH_PROFILE_DIR/.dsh-hackertube/`,默认路径为 `~/.dsh/.dsh-hackertube/`。删除整个目录可恢复到初始状态。
|
|
281
|
-
|
|
282
|
-
```
|
|
283
|
-
export/ 解包后的官方数据,约 48 MB
|
|
284
|
-
i18n/zh-titles.json 标题译文
|
|
285
|
-
i18n/zh-taxonomy.json 分类译文
|
|
286
|
-
i18n/zh.json 模型翻译的详情文本
|
|
287
|
-
i18n/zh-mt.json 机翻的详情文本
|
|
288
|
-
i18n/zh-comments.json 评论机翻缓存
|
|
289
|
-
list.json YouTube 元信息与列表快照
|
|
290
|
-
prefs.json 喜欢、稍后看、历史
|
|
291
|
-
subs/ 字幕
|
|
292
|
-
mirror.json 备用源解析结果与时间戳
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
## 已知限制
|
|
296
|
-
|
|
297
|
-
标题译文由模型生成后按规则校对,多数通顺,仍有约一千条偏向直译。
|
|
298
|
-
|
|
299
|
-
中文查询需要先机翻为英文才能命中英文标签,每次查询发起一次请求,含 300 毫秒防抖与内存缓存。断网时仅保留本地匹配。
|
|
300
205
|
|
|
301
|
-
|
|
206
|
+
如需重置初始状态,只需清空该目录即可。
|
|
302
207
|
|
|
303
|
-
|
|
208
|
+
</details>
|
|
304
209
|
|
|
305
|
-
|
|
210
|
+
---
|
|
306
211
|
|
|
307
|
-
##
|
|
212
|
+
## 📌 致谢与声明
|
|
308
213
|
|
|
309
|
-
|
|
214
|
+
- 核心数据源自 **[Andrej Karpathy](https://github.com/karpathy)** 创建的 [HackerTube](https://karpathy.bearblog.dev/hacker-tube/) 项目并遵循其开放数据倡议。
|
|
215
|
+
- 讨论内容取自 [Hacker News](https://news.ycombinator.com),视频版权归 YouTube 原创作者所有。
|
|
216
|
+
- 本项目为开源社区第三方插件,非官方出品,与 Andrej Karpathy、Hacker News 或 YouTube 无隶属关系。
|
|
310
217
|
|
|
311
|
-
|
|
218
|
+
---
|
|
312
219
|
|
|
313
|
-
##
|
|
220
|
+
## 📄 许可证
|
|
314
221
|
|
|
315
|
-
MIT
|
|
222
|
+
[MIT License](LICENSE) © 2026
|