dsh-course-notes: Automatically convert video courses to Word notes and send them to a new session

Introduction

The common practice in DSH for course knowledge accumulation is: use a plugin to scrape video intros, subtitles, danmaku, and hot reviews to generate Markdown, then manually organize the content into Word, manually create a new session, manually drag the file in, and keep track of which videos were missed. Every step in this chain involves manual labor.

The plugin introduced below, dsh-course-notes, bridges this manual process to automation: it monitors the detection results of dsh-video-coursemap, generates an independent Word document for new videos, automatically delivers it to a new DSH session, and writes a line to the project’s long-term memory. The plugin is maintained by sony6490 and categorized as “Workflow”.

It is a pure host plugin. It does not send detection requests, does not scrape data, does not modify any code in dsh-video-coursemap or dsh-memory-evolve, and does not create new client-side interfaces.

What is it

One-sentence positioning: It reads the detection results of dsh-video-coursemap, generates independent Word knowledge notes for each new video, and automatically delivers them to a new DSH session (summary + Word file card), while writing to the project memory of dsh-memory-evolve.

It is not responsible for detecting videos or scraping subtitles; detection and scraping are all handled by the upstream dsh-video-coursemap. This plugin only handles the “monitor → convert → create session → deliver → record memory” segment.

Core Features

The workflow is as follows:

Watch Bilibili video in browser (foreground window)
   │ dsh-video-coursemap observes foreground window every 15s
   ▼
Subject classification + scrape intro/subtitles/danmaku/hot reviews → Subject Markdown → Study Manual.docx
   │ Persist to disk: <output dir>/.state/state.json, .state/manuals/<subject>.md
   ▼
dsh-course-notes
   ├─ Monitor state.json, find (Subject, Video) not in ledger
   ├─ Extract video chapter from subject Markdown → scripts/md2docx.py → <subject>/<video title>.docx
   ├─ ctx.agents.create new standard session (default Agent preset + default model + cwd=output dir)
   ├─ attachments.saveFile(docx) → session.append user message (summary + Word file block)
   ├─ sessionTitle.rename (session title "📚 Video Title")
   ├─ workspaceRegistry attached to "Course Knowledge Map" project group
   └─ memory tool (dsh-memory-evolve, target=project) write a course note

A few points directly related to cost and controllability:

  1. Delivery does not trigger model turns. Summary text + Word file card appears directly in the session, consuming no extra tokens.
  2. The ledger deduplicates by “Subject + Title”. Videos already delivered are not generated and delivered again.
  3. If a single video fails, it retries automatically, up to maxAttempts (default 3).
  4. Content classified as non-course by coursemap (pure music, live streams, news, etc.) is silently ignored; no session is created and no error is reported.

Installation and Enablement

Prerequisites: DSH Desktop has been initialized with a desktop profile, and dsh-video-coursemap and dsh-memory-evolve are installed.

Install from code directory:

cd path/to/dsh-course-notes
node scripts/install.mjs --dry-run   # Preview
node scripts/install.mjs             # Install / Update

The installation script does two things: copies the plugin to C:/Users/<you>/.dsh/profiles/desktop/node_modules/dsh-course-notes (overwriting old copies); idempotently registers it in the dsh.profile.bundles of the profile’s package.json (first time backs up package.json).

Install from GitHub:

dsh plugin --profile desktop add github:sony6490/dsh-course-notes

dsh plugin add is only responsible for putting the package into the profile. After installation, confirm that two places in the profile’s package.json are correct:

  • dependencies: "dsh-course-notes": "github:sony6490/dsh-course-notes"
  • dsh.profile.bundles: an item in the array "dsh-course-notes"

If dependencies is missing, subsequent pnpm install (e.g., installing/uninstalling other plugins via dshmarket) will delete this copy as a redundant package. The README mentioned this issue in Nov 2026, and the install script has been changed to write both dependencies and bundles.

After installation, completely exit and restart DeepSeek Harness. Host plugins do not hot-load. After restart, the plugin automatically starts polling. The first start defaults to backfilling existing videos.

Typical Usage: Post-Installation Verification

After restart, run in DSH:

course_notes_status
course_notes_deliver { "title": "<some existing video title>", "force": true }

Expected result: A session “📚

