Online doc html
Skill codingSamss/all-my-ai-needs/platforms/codex/skills/online-doc-html
Export Markdown files to paste-friendly standalone HTML for online document editors. Use when the user wants to copy local Markdown content into an online document, reduce manual formatting work, preserve tables/code blocks/headings, convert SVG diagrams to PNG, embed images into HTML, or says "在线文档", "粘贴到在线文档", "Markdown 转 HTML", "图片复制不过去", "导出在线文档 HTML".From its SKILL.md
npx -y skills add codingSamss/all-my-ai-needs --skill online-doc-htmlAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 11 stars11 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.6 KB, 477 tokens by cl100k_base, as published. Nobody here has run it
Online Doc HTML
Overview
Use this skill to turn local Markdown into standalone HTML that can be opened in a browser, selected, copied, and pasted into online document editors with less formatting cleanup.
The default output is HTML only. Do not generate DOCX unless the user explicitly asks for it.
Workflow
- Identify the Markdown files the user wants to sync or copy.
- Prefer a repo-local export script if one already exists and is clearly maintained for that repo.
- Otherwise run the bundled script:
~/.codex/skills/online-doc-html/scripts/export_online_doc_html.sh --out build/online-doc-html <file1.md> <file2.md>
- Open the generated HTML file in a browser, select the article body, copy it, and paste into the online document editor.
- If images still fail to paste, treat it as an online editor clipboard/upload limitation. The next step is browser automation to insert or upload images, not more HTML tuning.
Bundled Script
Use scripts/export_online_doc_html.sh.
Behavior:
- Converts each Markdown file to standalone HTML via
pandoc. - Converts referenced
.svgimages to.pngwithrsvg-convertbefore HTML export. - Embeds images and CSS into the generated HTML with
pandoc --embed-resources. - Writes output to
build/online-doc-htmlby default. - Generates
targets.tsvwith source Markdown and output HTML paths. - Removes stale DOCX files from the output directory because DOCX is not the default path.
Dependencies:
- Required:
pandoc. - Required for SVG diagrams:
rsvg-convertfromlibrsvg.
On macOS:
brew install pandoc librsvg
Output Guidance
Tell the user:
- Which HTML files were generated.
- Whether SVG references were fully replaced by PNG images.
- Whether any image references could not be resolved.
- That no online document was modified unless browser automation or API update was explicitly requested and confirmed.
Guardrails
- Do not overwrite or save online documents without explicit user confirmation.
- Do not reverse-engineer private save APIs as the first approach. Prefer paste-friendly HTML first.
- Keep generated artifacts in ignored build/output directories when working inside a repo.
What ships with it: 3 files
4.7 KB alongside SKILL.md, 1 of them executable
agents/
- openai.yaml248 B
scripts/
- export_online_doc_html.shruns4.0 KB
- runtime.yaml483 B