Apple Notes Skill
Extract and monitor Apple Notes content for workflow integration with support for bulk extraction, real-time monitoring, and export to various formats.
Prerequisites
- - macOS with Apple Notes app
- Python 3.8+ (for coordination scripts)
- osascript (built-in macOS)
- Proper macOS permissions for Notes access
Installation
CODEBLOCK0
Commands
Extract Notes
CODEBLOCK1
Monitor Notes
CODEBLOCK2
Processing and Export
CODEBLOCK3
Configuration
Edit configs/extractor.json for:
- - Output formats (JSON, Markdown, HTML)
- Privacy filters
- Folder selection
- Processing options
Edit configs/monitor.json for:
- - Monitoring intervals
- Change detection settings
- Auto-processing rules
Features
- - ✅ Extract text content from all notes
- ✅ Handle embedded images and attachments
- ✅ Process note metadata (dates, folders)
- ✅ Multiple output formats (JSON, Markdown, SQLite)
- ✅ Real-time monitoring for changes
- ✅ Privacy-first design with local processing
- ✅ Integration with knowledge management tools
- ✅ Automatic deduplication
- ✅ Incremental updates
Output Formats
| Format | Description | Use Case |
|---|
| INLINECODE2 | Structured data with metadata | API integration |
| INLINECODE3 |
Human-readable text files | Documentation |
|
sqlite | Database format | Searchable archive |
|
obsidian | Obsidian vault format | Knowledge management |
Examples
CODEBLOCK4
Security & Privacy
- - All processing happens locally on your machine
- No data sent to external services
- Respects macOS security permissions
- Configurable privacy filters for sensitive content
- Optional encryption for exported data
Integration
Compatible with:
- - Obsidian (direct vault export)
- Logseq (Markdown export)
- Notion (JSON import)
- Custom workflows (JSON/CSV output)
- AI processing pipelines
- Search engines (full-text indexing)
Troubleshooting
Common issues:
- - Permission denied: Grant Notes access in System Preferences → Security & Privacy
- Import errors: Ensure Python 3.8+ and required packages installed
- AppleScript errors: Check if Notes app is running and accessible
- Empty output: Verify folder names and note permissions
See README.md for detailed troubleshooting guide.
Apple Notes 技能
提取并监控 Apple Notes 内容以实现工作流集成,支持批量提取、实时监控以及导出为多种格式。
前提条件
- - 装有 Apple Notes 应用的 macOS 系统
- Python 3.8+(用于协调脚本)
- osascript(macOS 内置)
- 授予 Notes 访问权限的 macOS 权限设置
安装
bash
运行安装脚本
./scripts/setup.sh
或手动安装
chmod +x scripts/*.py
pip3 install -r requirements.txt
命令
提取笔记
bash
基本提取(所有笔记)
python3 scripts/extract-notes.py --method simple
完整提取(含附件)
python3 scripts/extract-notes.py --method full
提取特定文件夹
python3 scripts/extract-notes.py --folder 工作笔记
输出为特定格式
python3 scripts/extract-notes.py --format markdown --output ~/notes
监控笔记
bash
启动监控守护进程
python3 scripts/monitor-notes.py --daemon
单次检查变更
python3 scripts/monitor-notes.py --check-once
自定义监控间隔(秒)
python3 scripts/monitor-notes.py --interval 30
处理与导出
bash
处理提取的笔记
python3 scripts/notes-processor.py output/raw -o output/processed
导出到 Obsidian
python3 scripts/export-obsidian.py --vault ~/MyVault
生成知识图谱
python3 scripts/knowledge-graph.py --input output/processed
配置
编辑 configs/extractor.json 以配置:
- - 输出格式(JSON、Markdown、HTML)
- 隐私过滤器
- 文件夹选择
- 处理选项
编辑 configs/monitor.json 以配置:
功能特性
- - ✅ 提取所有笔记中的文本内容
- ✅ 处理嵌入的图片和附件
- ✅ 处理笔记元数据(日期、文件夹)
- ✅ 多种输出格式(JSON、Markdown、SQLite)
- ✅ 实时监控变更
- ✅ 隐私优先设计,本地处理
- ✅ 与知识管理工具集成
- ✅ 自动去重
- ✅ 增量更新
输出格式
| 格式 | 描述 | 使用场景 |
|---|
| json | 带元数据的结构化数据 | API 集成 |
| markdown |
人类可读的文本文件 | 文档编写 |
| sqlite | 数据库格式 | 可搜索存档 |
| obsidian | Obsidian 仓库格式 | 知识管理 |
示例
bash
快速开始 - 将所有笔记提取为 Markdown
python3 scripts/extract-notes.py --format markdown --output ~/extracted-notes
监控并自动导出到 Obsidian
python3 scripts/monitor-notes.py --daemon --auto-export obsidian
提取工作笔记的完整内容
python3 scripts/extract-notes.py --method full --folder 工作笔记 --format json
处理并创建知识图谱
python3 scripts/extract-notes.py --method full
python3 scripts/notes-processor.py output/raw -o output/processed
python3 scripts/knowledge-graph.py --input output/processed --output knowledge-graph.json
安全与隐私
- - 所有处理均在本地机器上完成
- 不会向外部服务发送数据
- 遵循 macOS 安全权限要求
- 可配置的敏感内容隐私过滤器
- 导出数据可选加密
集成
兼容以下工具:
- - Obsidian(直接仓库导出)
- Logseq(Markdown 导出)
- Notion(JSON 导入)
- 自定义工作流(JSON/CSV 输出)
- AI 处理管道
- 搜索引擎(全文索引)
故障排除
常见问题:
- - 权限被拒绝:在系统偏好设置 → 安全性与隐私中授予 Notes 访问权限
- 导入错误:确保已安装 Python 3.8+ 及所需包
- AppleScript 错误:检查 Notes 应用是否正在运行且可访问
- 输出为空:验证文件夹名称和笔记权限
详细故障排除指南请参阅 README.md。