Joplin Notes Skill
This skill provides programmatic access to a Joplin database synchronized via WebDAV.
How it Works
Joplin stores notes and notebooks as .md files in a flat directory. They are linked via metadata at the end of the file (id, parent_id, type_).
- - Title: The first line of the file is the title of the note or notebook.
- Notebook: A special file type (
type_: 2) that serves as a container for notes. - Note: A standard file (
type_: 1) assigned to a notebook via parent_id.
Available Scripts
The scripts are located in scripts/ and require the following environment variables:
- -
JOPLIN_PASSWORD: The password for WebDAV access. - INLINECODE9 : The username for Joplin (e.g.,
openclaw). - INLINECODE11 : The full path to the Joplin directory on the WebDAV server.
1. List Notes (list_notes.py)
Outputs the entire structure of notebooks and their contained notes.
2. Get Note Content (get_note.py)
Reads the content of a specific note by its ID.
3. Upsert Note/Notebook (upsert_note.py)
Updates an existing note or creates a new one. Supports notebooks via the type parameter.
4. Create Notebook (create_notebook.py)
Creates a new notebook.
Workflow Examples
Query Structure
- 1. INLINECODE20
- Analyze the output to find the desired
note_id or notebook_id.
Read Note Content
- 1. INLINECODE23
Edit or Create Note
- 1. Download the current content with
get_note.py (if editing). - Create a temporary file with the new content (include the title in the first line).
- Call
upsert_note.py.
Joplin 笔记技能
该技能提供对通过 WebDAV 同步的 Joplin 数据库的程序化访问。
工作原理
Joplin 将笔记和笔记本以 .md 文件形式存储在扁平目录中。它们通过文件末尾的元数据(id、parentid、type)进行关联。
- - 标题: 文件的第一行是笔记或笔记本的标题。
- 笔记本: 一种特殊文件类型(type: 2),作为笔记的容器。
- 笔记: 一种标准文件(type: 1),通过 parent_id 分配给某个笔记本。
可用脚本
脚本位于 scripts/ 目录下,需要以下环境变量:
- - JOPLINPASSWORD:WebDAV 访问密码。
- JOPLINACCOUNT:Joplin 用户名(例如 openclaw)。
- JOPLINWEBDAVPATH:WebDAV 服务器上 Joplin 目录的完整路径。
1. 列出笔记(list_notes.py)
输出笔记本及其包含笔记的完整结构。
- - 用法: python3 scripts/list_notes.py
2. 获取笔记内容(get_note.py)
通过笔记 ID 读取特定笔记的内容。
- - 用法: python3 scripts/getnote.py id>
3. 更新或创建笔记/笔记本(upsert_note.py)
更新现有笔记或创建新笔记。通过类型参数支持笔记本。
- - 用法: python3 scripts/upsertnote.py id|new> id> file> [type (1=笔记, 2=笔记本)]
4. 创建笔记本(create_notebook.py)
创建一个新笔记本。
- - 用法: python3 scripts/createnotebook.py [parentnotebook_id]
工作流程示例
查询结构
- 1. exec(python3 /home/openclaw/.openclaw/workspace/skills/joplin-notes/scripts/listnotes.py)
- 分析输出以找到所需的 noteid 或 notebook_id。
读取笔记内容
- 1. exec(python3 /home/openclaw/.openclaw/workspace/skills/joplin-notes/scripts/getnote.py id>)
编辑或创建笔记
- 1. 使用 getnote.py 下载当前内容(如果是编辑操作)。
- 创建一个包含新内容的临时文件(在第一行包含标题)。
- 调用 upsertnote.py。