topic-bookmarks-reorganizer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTopic Bookmarks Reorganizer
主题书签整理工具
Reorganize one topic folder from a browser bookmarks export into a cleaner importable file.
将浏览器书签导出文件中的单个主题文件夹重新整理为更简洁的可导入文件。
When to Use
使用场景
Use this skill when the user asks for one or more of these tasks:
- Analyze one bookmarks export file and find a user-specified topic folder
- Re-classify links and subfolders under that topic
- Remove duplicate links by URL
- Output a new HTML file that can be imported into a browser
- Keep only the target topic folder in the output
当用户提出以下一项或多项需求时,可使用本技能:
- 分析书签导出文件并找到用户指定的主题文件夹
- 重新分类该主题下的链接和子文件夹
- 按URL移除重复链接
- 输出可导入浏览器的新HTML文件
- 输出结果中仅保留目标主题文件夹
Do not use
不适用场景
Do not use this skill when:
- The input is not a bookmarks export HTML file
- The user only wants manual writing help with no file processing
- The user asks for unrelated JSON/PDF/Docx transformations
在以下情况请勿使用本技能:
- 输入文件并非书签导出HTML文件
- 用户仅需要手动写作帮助,无需文件处理
- 用户要求进行无关的JSON/PDF/Docx格式转换
Instructions
操作步骤
- Ask for required input:
- Export file path
- Target topic folder name
- Output file path
- Run the script in report mode first:
bash
python3 scripts/reorganize_topic_bookmarks.py \
--input /path/to/bookmarks.html \
--output /tmp/topic-preview.html \
--topic-folder "<topic-folder-name>" \
--mode auto \
--lang en \
--report /tmp/topic-report.json \
--print-report- Confirm final options with user only if needed:
- for automatic strategy selection
--mode auto - for generic strategy
--mode generic - to keep duplicate URLs
--no-dedupe-url
- Generate final output:
bash
python3 scripts/reorganize_topic_bookmarks.py \
--input /path/to/bookmarks.html \
--output /path/to/topic-bookmarks-reorganized.html \
--topic-folder "<topic-folder-name>" \
--mode auto \
--lang en- Validate and report:
- Confirm output file exists
- Report input links, output links, and removed duplicate count
- Confirm output contains exactly one top-level folder: the target topic
- 请求必要的输入信息:
- 导出文件路径
- 目标主题文件夹名称
- 输出文件路径
- 首先以报告模式运行脚本:
bash
python3 scripts/reorganize_topic_bookmarks.py \
--input /path/to/bookmarks.html \
--output /tmp/topic-preview.html \
--topic-folder "<topic-folder-name>" \
--mode auto \
--lang en \
--report /tmp/topic-report.json \
--print-report- 仅在需要时与用户确认最终选项:
- 用于自动选择策略
--mode auto - 用于通用策略
--mode generic - 用于保留重复URL
--no-dedupe-url
- 生成最终输出:
bash
python3 scripts/reorganize_topic_bookmarks.py \
--input /path/to/bookmarks.html \
--output /path/to/topic-bookmarks-reorganized.html \
--topic-folder "<topic-folder-name>" \
--mode auto \
--lang en- 验证并报告:
- 确认输出文件存在
- 报告输入链接数、输出链接数以及移除的重复链接数量
- 确认输出内容仅包含一个顶级文件夹:目标主题
Output Expectations
输出要求
- Output format is Netscape bookmarks HTML and is browser-importable
- Output contains only the target topic folder
- Links keep original attributes (for example add-date/icon)
<A ...> - Folder structure is reorganized into high-level categories
- 输出格式为Netscape书签HTML,可导入浏览器
- 输出内容仅包含目标主题文件夹
- 链接保留原始属性(例如添加日期/图标)
<A ...> - 文件夹结构将重新组织为高级分类