2025-03-25 02:03:10 +00:00
import { App , getLanguage } from "obsidian"
export const folderName = 'ClipperMaster'
export const upsertFile = async ( app : App , fileName : string , content : string ) = > {
const folder = await app . vault . getFolderByPath ( folderName )
if ( ! folder ) {
await app . vault . createFolder ( folderName )
}
const filePath = ` ${ folderName } / ${ fileName } .md `
const file = await app . vault . getFileByPath ( filePath )
if ( file ) {
await app . vault . modify ( file , content )
} else {
await app . vault . create ( filePath , content )
}
}
const language = getLanguage ( )
export const isZh = language . startsWith ( 'zh' )
const getTexts = ( ) = > {
if ( isZh ) {
return {
listeningPort : '监听端口号' ,
desc : 'HTTP请求的端口号' ,
enterPort : '输入端口号' ,
error : '必须是一个有效的端口号 (1 - 65535)' ,
welcome : '欢迎使用 ClipperMaster for Obsidian' ,
2025-04-11 08:36:43 +00:00
fileSaved : '🎉 已保存到:' ,
guidanceButton : '使用说明' ,
guidanceDesc : '点击打开使用说明页面' ,
openGuidance : '打开说明'
2025-03-25 02:03:10 +00:00
}
}
return {
listeningPort : 'Listening Port' ,
desc : 'Port to listen for HTTP requests' ,
enterPort : 'Enter Port Number' ,
error : 'Must be a valid port number (1 - 65535)' ,
welcome : 'Welcome to ClipperMaster for Obsidian' ,
2025-04-11 08:36:43 +00:00
fileSaved : '🎉 File saved to:' ,
guidanceButton : 'Guidance' ,
guidanceDesc : 'Click to open guidance page' ,
openGuidance : 'Open Guidance'
2025-03-25 02:03:10 +00:00
}
}
export const texts = getTexts ( )
export const Welcome = isZh ? ` # ClipperMaster for Obsidian
[ ClipperMaster ] ( https : //clippermaster.com) 是一款强大的 Chrome 浏览器扩展,能让你轻松从网页中提取结构化数据,构建你的专属信息数据库。
! [ ] ( https : //clippermaster.com/clippermaster-intro.png)
# ClipperMaster Obsidian 插 件 使 用 指 南
* * 让 网 页 内 容 一 键 成 为 你 的 知 识 资 产 * *
ClipperMaster Obsidian 插 件 是 * * ClipperMaster Chrome 插 件 * * 的 完 美 搭 档 , 帮 助 你 将 从 网 页 中 提 取 的 结 构 化 信 息 无 缝 发 送 并 存 储 到 Obsidian , 打 造 自 动 化 知 识 管 理 流 水 线 。
-- -
# # * * 插 件 作 用 * *
- * * 一 键 存 储 * * : 将 从 网 页 提 取 的 文 本 、 图 片 等 内 容 , 转 换 为 Markdown 格 式 并 保 存 到 Obsidian 。
- * * 结 构 化 存 储 * * : 支 持 模 板 化 存 储 、 让 内 容 井 井 有 条 。
-- -
# # * * 安 装 步 骤 * *
# # # * * 1 . 安 装 ClipperMaster Chrome 插 件 * *
如 果 你 还 没 有 安 装 Chrome 插 件 , 请 先 前 往 [ Chrome 商 店 ] ( https : //chromewebstore.google.com/detail/clippermaster/bdilooeboaoifijdnpomfoinefbokjlj) 安装。
# # # * * 2 . 安 装 ClipperMaster Obsidian 插 件 * *
1 . 打 开 Obsidian , 进 入 * * 设 置 * * → * * 社 区 插 件 * * 。
2 . 点 击 * * 浏 览 * * , 搜 索 * * ClipperMaster * * 。
3 . 找 到 插 件 后 , 点 击 * * 安 装 * * , 然 后 * * 启 用 * * 。
4 . 在 插 件 设 置 中 , 获 取 或 者 修 改 * * Port * * 。
# # # * * 3 . 配 置 Chrome 插 件 * *
1 . 打 开 ClipperMaster Chrome 插 件 , 进 入 * * Options * * → * * 自 动 化 * * → * * 添 加 自 动 化 * * → 发 送 到 * * Obsidian * * 。
2 . 输 入 Obsidian 端 设 置 的 * * Port * * 。
-- -
# # * * 常 见 问 题 * *
# # # * * 1 . 插 件 支 持 哪 些 网 页 内 容 ? * *
- 文 本 、 链 接 、 图 片 等 均 可 提 取 并 存 储 。
# # # * * 2 . 是 否 需 要 付 费 ? * *
- * * 发 送 到 Obsidian * * 这 项 功 能 完 全 免 费
# # # * * 3 . 如 何 获 取 技 术 支 持 ? * *
- 访 问 [ ClipperMaster 官 网 ] ( https : //clippermaster.com) 或者 [给我们发送邮件](mailto:tony@clippermaster.com)。
-- -
# # * * 立 即 体 验 * *
点 击 下 方 链 接 , 开 始 你 的 知 识 管 理 革 命 :
- [ 安 装 ClipperMaster Chrome 插 件 ] ( https : //chromewebstore.google.com/detail/clippermaster/bdilooeboaoifijdnpomfoinefbokjlj)
- 安 装 ClipperMaster Obsidian 插 件
-- -
` : ` # ClipperMaster for Obsidian
[ ClipperMaster ] ( https : //clippermaster.com) is a powerful Chrome extension that empowers you to effortlessly extract structured data from web pages, building your personalized information database.
! [ ] ( https : //clippermaster.com/clippermaster-intro.png)
# ClipperMaster Obsidian Plugin User Guide
* * Turn Web Content into Your Knowledge Assets with One Click * *
The ClipperMaster Obsidian plugin is the perfect companion to the * * ClipperMaster Chrome plugin * * , helping you seamlessly send and store structured information extracted from web pages to Obsidian , creating an automated knowledge management pipeline .
-- -
# # * * Plugin Functionality * *
- * * One - Click Storage * * : Convert text , images , and other content extracted from web pages into Markdown format and save them to Obsidian .
- * * Structured Storage * * : Supports templated storage , keeping your content organized .
-- -
# # * * Installation Steps * *
# # # * * 1 . Install the ClipperMaster Chrome Plugin * *
If not already installed , get the Chrome plugin from the [ Chrome Web Store ] ( https : //chromewebstore.google.com/detail/clippermaster/bdilooeboaoifijdnpomfoinefbokjlj).
# # # * * 2 . Install the ClipperMaster Obsidian Plugin * *
1 . Open Obsidian , go to * * Settings * * → * * Community plugins * * .
2 . Click * * Browse * * , search for * * ClipperMaster * * .
3 . After finding the plugin , click * * Install * * , then * * Enable * * .
4 . In the plugin settings , get or modify the * * Port * * .
# # # * * 3 . Configure the Chrome Plugin * *
1 . Open the ClipperMaster Chrome plugin , go to * * Options * * → * * Automations * * → * * Add Automation * * → Send to * * Obsidian * * .
2 . Enter the * * Port * * set in Obsidian .
-- -
# # * * Frequently Asked Questions * *
# # # * * 1 . What web content does the plugin support ? * *
- Text , links , images , etc . , can be extracted and stored .
# # # * * 2 . Is there a fee ? * *
- The * * Send to Obsidian * * feature is completely free .
# # # * * 3 . How do I get technical support ? * *
- Visit the [ ClipperMaster Official Website ] ( https : //clippermaster.com) or [send us an email](mailto:tony@clippermaster.com).
-- -
# # * * Experience It Now * *
Click the links below to start your knowledge management revolution :
- [ Install ClipperMaster Chrome Plugin ] ( https : //chromewebstore.google.com/detail/clippermaster/bdilooeboaoifijdnpomfoinefbokjlj)
- Install ClipperMaster Obsidian Plugin
-- - `