Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[功能]: 导出对话记录到思源笔记 #3786

Closed
4 tasks done
frostime opened this issue Mar 22, 2025 · 1 comment · Fixed by #3845
Closed
4 tasks done

[功能]: 导出对话记录到思源笔记 #3786

frostime opened this issue Mar 22, 2025 · 1 comment · Fixed by #3845
Labels
discussion Needs or features that can be discussed enhancement New feature or request

Comments

@frostime
Copy link

提交前检查

  • 我理解 Issue 是用于反馈和解决问题的,而非吐槽评论区,将尽可能提供更多信息帮助问题解决。
  • 我已经查看了置顶 Issue 并搜索了现有的 开放Issue已关闭Issue,没有找到类似的建议。
  • 我填写了简短且清晰明确的标题,以便开发者在翻阅 Issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等。
  • 最新的 Cherry Studio 版本没有实现我所提出的功能。

平台

Windows

版本

v1.1.8

您的功能建议是否与某个问题/issue相关?

增加导出平台——思源笔记。

思源提供了丰富的网络 API,可以直接通过网络 API 创建文档等;例如官方自己实现的浏览器上的网页保存插件,就是调用后端 API。

请描述您希望实现的解决方案

给出一个参考的实现方法:

需要添加的用户配置:

  1. 思源的内核 URL,本地一般是 http://127.0.0.1:6806/
  2. 思源的 API Key,需要用户填写
  3. 导出的笔记本 ID, boxID
  4. 导出的文档根目录路径, rootHpath,例如 /CherryStudio

导出单个对话到思源笔记文档的大致实现流程:

  1. 将对话格式化为一个 Markdown 文本 string

  2. 获取用户设置思源的配置信息

  3. 调用内核 API /api/filetree/getIDsByHPath 检查 rootHpath 是否存在

    1. 如果存在,获取其文档 ID root_id
    2. 如果不存在,调用内核 API /api/filetree/createDocWithMd 创建 rootHpath 对应的文档
  4. 调用内核 API /api/filetree/createDocWithMd 创建对话内容的导出文档

请描述您考虑过的其他方案

No response

其他补充信息

参考:

https://github.com/siyuan-note/siyuan/blob/master/API_zh_CN.md

https://github.com/siyuan-note/siyuan-chrome

@frostime frostime added the enhancement New feature or request label Mar 22, 2025
@ousugo ousugo added the discussion Needs or features that can be discussed label Mar 22, 2025
@deadmau5v
Copy link
Contributor

#3845

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Needs or features that can be discussed enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants