SuperAPI AI Directory

soia-pkm-transform-obsidian-pdf

Office & productivity

View repository

Updated 10-16 08:46

About this skill

soia-pkm-transform-obsidian-pdf

Export archived or specified Markdown/vault articles to PDF, outputting to the same directory as the source file (or a user-specified directory).

It is soia-pkm-transform an independent skill of the PDF branch, connecting with clip-* .

Customer-readable description

What this skill can do

Export Markdown articles or archived vault notes to PDF, using Obsidian's native export (Creator: Chromium / Producer: Skia/PDF) to ensure correct Chinese rendering.

Customer wants The skill will do Customer can see
Complete the work covered by this skill Read the article, invoke Obsidian export, or fall back to local rendering PDF path, page count, file size
Missing Obsidian / vault Suggest fallback options (pandoc / weasyprint) Fallback description and commands
Execution complete Verify the PDF opens and the page count is reasonable Completion receipt + verification result

How the customer uses it

  1. Specify the source: archived note path in the vault / X URL / web URL / local Markdown.
  2. Optional: specify the output directory (defaults to the same directory as the source file).
  3. For URL sources, first go through soia-pkm-clip-* archiving, then perform the PDF export.

Dependencies and installation

Install this skill:

claude plugin marketplace add soia-team/soia-open-skills
claude plugin install soia-pkm-vault@soia

When only this skill is needed, the npx route can be used. Note that the skill will land in the shared true source ~/.agents/skills; if the plugin is also installed, the same skill will have two indexes and drift separately, so it is recommended to choose one of the two:

npx skills add soia-team/soia-open-pkm-vault-skills -g -a '*' -s soia-pkm-transform-obsidian-pdf -y
  • Strong dependencies: Obsidian (articles in the vault) or pandoc/weasyprint (fallback outside the vault)
  • Optional:pdfinfo、pdftoppm(for verification)

Private configuration is placed in ~/.config/soia-skills/soia-pkm-transform-obsidian-pdf/config.yml, and can be overridden with SOIA_PKM_TRANSFORM_OBSIDIAN_PDF_CONFIG_FILE .

WorkBuddy 's loading unit is role-based experts rather than plugins,npx skills add -a '*' cannot cover it and it needs to be installed separately, see docs/install/workbuddy.md。

Logs and completion receipt

完成:<一句话说明>。

日志摘要:
- source: <路径或 URL>
- provider: obsidian-native | pandoc | weasyprint
- output: <PDF 完整路径>
- pages: <页数>
- size: <文件大小>

验证:
- pdfinfo 确认页数、Creator、Producer
- 必要时渲染首页确认中文正常

问题与下一步:
- <无 / 降级原因 / 建议>

Boundaries

  • Source is a URL → first call soia-pkm-clip-* to archive as vault Markdown, then export PDF.
  • Source is local Markdown and not in the vault → fallback: pandoc → weasyprint → report failure.
  • Does not rewrite content, only performs format conversion (preserve mode).
  • The output directory defaults to the same directory as the source file; articles outside the vault are output to outputs/transform/<YYYY>/<stem>/。

Workflow

  1. Confirm the source (in vault / URL / local file).
  2. URL → soia-pkm-clip-* → obtain the vault Markdown path.
  3. Article in vault → open via Obsidian URI → File > 导出 PDF(osascript automation, refer to references/provider-soia-local.md)。
  4. Confirm the save path and move to the target directory.
  5. Acceptance:pdfinfo confirm page count > 0, Creator/Producer, and file is non-empty; if necessary, render the first page to visually inspect Chinese. The formal PDF of an article in the vault must satisfy Creator: Chromium or Producer: Skia/PDF;wkhtmltopdf, Qt, pandoc, etc. only count as fallback outputs.
  6. Receipt.

Acceptance gates (excerpted from quality-gates.md)

  • File exists and is non-empty (> 10KB)
  • pdfinfo Readable, Pages ≥ 1
  • Creator: Chromium or Producer: Skia/PDF (Obsidian export markers)
  • First page visual check: Chinese renders correctly, no garbled text, no all-black pages

See PDF-QUALITY-GATES.md。 references/provider-soia-local.md。