Skip to main content

Export Feishu/Lark document URLs to Markdown and native PDF

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lark_doc_exporter-0.6.0.tar.gz (39.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lark_doc_exporter-0.6.0-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file lark_doc_exporter-0.6.0.tar.gz.

File metadata

  • Download URL: lark_doc_exporter-0.6.0.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lark_doc_exporter-0.6.0.tar.gz
Algorithm Hash digest
SHA256 153b4edce2fb6b6f75067cd131731b5a079575de08a79d7acf87ab721abba19d
MD5 855cdd6823f375a641ba35da540a9f1e
BLAKE2b-256 79129722445203c5db30f259583bd5928c5d526a6357c24cb983f5ff9d749006

See more details on using hashes here.

Provenance

The following attestation bundles were made for lark_doc_exporter-0.6.0.tar.gz:

Publisher: publish-pypi.yml on spencercjh/lark-doc-exporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lark_doc_exporter-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lark_doc_exporter-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4fe18dc9fda5ef95efbae566abdd1a9a5cde45ebc7eb9854e0986ee353e8121
MD5 a4fe80be666aa25b427a3c7a5ff649de
BLAKE2b-256 3144f217cb59848edec176a65b35c9cfcbc448583d52522a1c38beada7fb1782

See more details on using hashes here.

Provenance

The following attestation bundles were made for lark_doc_exporter-0.6.0-py3-none-any.whl:

Publisher: publish-pypi.yml on spencercjh/lark-doc-exporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page