Division of labor between the two tools:

  • course_notes_status: View enabled status, output directory, coursemap status, subject/video counts, delivered/pending/failed, recent sessions and documents.
  • course_notes_deliver: Immediately deliver a video already in the coursemap status; defaults to the most recently processed video, force: true allows redelivery.

Configuration

All configuration items can be omitted. To override, override in the profile’s cordis.patch.yml by id:

- id: dsh-course-notes
  config:
    coursemapOutputDir: 'C:/Users/your_username/Course Knowledge Map'
    writeMemory: true
    backfill: false

Common keys and default values:

Key Default Description
enabled true Total switch
watchIntervalMs 15000 Scan interval (ms)
initialDelayMs 20000 Delay before first scan after restart
coursemapOutputDir C:/Users//Course Knowledge Map Must match coursemap’s outputDir
sessionCwd null → output dir New session working directory (determines project memory attribution and left sidebar grouping)
writeMemory true Whether to write dsh-memory-evolve project memory
backfill true Whether to backfill historical videos on first start
maxPerTick 2 Max number of deliveries per round
provider / model null Override new session model; defaults to DSH default model
sessionTitlePrefix 📚 Session title prefix
stateDir C:/Users//.dsh/course-notes Ledger, logs, temporary Markdown
md2docxScript /scripts/md2docx.py Word conversion script
python null → auto-detect Python interpreter (requires python-docx)
maxAttempts 3 Single video automatic retry limit

coursemapOutputDir is a prone-to-error item: this value must be consistent with the coursemap’s outputDir, otherwise course_notes_status will show “coursemap status: not found”.

Status and Artifacts

Disk locations after installation:

  • Ledger: <stateDir>/delivered.json, deduplicated by subject + title, records sessionId and docx.
  • Logs: <stateDir>/course-notes.log, one line per delivery/failure.
  • Single video Word: <output dir>/<subject>/<video title>.docx.
  • Subject study manual: <output dir>/<subject>/Study Manual.docx, maintained by coursemap, not generated by this plugin.

For troubleshooting, check the logs first: if the tool doesn’t appear, check if DSH was fully restarted, if dsh-course-notes exists under node_modules, or if profile bundles are registered; if the session has text but no file, check logs for “failed to generate single video Word”, confirm if python/python-docx is available; if the session doesn’t appear in the project group, check logs for “failed to attach workspace”, this doesn’t affect the session itself.

Applicable Scenarios and Notes

Suitable for those already using dsh-video-coursemap for video learning accumulation, hoping every video has a downloadable Word, and can continue to ask questions in a separate session. It chains the manual process of “new video → Word → new session → project memory”, at the cost of depending on the upstream two plugins’ output directory and Markdown structure conventions.

The plugin runs with the permissions of the current DSH process: it reads coursemap’s state.json, writes to the output directory, creates sessions, attaches workspace groups, and writes project memory. Before installation, it is recommended to read the repository source code, focusing on scripts/install.mjs’s disk writing and package.json modification behavior, and what scripts/md2docx.py does. The license is MIT, where md2docx.py comes from dsh-video-coursemap (MIT), the file header retains the original source description, and this plugin only changed the invocation method.

Practical usage limitations: Detection capability is inherited from coursemap, only covering foreground browser/video client windows, background playback is undetectable; the new session initially only has an archived message + Word card, it does not automatically run the model, users can continue to ask questions in that session; if coursemap modifies the Markdown structure in the future, chapter extraction failure will degrade to using the Subject Study Manual Word; plugin upgrades require re-running node scripts/install.mjs and restarting DSH.

Ecosystem context: DSH’s philosophy is “everything is a plugin”. This plugin is distributed via the community directory. The directory page is an independent site, with no official affiliation to DeepSeek / Fudan (Simpohouse), it is not an official app store. The current directory page has 0 stars, README and source code are the primary sources of information.

Conclusion

Its value lies not in detection or scraping capabilities—which are left to dsh-video-coursemap—but in turning the manual steps of turning course knowledge from Markdown to Word, to session, to project memory into an automated process, and ensuring delivery consumes no extra tokens. The cost is a strong dependency on the upstream state file format and output directory conventions; it is worth confirming these are stable before installation.

Directory Page: https://www.skillhub.cn/plugins/sony6490/dsh-course-notes

Repository: https://github.com/sony6490/dsh-course-notes

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye