Export Linux.do topics to Markdown with automatic flat, nest, and main-post-only modes.
Versione datata
一个用于将 Linux.do 论坛帖子导出为 Markdown 文件的 Tampermonkey/Violentmonkey 用户脚本。
脚本支持自动识别 Linux.do 的两种帖子链接模式:
https://linux.do/t/topic/{id}:按 flat 模式导出,楼层线性排列。https://linux.do/n/topic/{id}:按 nest 模式导出,根据回复关系生成嵌套结构。.md 文件发布到 Greasy Fork 后,直接打开脚本页面并点击安装即可。脚本已使用 Greasy Fork 可读取的用户脚本元数据格式:
@name / @name:zh-CN / @name:en@description / @description:zh-CN / @description:en@license MIT@homepageURL@supportURL导出 MD 按钮。进入 Linux.do 帖子页面后,点击右下角的 导出 MD。
弹窗中可以选择导出范围:
全部回复:导出整个帖子。只导出主帖:只导出 1 楼主帖。自定义楼层:输入楼层范围,例如:
1-501,3,8-12导出的文件名格式:
linuxdo-{topicId}-{flat|nest|post}-{title}.md
当链接为 /t/topic/{id} 时,脚本按楼层顺序导出:
## #1 作者
正文
## #2 作者
正文
当链接为 /n/topic/{id} 时,脚本会根据 reply_to_post_number 生成回复树:
## #1 楼主
正文
### #2 回复者
回复正文
选择 只导出主帖 时,只导出 1 楼内容,不导出回复。即使当前页面是 /n/topic/,也会按主帖导出。
MIT