Skip to main content

lark-doc-exporter

Export Feishu/Lark document URLs with synced blocks expanded into:

  • localized Markdown via feishu-docx
  • native Feishu PDF with AI-footer post-processing

Requirements

  • Python 3.14
  • lark-cli configured for the native PDF path
  • feishu-docx available for Markdown export

If you use uvx or uv tool install, uv can provision the required Python for the tool environment automatically.

Contract

lark-doc-exporter is now a native-only exporter:

  • inputs must be full document URLs
  • Markdown always comes from feishu-docx
  • PDF always comes from Feishu native export
  • --pdf-mode native remains accepted only as a compatibility shell

There is no rendered mode, theme selection, custom CSS support, or token-only input path.

Quick Start

uv tool install lark-doc-exporter
lark-doc-exporter \
  --doc "https://dynamia-ai.feishu.cn/wiki/BVXXwgzbZivjQZkr7jmcsGcinGh" \
  --output-dir exports/native \
  --formats markdown,pdf \
  --pdf-mode native

Environment Check

lark-doc-exporter doctor

doctor checks whether lark-cli is ready for native PDF and whether feishu-docx is ready for Markdown.

One-off Run

uvx lark-doc-exporter \
  --doc "https://dynamia-ai.feishu.cn/wiki/BVXXwgzbZivjQZkr7jmcsGcinGh" \
  --output-dir exports/native \
  --formats markdown,pdf \
  --pdf-mode native

Install As A Tool

lark-doc-exporter skill install --dry-run
lark-doc-exporter skill install

Auto mode installs the companion skill into every detected supported host:

  • Codex: ~/.agents/skills/lark-doc-exporter
  • Claude Code: ~/.claude/skills/lark-doc-exporter

Use --host codex, --host claude, or --host all to target specific hosts. --dry-run previews the install plan and target directories without writing files. Use --force only when you intentionally want to replace an existing unmanaged target directory.

Output

  • markdown writes the localized Markdown file into the output directory.
  • pdf writes the native Feishu PDF with footer post-processing.
  • images/ contains same-run localized image assets used by the Markdown.

For combined markdown,pdf runs, the JSON result keeps the native PDF metadata fields and includes both output paths.

Native PDF Mode

lark-doc-exporter \
  --doc "https://dynamia-ai.feishu.cn/wiki/BVXXwgzbZivjQZkr7jmcsGcinGh" \
  --output-dir exports/native \
  --formats pdf \
  --pdf-mode native

Native mode rules:

  • omitting --pdf-mode behaves the same as --pdf-mode native
  • any non-native --pdf-mode value is rejected
  • success states are removed and not_found
  • failure states emit warnings and keep <stem>.native-raw.pdf for inspection

Development

Use the Git URL or a local checkout only when you intentionally need unreleased code:

uvx --from git+https://github.com/spencercjh/lark-doc-exporter lark-doc-exporter doctor

git clone https://github.com/spencercjh/lark-doc-exporter
cd lark-doc-exporter
uv sync --python 3.14 --group dev
make fmt
make ci

# Optional runtime/environment check (not part of required CI)
uv run lark-doc-exporter doctor

Notes

  • when a temp doc is created for the native PDF stage, it is deleted by default after the export step
  • use --keep-temp-doc only when you need to inspect that intermediate document
  • Feishu image authcode URLs expire quickly, so image localization happens in the same run as the Markdown export

Metadata

Release files for lark-doc-exporter 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lark-doc-exporter 0.6.0
File Size Uploaded
lark_doc_exporter-0.6.0.tar.gz 39.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lark-doc-exporter 0.6.0
File Interpreter ABI Platform
lark_doc_exporter-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 67.8 kB

Release files / lark_doc_exporter-0.6.0.tar.gz

Download URL lark_doc_exporter-0.6.0.tar.gz
Size 39.9 kB
Tags Source
SHA-256 checksum
How to use checksums
153b4edce2fb6b6f75067cd131731b5a079575de08a79d7acf87ab721abba19d
BLAKE2b-256 checksum
How to use checksums
79129722445203c5db30f259583bd5928c5d526a6357c24cb983f5ff9d749006
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / lark_doc_exporter-0.6.0-py3-none-any.whl

Download URL lark_doc_exporter-0.6.0-py3-none-any.whl
Size 27.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4fe18dc9fda5ef95efbae566abdd1a9a5cde45ebc7eb9854e0986ee353e8121
BLAKE2b-256 checksum
How to use checksums
3144f217cb59848edec176a65b35c9cfcbc448583d52522a1c38beada7fb1782
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page