dsh-xhs-batch-studio: Batch Converting Materials into Xiaohongshu Image Posts

Introduction

When creating Xiaohongshu (Little Red Book) image-text posts, the common practice is to manually extract topics from Excel, PDF, or Word files, write copy piece by piece, and then use design tools or image generation models to assemble covers and inner pages. Layouts often fluctuate depending on the tool or prompt, and it is difficult to maintain a unified style across a batch of content. DeepSeek Harness (DSH) decomposes capabilities into installable plugins. Within the Desktop workbench, you can consolidate the process of “Data Input → Topic Selection → Checklist → Image Output via Templates” into a fixed workflow.

Below is an introduction to the community plugin dsh-xhs-batch-studio (maintained by Nanfeng0108, GitHub repository Nanfeng0108/dsh-xhs-batch-studio). It is a DSH Desktop workbench plugin categorized under Model Inference. It utilizes locally configured models for topic refinement and copywriting, while covers and inner pages are rendered via HTML templates without relying on image generation models. This ensures stable output under the same templates and color schemes.

What is this

In one sentence: Batch convert Excel / PDF / Word / CSV data into Xiaohongshu image-text posts—first refining an editable list of topics, and after checking the desired ones, generating copy, covers, and inner page images based on writing templates and layout templates, followed by exporting an index table.

