feat:add MrDoc export functionality add configuration
增加导出到觅思文档(MrDoc)的功能。
MrDoc 是一个开源的在线知识库系统,项目地址为 https://github.com/zmister2016/MrDoc 。
其配置方式和使用方式与「思源笔记」类似,填入觅思文档的URL、用户Token和文集ID即配置完成,导出行为则是通过「用户Token」的 API 接口在觅思文档中新建一篇 Markdown 文档。
配置界面
用户Token的获取
Summary by Sourcery
Add functionality to export content to the MrDoc knowledge base system.
New Features:
- Implement export logic for sending Markdown content to a configured MrDoc instance via its API.
- Add a settings page for configuring the MrDoc API URL, authentication token, and target Box ID.
- Integrate the MrDoc export option into message and topic context menus.
- Add an option in settings to show or hide the MrDoc export menu item.
@sourcery-ai review
Reviewer's Guide by Sourcery
This pull request adds functionality to export Markdown content to MrDoc, an open-source online knowledge base system. The implementation involves adding configuration settings for the MrDoc API URL, User Token, and Collection ID, similar to the existing Siyuan integration. The export process uses API calls to check the connection and create new Markdown documents in the specified MrDoc collection.
No diagrams generated as the changes look simple and do not need a visual representation.
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Implement the core logic for exporting Markdown content to MrDoc. |
|
src/renderer/src/utils/export.ts |
| Add state management and initial settings for MrDoc configuration. |
|
src/renderer/src/store/settings.ts |
| Create and integrate the MrDoc settings configuration interface. |
|
src/renderer/src/pages/settings/DataSettings/MrdocSettings.tsxsrc/renderer/src/pages/settings/DataSettings/DataSettings.tsx |
| Integrate the MrDoc export functionality into message and topic context menus and add a settings toggle. |
|
src/renderer/src/pages/home/Messages/MessageMenubar.tsxsrc/renderer/src/pages/home/Tabs/TopicsTab.tsxsrc/renderer/src/pages/settings/DataSettings/ExportMenuSettings.tsx |
| Add localization strings for MrDoc features across supported languages. |
|
src/renderer/src/i18n/locales/en-us.jsonsrc/renderer/src/i18n/locales/ja-jp.jsonsrc/renderer/src/i18n/locales/ru-ru.jsonsrc/renderer/src/i18n/locales/zh-cn.jsonsrc/renderer/src/i18n/locales/zh-tw.json |
Tips and commands
Interacting with Sourcery
-
Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
-
Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with
@sourcery-ai issueto create an issue from it. -
Generate a pull request title: Write
@sourcery-aianywhere in the pull request title to generate a title at any time. You can also comment@sourcery-ai titleon the pull request to (re-)generate the title at any time. -
Generate a pull request summary: Write
@sourcery-ai summaryanywhere in the pull request body to generate a PR summary at any time exactly where you want it. You can also comment@sourcery-ai summaryon the pull request to (re-)generate the summary at any time. -
Generate reviewer's guide: Comment
@sourcery-ai guideon the pull request to (re-)generate the reviewer's guide at any time. -
Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the pull request to resolve all Sourcery comments. Useful if you've already addressed all the comments and don't want to see them anymore. -
Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull request to dismiss all existing Sourcery reviews. Especially useful if you want to start fresh with a new review - don't forget to comment@sourcery-ai reviewto trigger a new review!
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.