Export Feishu/Lark docs with synced blocks to Markdown and themeable PDF
Project description
lark-doc-exporter
Export Feishu/Lark docs with synced blocks expanded into:
- Markdown with localized images
- Themeable locally rendered PDF
The PDF path deliberately avoids the Feishu docs_ai -> export pdf route so the
final file does not include the AI disclaimer injected by that server-side path.
Requirements
lark-cliconfigured with a user session- Python 3.14
- A working Chrome/Chromium runtime, or the ability to install one with
uvx --from playwright playwright install chromium
If you use uvx / uv tool install, uv can provision the required Python for
the tool environment automatically.
Quick Start
uv tool install lark-doc-exporter
lark-doc-exporter doctor
If Chromium is missing, prepare it once:
uvx --from playwright playwright install chromium
Then run an export:
lark-doc-exporter \
--doc "https://dynamia-ai.feishu.cn/wiki/WEgBwqGYOiBoQikRzjncvJDonAg" \
--output-dir exports/demo \
--formats markdown,pdf \
--theme default
One-off Run
If you do not want a persistent tool install:
uvx lark-doc-exporter \
--doc "https://dynamia-ai.feishu.cn/wiki/WEgBwqGYOiBoQikRzjncvJDonAg" \
--output-dir exports/demo \
--formats markdown,pdf \
--theme default
Install As A Tool
After installing the released package, companion-skill operations stay the same:
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.
Chromium Setup
doctorreports whether bothlark-cliand Chromium are ready.- If you already have a browser binary, you can point the exporter at it with
LARK_DOC_EXPORTER_CHROMIUM=/path/to/chromium. - If
LARK_DOC_EXPORTER_CHROMIUMis set to a missing path, the command fails explicitly instead of silently falling back.
Output
markdownkeeps the localized Markdown file in the output directory.pdfis rendered locally from the localized Markdown via HTML/CSS + Chromium.images/contains same-run localized image assets used by the Markdown/PDF.
Themes
Built-in themes:
defaultcompany
You can also layer custom CSS on top:
lark-doc-exporter \
--doc "https://dynamia-ai.feishu.cn/wiki/WEgBwqGYOiBoQikRzjncvJDonAg" \
--output-dir exports/company \
--formats pdf \
--theme company \
--css /path/to/your-company-print.css
Development / Unreleased
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
- The current implementation still uses a temporary Feishu doc to translate the expanded XML into fresh Markdown.
- The temporary doc is deleted by default after the Markdown export step. Use
--keep-temp-doconly when you need to inspect that intermediate document. - Feishu image
authcodeURLs 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lark_doc_exporter-0.2.0.tar.gz.
File metadata
- Download URL: lark_doc_exporter-0.2.0.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84cc8aca80983da038db77b759a14922bb91849635e61e7924d863efb60ddc54
|
|
| MD5 |
369ae4e4f30d99037c461f2feb08940d
|
|
| BLAKE2b-256 |
6ff8ba7ba3c4ee2ec88c60f1649408210bb4cde450a9583205bdb6a544f1a90e
|
Provenance
The following attestation bundles were made for lark_doc_exporter-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on spencercjh/lark-doc-exporter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lark_doc_exporter-0.2.0.tar.gz -
Subject digest:
84cc8aca80983da038db77b759a14922bb91849635e61e7924d863efb60ddc54 - Sigstore transparency entry: 2008256594
- Sigstore integration time:
-
Permalink:
spencercjh/lark-doc-exporter@dc15d68a5c7d6e900e421ce099e973a9e64f112a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/spencercjh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@dc15d68a5c7d6e900e421ce099e973a9e64f112a -
Trigger Event:
push
-
Statement type:
File details
Details for the file lark_doc_exporter-0.2.0-py3-none-any.whl.
File metadata
- Download URL: lark_doc_exporter-0.2.0-py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8c802b29ee324a8e6e3274ae7dd33e10aae3ad2652665971fbbe11ba1d1fe5a
|
|
| MD5 |
eb042aaaf0b772d6d0b018e05850e3ad
|
|
| BLAKE2b-256 |
619a5a7ec47d796f75bd28a6e39da4ff8e913f6fa04cab4a84daa1dd83ef875d
|
Provenance
The following attestation bundles were made for lark_doc_exporter-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on spencercjh/lark-doc-exporter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lark_doc_exporter-0.2.0-py3-none-any.whl -
Subject digest:
d8c802b29ee324a8e6e3274ae7dd33e10aae3ad2652665971fbbe11ba1d1fe5a - Sigstore transparency entry: 2008256753
- Sigstore integration time:
-
Permalink:
spencercjh/lark-doc-exporter@dc15d68a5c7d6e900e421ce099e973a9e64f112a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/spencercjh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@dc15d68a5c7d6e900e421ce099e973a9e64f112a -
Trigger Event:
push
-
Statement type: