WeChat Article Formatter
Convert Word documents and pasted text into markdown for the "谓无名" WeChat article editor, then render the markdown into paste-ready WeChat HTML.
Requirements: Python 3; Node.js 18+ with the bundled dependencies; LibreOffice/soffice only when converting legacy .doc files.
Deliverables — every job produces three files, all mandatory:
<文章名>.md— 谓无名-syntax markdown (the editable source of truth)<文章名>.html— paste-ready inline-styled HTML, rendered from the .md bynode scripts/render_html.js(never hand-written)<文章名>.preview.html— browser preview generated by the same renderer for visual QA
Core Rules
- Preserve the uploaded document's body content, wording, punctuation, names, dates, citations, and paragraph order as faithfully as possible. Relocate source author/translator bios into the required post-
---[note]bio modules without rewriting them. - Do not rewrite, polish, summarize, expand, translate, or fact-complete the article unless the user explicitly asks.
- Do not search online to fill missing book/person/publication data — exception: keyword blocks and extended reading recommendations always require web search to find accurate person, book, event, and photo information.
- Do not invent placeholders such as
https://placeholder,[待确认], or[信息缺失]in the formatted article. - If an image has no usable hosted URL, do not output standalone image syntax for it.
- Keyword block images are downloaded to a local
images/folder, then uploaded to the user's own image host viapython scripts/upload_image.py <图片...>. The default backend is the user's PicGo Server; a user who has configured Cloudflare R2 uploads there instead. Either way the destination and the credentials belong to the user, and this skill stores no image-host credentials of its own. Fill the returned public URL into the syntax block (e.g.[book:https://cdn.example.com/book.jpg|书名|作者|出版社|年份]). If PicGo is unavailable or upload fails, leave the image field empty and report it in校对提醒. - For book/reading-book blocks that are already present in the source but lack a cover URL, search + download + upload as above; only if no image can be found, leave the image field empty (e.g.
[book:|书名|作者|出版社|年份]). - If typos, grammar issues, punctuation issues, or political/compliance risks are found, keep the formatted article faithful to the source and report the issues after the markdown under
校对提醒.
编者按(Editor's Note)
- Every article must begin with a 编者按. It is the first non-empty content in the markdown file. Do not place the article title, author line, or any other content above it; use the source title only for the output filename and reporting.
- Syntax format:
>>>(note the trailing space) must be on the same line as the content start, and<<<must be on a separate line at the end. The space after>>>is mandatory for the editor to recognize the block. - Correct:
>>> 编者按内容... <<< - Incorrect:
>>>编者按内容... - Also incorrect:
>>> 编者按内容... - The 编者按 should be approximately 500 characters (Chinese) and must:
1. Summarize the main content and key arguments of the article.
2. Provide a brief editorial commentary — highlighting significance, raising questions, or connecting to broader context. - Write the 编者按 in a tone consistent with the "谓无名" editorial style: thoughtful, measured, and intellectually engaging.
- In the final report, state the 编者按 character count so the user can confirm it is ~500.
Article Structure Order
Every article must follow this order:
- 编者按 —
>>>/<<<, ~500 chars; first non-empty content, with no article title above it - 正文 — body text with keyword blocks (books, persons, etc.) inline
- 目录 (if any) —
---[toc]...---[/toc] - 注释 (if any) —
---[notes]...---[/notes] - 来源说明 —
---[note]...---[/note]block with:
- 本次推送内容为《书名》一书的"章节"。
- 感谢XXX授权转载。
- 图片源于作者/互联网。 - 作者简介 —
---[bio-title:作者简介]...---[/bio] - 译者简介 (if any) —
---[bio-title:译者简介]...---[/bio] - 延伸阅读 —
---[reading-title:延伸阅读]...---[/reading] - staff — exactly two
[staff:...]entries - 固定关注区 —
---[follow]...---[/follow]
This order is strict. Do not leave author or translator bios inside the body; move their source wording to the matching bio blocks after ---[note].
No Separator Before Special Blocks
The following blocks use their own opening syntax (e.g. ---[note], ---[bio-title:], etc.) as visual markers. Do NOT add an extra --- horizontal rule line before them:
---[toc](目录)---[notes](注释)---[note](来源说明)---[bio-title:作者简介]---[bio-title:译者简介]---[reading-title:延伸阅读]
These blocks should appear directly after the preceding content, without any intervening --- line.
## Heading Rule
##section headings must always be followed by---[dot]. The##and---[dot]are bound together as a single unit.- Every
##heading line must be immediately followed by a separate---[dot]line. ###subheadings do NOT have---[dot]after them. Only##headings use---[dot].
Keyword Blocks and Extended Reading
- Search for key information mentioned in the article: identify important persons, books, events, movies, and TV shows referenced in the text.
- Use the available web search/fetch/browser tools for online research. Search strategy:
- Use web search to discover sources and keyword candidates.
- Open/fetch known URLs to verify exact metadata.
- Use browser automation only when a public page requires JavaScript or interactive navigation.
- Always prioritize first-hand sources (official websites, original documents) over secondary reporting
Selection & Listing Rules(列举规则)
- 人物
[universal:]blocks: pick only substantive persons — those the article discusses, quotes, or builds an argument on. Skip passing name-drops, and skip a person who is already represented by their own book's[book:]block in the same paragraph. Target 3–6 person blocks per article (fewer is fine for short articles); insert each at the paragraph of first mention only, never twice for the same person. The first text field must be姓名(生年~ 卒年)— one space after the tilde, before the death year; for living persons use姓名(生年~)with nothing after the tilde. The second field contains identity and contribution only, without repeating the dates. - 图片语法选择: 人物、电影/电视剧海报、广告使用
[universal:](统一卡片尺寸);史料照片、艺术作品、横幅或其他必须保留原始宽高比例的图片使用[origin:]。不要用 Markdown**包裹第一项文字,两种语法都会自动将第一项加粗。 - 书籍 blocks: every book the article substantively discusses gets one block at first mention —
[book:]for Chinese editions,[enbook:]for English,[jpbook:]for Japanese. Never duplicate a book. - 延伸阅读: recommend 2–5 books, thematically tied to the article's subject. Must NOT repeat any book already in the article body. Prefer in-print Chinese editions (豆瓣 has an entry); order from most to least directly related.
- In the final report, list what was chosen and why (one line each), so the user can veto or swap entries.
信息获取渠道(persons / books / images, in priority order)
- 人物信息(identity, dates, 身份简介):
1. Wikipedia — match language to the person: 中文人物→zh.wikipedia, 日本人物→ja.wikipedia, 西方人物→en.wikipedia. Cross-read a second language edition when dates/titles matter.
2. Kotobank (kotobank.jp) — authoritative for Japanese scholars/writers not well covered by Wikipedia.
3. 机构页面 — university faculty pages, publisher author pages (最权威的在职头衔来源).
4. 百度百科 / 豆瓣作者页 — fallback for Chinese figures; treat as secondary, verify against one of the above. - The name field format is
姓名(生年~ 卒年); use姓名(生年~)for a living person. The year separator is the tilde~, never a hyphen or dash (-,–,—), and there is exactly one space after the tilde whenever a death year follows —舒群(1913~ 89), not舒群(1913~89). A living person's name ends right after the tilde, with no trailing space:姓名(生年~). When the death year shares its first two digits with the birth year, drop those two digits:舒群(1913~ 89), not舒群(1913~ 1989). Write both years in full when the leading digits differ (钱谦益(1582~ 1664)) or when either year has fewer than four digits (李白(701~ 762)). The 简介 field format is身份头衔,代表作或主要贡献— factual, ≤ 40 chars, no honorifics, and no repeated dates. Birth/death years and titles must be confirmed by at least one authoritative source; if sources conflict, pick the more authoritative one and note the conflict in校对提醒. Never invent a missing year. - 人物照片:
1. Wikimedia Commons (https://upload.wikimedia.org/wikipedia/commons/...) — check the person's Wikipedia infobox image first.
2. Kotobank / 机构页 / publisher author page portrait.
3. Amazon (author page) / 豆瓣作者页 photo. - Prefer a clear, front-facing, watermark-free portrait; skip group photos.
- 书籍信息与封面:
1. 豆瓣 (Douban) — for Chinese-edition books, movies, TV, music. After obtaining item_id, construct cover URL:- Books:
https://dou.img.lithub.cc/book/<id>.jpg - Movies:
https://dou.img.lithub.cc/movie/<id>.jpg - TV shows:
https://dou.img.lithub.cc/tv/<id>.jpg - Music:
https://dou.img.lithub.cc/music/<id>.jpg
2. 日本亚马逊 (Amazon.co.jp) — for Japanese books. Cover URL patterns:https://images-fe.ssl-images-amazon.com/images/I/<image_id>.jpgorhttps://m.media-amazon.com/images/I/<image_id>.jpg. Also useful for person photos of Japanese authors.
3. 出版社官网 / Google Books — for English books and to verify edition metadata (出版社、年份、译者).
- Books:
- Book metadata (作者/译者/出版社/年份) must match the actual edition whose cover is used; verify on the source page, not from memory.
Image Download + Image-Host Upload
- Download each image to the
images/directory under the same project folder using Bash (curl -L -oor PowerShellInvoke-WebRequest). - Naming convention (use Chinese name, remove punctuation
《》·:etc., keep alphanumeric and CJK): - Book covers:
book_<书名>.jpg— e.g.book_浮世通鉴日本大众文化史.jpg - Person photos:
person_<姓名>.jpg— e.g.person_鲁迅.jpg - Movie/TV posters:
movie_<片名>.jpg— e.g.movie_千与千寻.jpg - Extended reading covers:
reading_<书名>.jpg— e.g.reading_菊与刀.jpg - If filename conflicts occur, append
_2,_3etc. - Upload to the user's image host after all downloads finish, in one batch:
bash python <SKILL_ROOT>/scripts/upload_image.py images/*.jpg # 每行输出「本地路径<TAB>公网URL」;--json 输出 JSON 映射 - Two backends are available and both upload to the user's own host:
picgo(default) andr2(optional, direct to the user's Cloudflare R2 bucket). The backend is resolved in this order:--backend picgo|r2→WEIWUMING_IMAGE_BACKEND→ the"backend"field in the config file → automatic (r2when all five R2 keys are present, otherwisepicgo). Do not switch backends on the user's behalf; just use whatever resolves. - For
picgo: users must configure and select their own image host in PicGo, then keep PicGo Server running. The default API ishttp://127.0.0.1:36677/upload; override it withPICGO_API_URLor~/.weiwuming/image-host.json(seereferences/image-host.md). - For
r2: users supplyaccount_id,access_key_id,secret_access_key,bucketanddomainthrough~/.weiwuming/image-host.jsonor theR2_*environment variables. These are the user's own credentials — never print, echo, or copy them anywhere. - Run
python <SKILL_ROOT>/scripts/upload_image.py --checkbefore the first upload; it checks whichever backend is active. If PicGo Server authentication is enabled, configurePICGO_SERVER_SECRETorpicgo.server_secretin the local config file. - If the active backend is
picgoand PicGo is not configured, runpython <SKILL_ROOT>/scripts/setup_picgo.py --status. (setup_picgo.pyonly concerns the PicGo backend; it does nothing for R2.) When PicGo Core CLI 2.0+ is installed and the user chooses PicGo Cloud, offer--loginfor the official browser OAuth flow. Do not open the browser without the user's confirmation. OAuth login configures PicGo Cloud only; GitHub/S3/OSS/COS and other third-party uploaders still require their own credentials through--configure-uploaderor PicGo GUI. setup_picgo.py --sync-configis optional and explicit because the first cloud sync may upload the local PicGo configuration and conflicts require interactive resolution. Never run it automatically.- Remote http(s) URLs passed in are returned as-is. Local-image results are cached in
~/.weiwuming/upload-cache.json, isolated by backend instance and content hash (the olderpicgo-upload-cache.jsonis still read as a fallback). - Cache write failure is only a warning: keep and report the successful URLs instead of retrying and uploading duplicates.
- Exit code 2 = invalid configuration or the image host is unavailable → leave image fields empty and tell the user which backend failed, pointing at
references/image-host.md. - Image field in syntax: fill the returned public URL into the image/cover field:
[book:<公网URL>|书名|作者|出版社|年份][universal:<公网URL>|姓名|身份/简介][origin:<公网URL>|图说第一行|图说第二行|...][reading-book:书名|作者|译者|<公网URL>]- If upload failed or no image was found, leave the field empty.
- Search timeout handling: if a search takes too long, times out, or returns no results after reasonable attempts, leave the image URL field empty (no download needed) and report in
校对提醒.
Block Syntax Details
- Insert the appropriate syntax block immediately after the paragraph where the keyword is first mentioned:
- Persons →
[universal:<URL>|姓名(生年~ 卒年)|身份/简介];波浪号后空一格再写卒年(舒群(1913~ 89))。在世人物使用姓名(生年~),波浪号后不留空格,简介字段不再重复年份。卒年与生年前两位相同时省略前两位(舒群(1913~ 89)),不同世纪或非四位数年份写全(钱谦益(1582~ 1664)、李白(701~ 762))。 - Books →
[book:<URL>|书名|作者|出版社|年份]/[enbook:<URL>|Title|Author|Publisher|Year]/[jpbook:<URL>|書名|著者|出版社|年]- Field separator rule: each field MUST be separated by
|, do NOT use、or other delimiters within fields. - Book name: do NOT add 《》 or similar punctuation around the book name.
- Example:
[book:http://.../weiwuming/a1b2c3d4.jpg|浮世通鉴:日本大众文化史|日文研项目组 编著,党蓓蓓 译|北京大学出版社|2025] - Incorrect:
[book:xxx.jpg|《书名》|作者,出版社,年份](missing separators and extra punctuation)
- Field separator rule: each field MUST be separated by
- Movies/TV posters and advertisements →
[universal:<URL>|《片名》|导演:姓名,编剧:姓名|上映:年份,片长:分钟]— search Douban first for movie/TV posters.- 标题行: write only the work title (normally
《片名》); do not append海报. - 主创行: director and screenwriter MUST share one field and render on the same line:
导演:...,编剧:.... Use full-width colons and a Chinese comma exactly as shown. Join multiple names within either role with/; retain等when the source or verified credit is intentionally non-exhaustive. Do not substitute cast/voice actors for the screenwriter. If the director also wrote the screenplay, repeat the name in both roles. - 电影时间行:
上映and片长MUST share one field so they render on the same line:上映:YYYY,片长:NN 分钟. - 电视剧时间行: use
首播:YYYY,单集片长:NN 分钟,共 NN 集(omit the episode count only when it cannot be verified). - 默认不写简介: unless the user explicitly requests a synopsis or contextual note, end the card after the time line. When explicitly requested, add it as a following
|-separated field (normally说明:...); never append it to the上映/首播 + 片长field. - Example:
[universal:https://.../poster.jpg|《新世纪福音战士》|导演:庵野秀明/鹤卷和哉等,编剧:庵野秀明/榎户洋司等|首播:1995.10.4,单集片长:24 分钟,共 26 集]
- 标题行: write only the work title (normally
- Events →
[universal:|事件名称|简要说明] - Archival photos and artworks that must preserve their intrinsic proportions →
[origin:<URL>|图说第一行|图说第二行|...] - In both
[universal:]and[origin:], the first text field is automatically bold. Write plain text only; never add**around it. - Extended reading format:
[reading-book:书名|作者信息|译者信息|封面URL]— fields MUST be separated by|; last field = uploaded cover URL (empty if unavailable). - Each reading entry MUST be separated by a blank line. No two
[reading-book:...]lines should be adjacent without an empty line between them. - 作者字段 — 只写姓名,不写"著"。
著是默认情形,一律省略。多位作者用半角/分隔,不用、或,:[美]彼得·海斯勒/何伟。 - 编著加"编":编者、编著、主编的书,在姓名后空一格补
编,例如[日]日文研项目组 编、钱理群 编。这是唯一保留的著作方式标记。 - 国籍前缀只出现在译本上,标注跨语言关系,方括号与姓名之间不留空格。引用原版(未经翻译)时作者不加国籍。译本情形下作者与译者各按本人国籍标注,中国人一律省略:
- 中译本 → 作者
[日]实藤惠秀;译者是中国人,省略国籍,写谭汝谦、林启彦 译 - 外译外(非中译本)→ 作者与译者都不是中国人,两边都标:作者
[英]Barak Kushner,译者[日]井形彬 译 - 原版 →
四方田犬彦,不加国籍
- 中译本 → 作者
- 译者字段:
译者名 译,姓名与译之间空一格。多位译者用、分隔:谭汝谦、林启彦 译。非中国籍译者按上条加[国籍]前缀。引用原版时此字段留空。 - 人名写法:中译本用中译本署名的中文译名(
[美]约翰·W·道尔、[日]实藤惠秀);其余情形(外译外、原版)一律用本人原名,不用所引版本的音译或转写 —— 上例日译本封面署名是片假名「バラク・クシュナー」,条目仍写[英]Barak Kushner。 - 完整示例:
- 中文译本 →
[reading-book:中国人留学日本史|[日]实藤惠秀|谭汝谦、林启彦 译|http://.../weiwuming/xxxx.jpg] - 中文原著 →
[reading-book:韩国现代政治史|咸在凤||] - 中文编著 →
[reading-book:浮世通鉴:日本大众文化史|[日]日文研项目组 编|党蓓蓓 译|http://.../weiwuming/xxxx.jpg] - 外译外(英文书的日译本)→
[reading-book:思想戦:大日本帝国のプロパガンダ|[英]Barak Kushner|[日]井形彬 译|http://.../weiwuming/xxxx.jpg] - 外文原版(无中译本)→
[reading-book:日本映画は信頼できるか|四方田犬彦||]
- 中文译本 →
- 延伸阅读不写出版社:一律使用
[reading-book:书名|作者|译者|封面URL]。[reading-jpbook:]/[reading-enbook:]的第三字段是出版社,与本栏体例不符,不要在延伸阅读中使用(它们保留给正文内联书目)。 - 未有中译本的外文书:书名保留原文(日文写日文、英文写英文),译者字段留空。引用原版时作者不加
[国籍],例:[reading-book:日本映画は信頼できるか|四方田犬彦||];引用它在第三国的译本时按上条为作者与译者两侧都标注国籍。 - All searched data must be factual. If uncertain, report in
校对提醒.
Staff and Fixed Footer
- The last section of every article must contain two
[staff:...]entries:
1.[staff:作者姓名|编辑]— filled with the actual author name(s) from the source.
2.[staff:春生、|审校]— the 审校 (reviewer) always defaults to 春生、. - After the staff entries, every article must include the fixed follow section:
```
---[follow]
东亚视角 全球视野
寻找东亚论述的"虫洞"与"黑洞"
点击下图关注"谓无名"
---[/follow]
```
- This footer block is mandatory for all articles, regardless of whether the source contains it.
Workflow
-
Detect input type.
- For.docx, runpython scripts/extract_docx.py <file.docx>.
- For legacy.doc, use the same script. It detects the OLE container and tries LibreOffice conversion to.docxbefore extraction.
- For pasted text, analyze the text directly. -
Analyze structure.
- Preserve paragraph order from the extraction JSONcontentarray.
- Use style hints, heading levels, alignment, bold runs, tables, footnotes, endnotes, and image relationships only as formatting clues.
- Treat tables as source content. Convert simple tables to readable text blocks; if a table is structurally important, preserve rows in markdown table form.
- MinerU PDF sources — recover footnotes before declaring them lost:full.mddrops footnote contents, but the sibling*_content_list.jsonkeeps them aspage_footnoteblocks (in page order;ref_textblocks hold the bibliography). Collect them, separate the author-affiliation∗note, and restore lost entry numbers from page order. Seereferences/syntax_rules.md→ Notes. -
Apply editor syntax. Read
references/syntax_rules.mdwhen exact syntax is needed.
- Do not emit a main article title or author line above the article. Use the source title for<文章名>.md/.htmlfilenames only.
- 编者按: write ~500-char editorial summary/commentary with>>>(trailing space mandatory) on the same line as content start. It must be the first non-empty markdown content.
- Section heading:## 标题followed by---[dot](always bound together).
- Blockquote:> 原文.
- Notes:---[notes]...---[/notes]; note entries are single lines in^[N 内容]format (Arabic N; the editor auto-converts to circled ①–㊿). Inline references are^N— never raw HTML<sup>N</sup>. Details and pitfalls inreferences/syntax_rules.md→ Notes.
- Source note:---[note]...---[/note]. No extra---line before this block.
- Bio: after---[note], place---[bio-title:作者简介],[bio:原文],---[/bio], followed by translator bio when present. No extra---line before these blocks.
- Keyword blocks: apply the Selection & Listing Rules above; search with the available web tools, download toimages/, upload to the user's image host viascripts/upload_image.py, and insert[book:<URL>|...],[universal:<URL>|...], or[origin:<URL>|...]blocks at first mention. The first text field of both image syntaxes is plain text and auto-bold.
- Extended reading: 2–5 non-duplicate related books,---[reading-title:延伸阅读]...---[/reading]above staff. No extra---line before this block.
- Staff credit:[staff:作者姓名|编辑]+[staff:春生、|审校].
- Follow section: the fixed---[follow]...---[/follow]footer is mandatory. -
Handle images.
- Extracted Word image relationships are local package targets, not hosted URLs — never emit them as article image URLs.
- If the source text already contains a hosted image URL, download it toimages/(it will pass through upload unchanged if already public).
- Follow Image Download + Upload above; fill returned URLs into syntax blocks.
- At the end, report all downloaded images with their filenames, uploaded URLs, and corresponding keywords. -
Save the markdown deliverable as
<文章名>.mdin the project folder. -
Render the HTML deliverable (mandatory):
bash node <SKILL_ROOT>/scripts/render_html.js <文章名>.md --preview
- Produces<文章名>.html(WeChat paste-ready, inline-styled — identical to the editor's 复制 output) and<文章名>.preview.html(browser QA page with a 复制排版结果 button).
- The renderer loads the web editor and runs its ownpreprocessMarkdown → marked.parse → postprocessHtml → applyThemeToPreview → generateInlineStyledHtmlpipeline. Never hand-write or post-edit the .html; fix the markdown or editor and re-render.
- Editor lookup order:--editorarg → envWEIWUMING_EDITOR_HTML→~/.weiwuming/render.json(editor_html) → liveF:\py\tools.weiwuming.cn\index.html→ bundledassets/editor-index.htmlsnapshot → legacyF:\py\编辑器最终版\index.html. The bundled rootindex.htmlplusvendor/marked.min.jsis a directly openable copy of the same web editor.
- For WeChat, open<文章名>.preview.htmland click 复制排版结果; do not copy raw HTML source or rely on selecting part of the preview page. The button writes the exact generatedtext/htmlpayload, with a selection-copy fallback for restrictedfile://clipboard environments.
- Exit code must be 0. The renderer validates: the editor note is first, article modules are in strict order, all<img>are public http(s) URLs, every syntax block rendered, no unparsed syntax residue (e.g.---[,<<<), and>>>has its space. If it exits 1, fix the .md and re-render — do not deliver a failing pair.
- Re-render after ANY edit to the .md, so the two deliverables never diverge. Rendering is idempotent: same .md → byte-identical .html. -
Validate before delivery.
-render_html.jsexited 0 (this covers image URLs, block pairing, and syntax residue mechanically).
- No placeholder URLs or invented missing-data markers are present.
- Every filled image field is a real public URL returned by the user's image host throughupload_image.py(never a local path, never an invented URL); fields without a successful upload are empty.
- All downloaded images exist inimages/with correct naming.
- Syntax markers are paired:>>>/<<<,---[notes]/---[/notes],---[note]/---[/note],---[reading-title:]/---[/reading],---[bio-title:]/---[/bio].
-[universal:]and[origin:]contain at least URL + first line + second line; their first text field contains no Markdown**because the editor auto-bolds it. Use[origin:]only when the intrinsic image proportions must be preserved.
- Every person[universal:]card puts verified birth/death years immediately after the name; the description does not repeat them.
- Every movie/TV[universal:]card uses the bare work title (no海报suffix), lists both director and screenwriter on the second rendered line, and has a dedicated time field containing both release/premiere time and runtime. It omits synopsis/context by default; explicitly requested notes use a later|field.
- No extra---horizontal rule before---[note],---[bio-title:],---[reading-title:],---[toc], or---[notes]blocks.
- The article follows the exact structure order: 编者按 → 正文 → 目录(如有) → 注释(如有) →---[note]→ 作者简介 → 译者简介(如有) → 延伸阅读 → 两条 staff → 固定关注区.
- Every##heading is followed by---[dot].
- Notes/footnote format checks: (1) inline^Nreference count ==^[N …]entry count in---[notes]; (2) in the rendered HTML,footnote-itemdivs andfootnote-numspans both equal that count, with no gaps in the circled-number sequence; (3) zero<sup>tags and zero bare^数字left in the HTML. If the source had footnotes, every marker must have its recovered entry — no "footnotes lost" report whilepage_footnoteblocks still exist in the MinerU JSON.
- Punctuation normalization checks (OCR sources): no half-width, ; :followed by a space inside Chinese sentences (should be,;:); no smart quotes U+201C/U+201D in Chinese context (unify to the article's「」style, keep English quotes in English citations); no unclosed「without」; no empty parentheses( )from OCR-dropped years/terms (restore only verifiable values, otherwise report in 校对提醒). When doing exact-string replacements, diagnose actual char codes first (charCodeAt) — curly vs straight quotes look identical in output.
- Person blocks are substantive and unique (target 3–6; fewer is fine for short articles); reading list has 2–5 items and no duplicates with body books.
- 延伸阅读作者/译者字段格式:作者字段无著;[国籍]与姓名之间无空格;引用原版与中国籍人士无国籍前缀,外译外的作者与译者两侧都有;多作者用/而非、;编著保留编;译者字段形如姓名 译(多人用、分隔),引用原版时留空。
- Open<文章名>.preview.htmlor capture a browser screenshot. Check the opening,universalfixed-size cards,originintrinsic-proportion images, card covers, long poetry/table layouts, and footer; fix visible blank/broken cards or spacing errors and re-render. Use its copy button for the final WeChat paste test.
- Suspected typos, grammar, punctuation, and political/compliance issues are listed separately, not silently corrected.
Reporting Format
Return:
交付文件:
- 📄 `<文章名>.md` — 谓无名语法 markdown
- 📄 `<文章名>.html` — 微信粘贴版(render_html.js 校验通过 ✓)
- 👀 `<文章名>.preview.html` — 浏览器预览
编者按:约 NNN 字。
人物/书目选择(可替换,告诉我即可):
- [universal:] 鲁迅 — 正文第二节重点讨论其杂文观 → 照片源:Wikimedia Commons
- [book:] 浮世通鉴 — 文章主推书目 → 封面源:豆瓣
- 延伸阅读:拥抱战败(同主题战后史)、菊与刀(经典参照)…
图片处理结果:
- ✅ `images/book_书名.jpg` → 来源:豆瓣 → 已上传 `http://.../weiwuming/<hash>.jpg` → [book:<URL>|书名|...]
- ✅ `images/person_姓名.jpg` → 来源:Wikimedia Commons → 已上传 → [universal:<URL>|姓名|...]
- ⚠️ `images/book_书名.jpg` → 上传失败,图片字段留空
- ❌ <关键词> → 下载失败,未找到可用图片源
校对提醒:
- 未发现明显问题。
If issues exist, list them with source snippets and a concise reason:
校对提醒:
- 可能错别字:"...",建议核对是否应为 "..."。
- 标点疑点:"...",中英文标点混用,建议人工确认。
- 政治/合规风险:"...",建议人工复核表述是否符合发布要求。
- 人物信息存疑:<姓名> 生卒年在 Wikipedia 与 Kotobank 记载不一致,已采用 Kotobank。
- 图片下载失败:<关键词>,未找到可用图片源。
- 图床上传失败:`images/xxx.jpg`,语法块图片字段已留空;请确认当前图床后端可用后重跑 `scripts/upload_image.py`。
- 图床不可用:`upload_image.py` 退出码 2,请运行 `--check` 并检查 `~/.weiwuming/image-host.json`;PicGo 后端如尚未配置,可先运行 `setup_picgo.py --status`,PicGo Cloud 用户可在确认后运行 `--login`。
Word Extraction Notes
The bundled extractor adopts the minimax-docx approach:
- Detects file signature instead of trusting extensions.
- Treats
.docxas an OOXML ZIP package. - Converts
.docto.docxthrough LibreOffice when available. - Uses Python standard-library XML parsing instead of
python-docx. - Extracts paragraphs, style names, alignment, run bold/italic/size hints, tables, footnotes/endnotes, and image relationships.
If .doc conversion fails or LibreOffice is unavailable, ask the user for a clean .docx export.