The plugin injects dsh-desktop-workbenches via dsh.client. The workbench name on the left side is “Xiaohongshu Batch Workbench”. The server-side routes are in dsh/index.js (/api/xhs-batch/*), and the client features a three-step panel (lib/client.js). The current npm package version is 3.6.11 (see repository package.json), License MIT.

Workflow

The workflow in the README can be summarized into three steps:

① Import Data (Excel / PDF / Word / CSV)
        ↓  Parse + OCR + Refine
② Topic List (Edit title/angle, check the ones to write)
        ↓  Writing Template + Layout Template
③ Final Output (Copy + Cover + Inner Pages + Master List)

Step 1 only refines topics, it does not write copy. You can verify topics, modify titles and angles, select only the few you want to write, and then proceed to Step 2; changing the batch of topics will not modify the already uploaded data.

The copywriting stage requires a model: configure DeepSeek in DSH, or set the environment variable XHS_USE_DSH_MODEL=1 to borrow the key from the current provider. No login to a Xiaohongshu account is required; image generation is completed locally. The “Image Signature” in the settings is merely text printed in the corner of the image and can be left blank.

Core Features

Data Import & Topic Selection

Supports Excel, PDF, Word, and CSV. After upload, the plugin parses the files, performs OCR if necessary, and then refines topics. You can adjust the “Content Direction” to narrow down topics (e.g., “Small Apartment Organization”), as well as the “Topic Quantity” (how many to refine at once; the final number of posts is determined by your checkmarks).

Writing Templates (Skills)

In the top “Templates / Skills” section, you can select built-in writing templates: Knowledge Lists, Tutorial Steps, Pitfall Avoidance Guides, Review Comparisons, Opinion Resonance, and Good Finds Collections. You can also create custom templates, configuring the number of sections, lines per section, characters per line, title rules, opening hooks, closing calls-to-action, tone, and supplementary requirements (you can paste your own writing skills / rules). Editing, “Save As”, and deletion are supported (built-in templates can only be “Saved As”).

Custom writing template file path:

$DSH_HOME/xhs-batch-studio/templates/writing/*.json

You can modify files directly or include them in version control.

Layout & Output Stability

  • 3 fixed cover layouts (Big Character Poster / Magazine White Space / Sticky Note), each with two composition variants (a, b). All are rendered via HTML templates, without calling image generation models.
  • 2 fixed inner page layouts (Numbered Cards / Timeline), each with composition variants a and b; bullet points are paired with linear icons based on keywords, falling back to dots if no match is found; font sizes adapt automatically to content length.
  • Same template + Same color scheme + Same copy → Consistent images; changing copy only changes the text, not the layout.
  • Inter-post accent colors and cover compositions are determined by title hashes, not random numbers.
  • Page roles: Cover → Key Point Cards → Quote Page → Closing Page (CTA + Tags).
  • Size 1080×1440 (Xiaohongshu 3:4 Portrait), exported at 2x clarity.

Optional color schemes: Cream & Vermilion, Warm Paper Brown, Light Green, Dark Gold. Hue range: narrow (rotation within the same family, default) or wide (cross-hue). Each post includes 2–6 inner key point cards, plus a cover, a quote page, and a closing page.

Output & Data Directory

Data for each run is stored in:

$DSH_HOME/xhs-batch-studio/
├── runs/<Run ID>/         Data, topics.json, notes.json, output directory, index.xlsx
├── uploads/               Uploaded raw data
├── templates/writing/     Custom writing templates
└── venv/                  Plugin's private Python environment

On macOS, $DSH_HOME defaults to ~/Library/Application Support/dsh-desktop/harness. Uninstalling the plugin will not delete the directories listed above.

Installation & Activation

The installation methods provided in the official README are as follows (choose one):

dsh plugin --profile web add dsh-xhs-batch-studio   # If published to npm
dsh plugin --profile web add Nanfeng0108/dsh-xhs-batch-studio   # Or use GitHub repository directly

Alternatively, in DSH Desktop: Plugins → Add Plugin, and fill in the package name, GitHub address, or local directory.

After installation, restart once, and “Xiaohongshu Batch Workbench” will appear on the left. For first-time use, click “Prepare Environment”: This creates an independent venv, installs Python dependencies, and downloads Chromium (approx. 150 MB). This takes about one to two minutes and is not required again. Python 3.10+ is required, and local python3 must be available.

How to open: After restarting DSH Desktop, expand the left sidebar → click the current workbench name to the right of the top-left “Workbench” → Select “Xiaohongshu Batch Workbench”.

The first time you click “Refine Topics”, the plugin will also prepare the Python environment and browser renderer in the background (approx. 1–2 minutes, with progress indicators).

Typical Usage & Parameters

Follow the interface order to reproduce the README workflow:

  1. Import data files.
  2. Set parameters (see table below), click “Refine Topics”, edit and check items in the topic list.
  3. Select writing template, cover/inner page layouts, color scheme, etc., generate the final output, and download or view the runs directory and index.xlsx.
Parameter Description
Content Direction Optional, to narrow down topics
Topic Quantity How many topics to refine at once
Writing Template Copy structure and tone
Cover / Inner Page Layout Image arrangement
Color Scheme Cream & Vermilion / Warm Paper Brown / Light Green / Dark Gold
Hue Range narrow / wide
Inner Page Count 2–6 key point cards per post
Image Signature Can be left blank

Repository maintainers can use scripts under tools/ for local self-testing (not included in the release package):

node tools/test-host.mjs env       # Routes + Environment + Template directory
node tools/test-host.mjs prepare   # Prepare Python environment
node tools/test-host.mjs all       # Upload sample → Refine topics → Generate two posts → Verify images/zip/xlsx

Use Cases & Notes

Who it is for: Users who have a batch of structured or unstructured data and need to batch produce Xiaohongshu image-text post drafts with a unified style (copy + fixed layout images), and are willing to configure models and a one-time Python/Chromium environment in DSH Desktop.

Permissions & Security: The plugin runs with the current DSH process permissions. It will read and write to $DSH_HOME/xhs-batch-studio and call local Python and Chromium. Before installation, it is recommended to read the repository source code and the MIT license to confirm that the usage of uploaded data and model keys complies with your environment policy.

Ecosystem Note: The DSH community plugin directory (such as the entry on SkillHub) is an independent site. It has no official affiliation with DeepSeek / High-Flyer and is not an official app store.

Conclusion

dsh-xhs-batch-studio consolidates “Data → Topic List → Checklist → Templated Copy & Image Output” into the DSH Desktop workbench: models handle understanding and writing, while HTML templates ensure layout stability. To try it out or check issues, please refer to the directory page and GitHub:

  • Directory Page: https://www.skillhub.cn/plugins/Nanfeng0108/dsh-xhs-batch-studio
  • GitHub: https://github.com/Nanfeng0108/dsh-xhs-batch-studio
羽毛球分组比赛记分
小程序二维码

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

Xiaoye