Zum Hauptinhalt springen
J

dsh-shiliu-wechat-assistant

jsnancy/dsh-shiliu-wechat-assistant

Learn the typography of a published WeChat article, lay out a new post in that style, preview it, and save it to the WeChat Official Account draft box. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Installation

dsh plugin --profile web add github:jsnancy/dsh-shiliu-wechat-assistant

README

Shiliu Studio

Shiliu Studio

Paste your writing, lay it out like a good WeChat article, and save it to the draft box. You still press Publish.

English · 中文

What it is

A small tool for people who write for WeChat Official Accounts. You do not need to know HTML, and you do not need to tune font sizes, line height and colours line by line in the WeChat editor. Paste what you want to publish, pick a look, check the phone preview, and save it to the draft box. Then open the WeChat backend and press Publish.

It only saves drafts. It never sends an article for you, and it never touches articles you have already published.

What it does (three steps)

Step 1: put the content in. The panel opens on the Compose page. Paste text directly, drop images into the large box, or paste rich text copied from elsewhere. To put several pieces in one article (a group of short posts, for example), separate them with a line containing ---: auto layout and card layouts split them into cards, while a long-form layout draws a divider.

Step 2: pick a look.

  • You can skip this. It lays the content out automatically, and you can switch between four themes: Handdrawn paper (cream paper, warm brown text, orange-red accents), Letter (pale yellow paper, dark red headings), Clean (white, blue-grey), and Ink (rice paper white, ink black, generous whitespace).
  • To follow an article you published before, paste its link into the grey line under the paste box, “Want to follow an earlier article? Give me a link”, or choose a saved layout on the Layouts page. It learns that article's font, size, paragraphs, headings, quotes, images and ornaments, and only swaps the text.
  • Not limited to card layouts: full-length articles, paragraph-after-paragraph layouts, and repeated cards all work. It only asks you to try another article when the body has almost no readable text (for example, the whole article is images, video or empty decoration), or falls back to a theme.

Step 3: save it to the draft box. Once the preview appears on the left (or below, on a narrow screen), you can edit the title and digest. You can collapse the preview to give the paste box more room. Yellow notes warn you about things such as “a local image has not been uploaded yet” or “external links will not open inside WeChat”. The preview switches between phone (375) and wide (677), and you can copy the HTML out.

Press “Save to draft box” and it opens the WeChat backend, fills in the title, uploads images, inserts the body, sets the cover and files the article into a collection. A progress bar tells you which step it is on. The first time, a browser window opens for you to scan a QR code; after that it continues on its own. When it finishes, the preview turns into a success card with a link to the draft box.

Install

From the plugin marketplace (recommended)

  1. Open DSH, go to Plugins, then Marketplace.
  2. Search for “Shiliu Studio” (十六公众号助手) and install it.
  3. Refresh or restart DSH. A small “十六” icon appears in the sidebar; click it to open the panel.

From a local folder (before it is listed, or if you were given a folder)

  1. Put the whole dsh-shiliu-wechat-assistant folder anywhere on your machine, for example under .../me/plugins/. Putting it there does not install it; the next step does.
  2. In DSH, open Plugins and choose “Install local plugin” (the exact label varies by version), then point it at the folder.
  3. Restart DSH. The same “十六” icon appears in the sidebar.

During development you can also let DSH install the directory directly: plugin_manager install_bundle target=<absolute path to the plugin>.

You need DSH 0.2.2-rc.1 or newer and Node.js 20.10 or newer. Saving a draft uses Playwright to drive a real browser. DSH profiles usually already include it; if it is missing, the plugin tells you instead of leaving you to guess.

First use: scan to sign in

Saving a draft requires a signed-in WeChat Official Account backend, and only you can do that part.

  1. The first time you press “Save to draft box”, the plugin opens a browser window on the WeChat login page.
  2. Scan the QR code with the WeChat account bound to the Official Account and confirm on your phone.
  3. When the backend home page appears, the plugin continues by itself and closes the window when it is done. Do not close the window while scanning.

The login is stored on this machine, so you only scan once. You can also sign in early from the Account page with “Open login window”; that page also shows the last sign-in time and a “Refresh login status” button.

Logins expire regularly (after a long break, a network change, or the backend signing itself out). Just scan again when that happens.

What the panel looks like

Compose page, light theme

The laid-out result sits on the left and can be collapsed at any time:

After layout

The screenshots show the Chinese interface; the panel switches to English from the Account page or the bottom-left shortcut.

On the left is a sticky-note rail: the brand and a one-line slogan at the top, then Compose / Layouts / Account / History under “Workbench”, and sign-in status, language, light/dark and version at the bottom. The sidebar icon is the sheet of paper from the main logo, sized by the same rules as the Shiliu Review Desk (十六校审台) icon (20px, fully opaque when selected).

On the right is a large sheet of paper. Each page starts with a small label (Step 1 / Layouts / Account / History), a handwritten heading and one plain sentence, followed by a row of small notes showing that page's situation (current layout, number of saved layouts, word count, byline). The panel opens on Compose.

Compose

