MCPcopy Create free account

hub / github.com/2234839/siyuan-notes-skill / functions

Functions16 in github.com/2234839/siyuan-notes-skill

↓ 5 callersFunctioncheckEnvironmentConfig
* 检查环境配置是否完整 * @returns {boolean} 配置是否完整
index.js:76
↓ 4 callersFunctionexecuteSiyuanQuery
* 执行思源笔记SQL查询 (返回精简后的原始数据) * @param {string} sqlQuery - SQL查询语句 * @returns {Promise<Array>} 查询结果数组
index.js:374
↓ 2 callersFunctiongetAssetURL
* 获取资源文件的完整URL * @param {string} blockId - 包含资源的块ID (可选,仅用于兼容性) * @param {string} assetPath - 资源相对路径 (如 "assets/image-xxx.webp") * @returns {Pro
index.js:705
↓ 1 callersFunctioncallSiyuanAPI
* 调用思源笔记API的通用函数 * @param {string} endpoint - API端点路径 * @param {Object} requestBody - 请求体 * @returns {Promise<Object>} API响应数据
index.js:113
↓ 1 callersFunctionclearDirectory
递归删除过期文件
index.js:914
↓ 1 callersFunctionclearExpiredTempAssets
* 清理过期的临时文件(超过1小时) * @param {number} maxAge - 最大文件年龄(毫秒),默认1小时
index.js:903
↓ 1 callersFunctionfullTextSearch
* 全文搜索笔记块 * @param {string} query - 搜索查询词 * @param {Object} options - 搜索选项 * @returns {Promise<Object>} 搜索结果
index.js:176
↓ 1 callersFunctiongetBlockKramdown
* 调用思源 getBlockKramdown API 获取块的 kramdown * @param {string} blockId - 块ID * @returns {Promise<string>} kramdown 内容
index.js:583
↓ 1 callersFunctionloadEnvFile
加载.env文件
index.js:10
↓ 1 callersFunctionmain
* 主函数 - 命令行入口
index.js:632
↓ 1 callersFunctionsearchNotes
* 搜索包含关键词的笔记内容 (返回格式化字符串) * @param {string} keyword - 搜索关键词 * @param {number} limit - 返回结果数量限制 * @param {string} blockType - 块类型过滤 (可选) * @par
index.js:232
FunctionclearTempAsset
* 清理指定的临时文件 * @param {string} localPath - 本地文件路径
index.js:963
FunctionextractAssetsFromBlock
* 提取块内容中的所有资源路径 * @param {string} blockId - 块ID * @returns {Promise<Array>} 资源路径列表
index.js:777
FunctiongetAssetAsBase64
* 获取资源文件并返回base64编码的数据 * @param {string} blockId - 包含资源的块ID * @param {string} assetPath - 资源相对路径 (如 "assets/image-xxx.webp") * @returns {Promise
index.js:729
FunctiongetBlockByID
* 获取指定块的内容 * 自动使用 kramdown 接口获取完整内容,文档块会包含反向链接 * @param {string} blockId - 块ID * @returns {Promise<string>} kramdown 内容 + 反向链接的文本
index.js:535
FunctiongetLocalAssetPath
* 下载资源文件到本地临时目录 * @param {string} blockId - 包含资源的块ID * @param {string} assetPath - 资源相对路径 (如 "assets/image-xxx.webp") * @returns {Promise<string
index.js:833