dsh-media-ledger: Four-Platform Self-Media Ledger & Retrospective Plugin

Introduction

DeepSeek Harness (DSH) does not provide unified cross-platform content management out of the box. Developers often have to switch back and forth between different platform dashboards, manually recording content and data, and then hand-craft review reports. This approach is prone to omissions and makes it difficult to compare performance across platforms and accounts.

dsh-media-ledger is a client-side plugin for DSH that consolidates the three stages of “Content Ledger → Data Review → Publishing Package” into a single DSH panel. It covers four platforms—Douyin, Xiaohongshu (RED), Bilibili, and WeChat Channels—with the goal of “remembering well, calculating accurately, and packaging quickly.” It does not handle uploads; it simply delivers the publishing package to your fingertips.

Core Features

Content Ledger & Data Review

The plugin provides multiple actions through the media tool, chaining the data management workflow together.

  1. Record a post: add_post logs a single piece of content. You must fill in the platform and title, and it is strongly recommended to also fill in published_at (used to calculate T+ age).
  2. Report metrics: add_metrics backfills metrics such as plays, likes, comments, shares, saves, and follower growth for a given post.
  3. Browse the ledger: list filters by platform and returns the content list.
  4. Generate a review: report groups by a specified dimension and outputs median values, engagement rates, and other metrics. Supports group_by (e.g., by content type / platform / account) and max_age_hours (controls the T+ age window).

Example (grouped by content type):

media(action: "report", group_by: "kind")
→ 图文tag  1 条  播放中位 24000  赞中位 46  互动率 0.52%  评论赞比 1.72

Publishing Package Generation

The pack action generates ready-to-paste publishing package text, with validation for title character count, description, tag count, cover image dimensions, and aspect ratio.

Data Model

The plugin uses two JSONL files for data storage; field order is the write order. Missing values are stored as null (not 0, because “not shown in dashboard” and “recorded as 0” are two different things).

posts.jsonl fields:
- id: sequential number, e.g., p0001.
- platform: douyin / xhs / bilibili / shipinhao.
- account: account short name (required to distinguish when managing multiple accounts).
- kind: content type, e.g., image-text tag / talking-head / mixed edit.
- title, date, published_at, url, note.

metrics.jsonl fields:
- id: corresponds to posts.id.
- captured_at: timestamp of the metric capture (used to pick the latest snapshot).
- play / like / comment / share / collect / fans.
- source: origin (dashboard export / manual entry / Bilibili API / Douyin API).
- extras: supplementary metrics, e.g., Bilibili’s settlement values and audience demographics, Douyin’s completion rate and review status, etc. (ledger statistics do not read these fields).

Three data conventions:
- Multiple metric reports for the same post: only the one with the latest captured_at is used (parsed as real timestamps).
- Median is used instead of mean (to avoid viral hits skewing the average).
- Engagement rate is only calculated on rows where both plays and interactions exist in the same snapshot (numerator and denominator from the same batch).

Platform Collection & Import

The plugin does not connect to the internet directly. Dashboard data is collected via standalone Python scripts, then injected into the ledger by the Host calling import_bili / import_douyin / import_xhs. Scripts are separated from the plugin body; credentials are stored under the config/ directory at the workspace root.

The left sidebar provides actions such as “QR Code Login,” “Collect & Import,” and “Unbind,” allowing you to complete account binding and data import without leaving the panel.

Installation & Activation

The plugin is a standard DSH bundle and requires host dsh version >=0.2.0. Tested on 0.2.2-rc.3.

Install in DSH (method 1):

plugin_manager install_bundle <plugin_directory_path>

Or write it manually in the config file:

- insert:
    - id: media-ledger
      name: dsh-media-ledger
      config:
        dataDir: D:\notes\media-ledger   # example path, optional

Configuration options (all optional):
- dataDir: ledger directory. Defaults to data/media-ledger under the workspace root. Lookup order: config.dataDir → environment variable DSH_MEDIA_LEDGER_DIR → workspace root data/media-ledger → ~/media-ledger.
- sidebar: whether to show the “Media Ledger” entry in the DSH left sidebar. Only hidden if explicitly set to false.

After installing and reloading DSH, a “Media Ledger” entry will appear in the left sidebar. Click it to open the main panel.

Typical Usage

  1. Record a post:
media(action: "add_post", platform: "bilibili", title: "测试视频", published_at: "2026-11-29T10:00:00Z")
  1. Report metrics:
media(action: "add_metrics", id: "p0001", play: 12000, like: 45, comment: 12)
  1. Browse the ledger:
media(action: "list", platform: "bilibili")
  1. Generate a review (grouped by content type):
media(action: "report", group_by: "kind")
  1. Generate a publishing package (validates title length, description, tag count, cover dimensions):
media(action: "pack", platform: "douyin", title: "标题不超过 50 字")
  1. Import JSON produced by collection scripts:
media(action: "import_bili", path: "/tmp/bili-fetched.json")

Use Cases & Notes

Suitable for developers and creators who need to manage multi-platform content data uniformly, conduct periodic reviews, and quickly generate publishing text. The plugin runs with the current DSH process permissions; review the source code and license before installation.

The plugin’s scope is clearly defined: a ledger and review tool—it does not provide upload automation. The official publishing APIs of the four platforms have limited access for individual developers, so the plugin chooses to deliver the publishing package to your hands and leaves the upload step to a human, avoiding the risk-control issues that come from reverse-engineering APIs.

Ecosystem Context

The DSH philosophy is “everything is a plugin.” The community catalog is an independent site with no official affiliation with DeepSeek / High-Flyer.

  • Plugin homepage: https://www.skillhub.cn/plugins/yehuoshun/dsh-media-ledger
  • Source repository: https://github.com/yehuoshun/dsh-media-ledger
羽毛球分组比赛记分
小程序二维码

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

Xiaoye