Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Aug 30, 2023
1 parent 887d68e commit 5033b0a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Feishu Pages

Generate Feishu Wiki into a markdown pages for work with static page generators.
导出飞书知识库,并按相同目录结构生成 [Static Page Generator](https://www.google.com/search?q=Static+Page+Generator) 支持 Markdown 文件组织方式,用于发布为静态网站。

## Features

- [feishu-docx](https://github.com/longbridgeapp/feishu-pages/tree/main/feishu-docx) - 支持将飞书新版文档 Docx 转换为 Markdown 或其他格式(目前只支持 Markdown)
- 目录结构组织
- 图片下载
- 与 GitHub Actions 结合

## Feishu Permissions

Expand Down
3 changes: 2 additions & 1 deletion feishu-pages/src/doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ export const fetchDocBody = async (document_id: string) => {
payload,
options
)) {
await requestWait();

data.items?.forEach((item) => {
doc.blocks.push(item);
});
await requestWait();
}

const render = new MarkdownRenderer(doc as any);
Expand Down
4 changes: 1 addition & 3 deletions feishu-pages/src/wiki.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ export const fetchAllDocs = async (
};
const options = withTenantToken(feishuConfig.tenantAccessToken);

console.log('---- options', options);

for await (const result of await feishuClient.wiki.spaceNode.listWithIterator(
payload,
options
)) {
await new Promise((resolve) => setTimeout(resolve, 300));
await requestWait();
const { items = [] } = result;

items
Expand Down

0 comments on commit 5033b0a

Please sign in to comment.