README file from
GithubHi there 👋 I'm keyoneway No‑code builder empowered by AI. Explore possibilities, build practical tools, and create real value in the AI era.
AI赋能的零代码创造者|探索更多可能,打造实用工具,在AI时代创造真实价值
🛠 Featured Project
- image‑relinker|Obsidian断图链接修复小工具,一键批量修复笔记中失效的图片引用
Image Relinker
Preview and repair broken image embeds in the active note or every Markdown note in a selected folder, using unique filename matches from a selected attachment folder.
Features
- Scans image embeds in the active Markdown note or all Markdown notes in a selected folder (including subfolders).
- Lets you select the attachment folder to search.
- Adds a Ribbon entry alongside Command Palette and file-menu access.
- Previews grouped repairs before changing any note.
- Updates only unique file‑name matches; missing and ambiguous matches are left unchanged.
Install
In Obsidian, open Settings → Community plugins → Browse, search for Image Relinker, install it, and enable it.
Use
- Click the Image Relinker Ribbon icon, run the command from
Ctrl+P, or right-click a Markdown file. - Choose Current note to repair one note, or Notes in folder to process all Markdown notes in a selected folder and its subfolders.
- Select the attachment folder containing the image files.
- Scan, review the grouped preview, and apply the safe repairs.
Folder mode never writes automatically: only unique filename matches are repairable; missing and ambiguous matches are left unchanged.
Development
npm install
npm test
npm run check
npm run build
中文说明
适用场景
当 Markdown 笔记从桌面或其他位置复制到 Obsidian Vault 后,原图片链接可能会失效。例如,笔记中的图片原本位于桌面文件夹,后来图片被统一放入 Vault 的 90‑Attachments 文件夹。本插件会在你选定的附件目录中按文件名寻找图片,并将当前笔记中的失效图片链接替换为 Obsidian 可识别的嵌入链接。
使用方法
- 将图片复制到 Vault 内的附件目录,例如
90‑Attachments。 - 打开需要修复的 Markdown 笔记。
- 按
Ctrl+P打开命令面板,运行 Image Relinker: 修复当前笔记图片. - 在弹窗中选择保存图片的附件目录;默认会读取 Obsidian 的附件目录设置。
- 点击 "扫描并预览",检查 "可修复" 列表。
- 确认无误后,点击 "应用修复".
文件夹批量修复
- 点击左侧功能区的 Image Relinker 图片图标;也可通过命令面板或 Markdown 文件右键菜单打开。
- 将修复范围切换为「笔记文件夹」,选择需要处理的文章文件夹和图片附件目录。
- 点击「扫描并预览」;插件会递归扫描该文件夹内的全部 Markdown 笔记,并按笔记分组展示结果。
- 仅在确认预览后点击「应用修复」。扫描后被手动改动的笔记会被跳过,不会覆盖内容。
安全规则
- 仅修改当前笔记或你明确选择的笔记文件夹内的笔记,不会移动、删除或重命名图片文件。
- 只有当所选目录内存在唯一同名图片时才会自动修复。
- 找不到文件或存在多个同名文件时,插件不会修改该链接。
- 扫描阶段不会改动笔记;只有点击 "应用修复" 后才会写入。
无法自动修复时
请确认图片已放入你选择的附件目录,且文件名与笔记中的链接文件名一致。若目录中有多个同名图片,请保留唯一的目标文件或手动修改链接后重新扫描。