The page you will use most.

  • Large paste box: text, images and rich text all go here. Images are stored locally first and uploaded to WeChat when you save the draft.
  • Reference article (collapsible): click the grey line to paste an article link or choose a saved layout from the dropdown. Leave it empty for automatic design.
  • Four theme cards: Handdrawn paper / Letter / Clean / Ink. When a reference layout is selected these are greyed out, and the preview header says “Following this article”.
  • Generate layout: the preview appears on the left (below on narrow screens). You can edit the title and digest directly in the preview.
  • Collapsible preview: “Collapse” in the top-right of the preview card, or “View → Preview” in the left rail. Collapsed, the paste box takes the full width.
  • Save to draft box: at the bottom of the preview card. While saving, progress refreshes about every half second with steps such as “Opening the editor”, “Uploading body images to WeChat” and “Choosing a cover”. If the QR wait times out, a “Sign-in required” card appears; press “Open login window”, scan, and it continues. If the previous article is still saving, it says so instead of pushing two articles into the backend at once.
  • Success card: “Saved to the draft box”, the title, and “Open the WeChat backend to publish”.

On first open, the Compose page shows a welcome card asking for the byline (default “文:十六”) and author name. Press save to dismiss it; you can change both later on the Account page.

Layouts

This is where layouts learned from earlier articles live.

  • At the top, “Paste a link → Learn this layout”: paste a WeChat article link and optionally give it a name. The learned layout appears in the list below.
  • Each row shows the layout name, the source article, whether it is a “long-form layout” or a “card layout”, how many paragraphs or cards it has, and when it was saved.
  • “Use this layout” jumps back to Compose with the layout applied.
  • “Delete” asks for confirmation in place; deleting does not affect articles already laid out.
  • When there are no layouts, the page shows one sentence and a “Give me a link” entry point.

Account

Everything related to the WeChat account.

  • Sign-in status: whether you are signed in and when you last signed in. “Open login window” starts the QR flow; “Refresh login status” checks again.
  • Draft defaults: byline, author (up to 8 characters), default collection (read from the Official Account), whether to declare original content by default, default layout, and cover strategy (first body image / no cover). Press “Save settings” and the next draft uses them.
  • Display and language: light/dark/system and 中文 / English. These are the same settings as the shortcuts at the bottom left; changing either place is enough. If the window is too narrow, the shortcuts collapse into this page.

History

Every layout and every draft save leaves a record.

  • Newest first, showing the title, whether it was a layout or a draft save, whether it succeeded, the theme, author and collection.
  • Click a row to expand it in place: copy that day's HTML, lay the piece out again with the same layout, or delete it (with one confirmation).
  • When empty, “Go write one” takes you back to Compose.

Bottom-left shortcuts

  • A small dot for WeChat sign-in status; when it turns red, click it and check the Account page.
  • 中 / EN language switch and the three light/dark modes (collapsed into Account on narrow windows).
  • Version number.

FAQ

Images do not show up

First decide whether “the preview does not show it” or “the draft does not have it”.

  • Preview images are local temporary URLs. They are only uploaded to the WeChat media library when you save the draft; a working preview does not guarantee a working draft.
  • Images copied directly from web pages often carry hotlink protection, which WeChat filters out. Base64 embedded images are stripped too (and can even break the backend's save button).
  • The reliable route: drag images from your machine into the paste box, or use images already in the WeChat media library. Saving a draft includes a step called “Uploading body images to WeChat”, after which they become mmbiz.qpic.cn URLs.
  • If the saved-draft warnings mention “local images not uploaded”, some image did not make it. Check the draft box; if an image is missing, save again or add it in the backend.

The draft has no cover

  • Check the cover strategy on the Account page; it may be set to “No cover”.
  • Automatic cover only uses the first http(s) image in the body, and that image must already be in the WeChat media library. External links, locally dragged images and SVG do not count.
  • An image that is too small, or a failed crop step, also leaves no cover.
  • Fix: put a media-library image first in the body and choose “Use first body image”, or pick a cover manually in the backend after saving.

The login expired

  • WeChat backend sessions expire. Click the dot at the bottom left, or check the Account page.
  • If “Refresh login status” says you are signed out, press “Open login window” and scan with WeChat.
  • While saving, it waits up to 180 seconds for the scan. On timeout a “Sign-in required” card appears; press “Open login window”, scan, and it finishes the same article. If the window was closed, press “Save to draft box” again; the content is still there.

The content is too long

  • Long articles lay out slowly and paste into the editor slowly; with many images the save can time out. Save one article at a time and wait for progress to finish.
  • Consider splitting the content into several articles with a line containing ---, and saving them one by one; each section becomes a card.
  • WeChat's own limits apply: title 64 characters, digest 120, author 8 (the plugin truncates before saving); a single image must be under 8 MB, and at most 20 images per upload.

Where your data lives

Settings, learned layouts, history, staged images and the WeChat login all stay on this machine:

$DSH_HOME/shiliu/        # ~/.dsh/shiliu/ when DSH_HOME is not set

Copy that directory to back everything up; delete it to start clean. Uninstalling the plugin does not remove it.

More documentation

  • API reference: every field, response and failure shape for the routes between the panel and the Host.
  • Implementation notes: how the code is split up, where data lives, and which parts of the WeChat backend will bite you.

Drafts only, never publish. It is worth saying twice.

Ähnliche Plugins