← 返回
效率工具 中文

Apple Notes (AppleScript)

Apple Notes.app integration for macOS. List folders, read, create, search, edit, and delete notes via AppleScript.
macOS 版 Apple Notes.app 集成,支持 AppleScript 列出文件夹、读取、创建、搜索、编辑和删除笔记。
shad0wca7
效率工具 clawhub v1.1.0 1 版本 99936.9 Key: 无需
★ 1
Stars
📥 1,563
下载
💾 30
安装
1
版本
#latest

概述

Apple Notes

Interact with Notes.app via AppleScript. Run scripts from: cd {baseDir}

Commands

CommandUsage
----------------
List foldersscripts/notes-folders.sh [--tree] [--counts]
List notesscripts/notes-list.sh [folder] [limit]
Read notescripts/notes-read.sh [folder]
Create notescripts/notes-create.sh [body]</code></td></tr><tr><td>Search notes</td><td><code>scripts/notes-search.sh <query> [folder] [limit] [--title-only]</code></td></tr><tr><td>Edit note</td><td><code>scripts/notes-edit.sh <name-or-id> <new-body> [folder]</code></td></tr><tr><td>Delete note</td><td><code>scripts/notes-delete.sh <name> <folder></code> ⚠️ folder required</td></tr></tbody></table><h2>Folder Paths</h2><p>All commands support subfolder paths with <code>/</code> separator:</p><pre><code>scripts/notes-list.sh "Scanned/Medical & Health" 10 scripts/notes-read.sh "blood test" "Scanned/Medical & Health" scripts/notes-create.sh "Property/416 Garfield" "Inspection notes" "Roof looks good" </code></pre><h3>Folder Tree Structure</h3><p>This collection has 4000+ notes. Key structure:</p><ul><li><strong>Scanned</strong> — parent folder with many subfolders (Medical & Health, Receipts, etc.)</li><li><strong>Fetish</strong> — parent with subfolders (AW, Bimbo, Events, etc.)</li><li><strong>Hobbies</strong> — parent with subfolders (3d printing, Homelab, etc.)</li><li><strong>Property</strong> — subfolders per address</li></ul><p>Use <code>--tree --counts</code> to see the full hierarchy.</p><h2>Folder Listing</h2><pre><code>scripts/notes-folders.sh # Flat list scripts/notes-folders.sh --counts # With note counts scripts/notes-folders.sh --tree --counts # Full hierarchy with counts </code></pre><h2>Listing Notes</h2><pre><code>scripts/notes-list.sh "Notes" 10 # Specific folder scripts/notes-list.sh "Scanned/Receipts" 5 # Subfolder scripts/notes-list.sh "" 10 # All folders (shows folder name per note) </code></pre><p>Without a folder, output includes the folder column: <code>ID | Date | Folder | Title</code></p><p>With a folder: <code>ID | Date | Title</code></p><h2>Reading Notes</h2><pre><code>scripts/notes-read.sh "blood test" "Scanned/Medical & Health" # By name (partial match) scripts/notes-read.sh "x-coredata://…/ICNote/p12345" # By ID (direct lookup, fast) </code></pre><p>Output: Title, Folder, Modified date, ID, then body text.</p><h2>Searching</h2><p>Title search first (fast), body search fallback (slower):</p><pre><code>scripts/notes-search.sh "tax" "" 10 # All folders scripts/notes-search.sh "receipt" "Scanned/Receipts" 5 # Specific folder scripts/notes-search.sh "keyword" "" 10 --title-only # Skip body search </code></pre><p>Output: <code>ID | Date | Folder | Title</code></p><h2>Creating Notes</h2><pre><code>scripts/notes-create.sh "Notes" "My Title" "Body text here" # With body scripts/notes-create.sh "Notes" "Empty Note" # Title only </code></pre><p>Returns the created note's ID.</p><h2>Editing Notes</h2><pre><code>scripts/notes-edit.sh "My Note" "New body content" "Notes" # By name scripts/notes-edit.sh "x-coredata://…/ICNote/p12345" "New body" # By ID </code></pre><h2>Deleting Notes</h2><pre><code>scripts/notes-delete.sh "Old Note" "Notes" # Folder required scripts/notes-delete.sh "receipt" "Scanned/Receipts" </code></pre><p>⚠️ Folder argument is <strong>required</strong> for safety — prevents accidental matches across 4000+ notes.</p><h2>Performance Tips</h2><table><thead><tr><th>Situation</th><th>Tip</th></tr></thead><tbody><tr><td>-----------</td><td>-----</td></tr><tr><td>Listing/searching all notes</td><td><strong>Always specify a folder</strong> — iterating 4000+ notes is slow</td></tr><tr><td>Reading a known note</td><td>Use the <strong>ID</strong> from a previous list/search — instant lookup</td></tr><tr><td>Searching large folders</td><td>Use <code>--title-only</code> if body search isn't needed</td></tr><tr><td>Finding the right folder</td><td>Use <code>--tree --counts</code> first to see hierarchy</td></tr></tbody></table><h2>Errors</h2><table><thead><tr><th>Error</th><th>Cause</th></tr></thead><tbody><tr><td>-------</td><td>-------</td></tr><tr><td><code>Error: Can't get folder</code></td><td>Folder name doesn't exist or wrong path</td></tr><tr><td><code>No note matching…</code></td><td>No partial match found in scope</td></tr><tr><td>Empty body text</td><td>Scanned/image-only notes have no extractable text</td></tr></tbody></table><h2>Technical Notes</h2><ul><li>Partial name matching for read/edit/delete (first match wins)</li><li>Multiline body supported via temp files</li><li>Folder names are case-sensitive</li><li>All user inputs escaped for AppleScript safety (quotes, backslashes)</li><li><code>number of</code> used instead of <code>count of</code> (AppleScript reserved word)</li></ul></div> </div> </div> <div id="tab-versions" class="detail-content"> <div class="detail-section"> <h2>版本历史</h2> <p style="margin-bottom:12px;font-size:14px;color:#94a3b8;">共 1 个版本</p> <ul class="version-list"> <li> <div> <span class="version-tag">v1.1.0</span> <span style="font-size:11px;color:#5b6abf;margin-left:8px;background:#eef0ff;padding:1px 8px;border-radius:10px;">当前</span> </div> <div style="font-size:12px;color:#94a3b8;"> 2026-03-29 00:43 安全 安全 </div> </li> </ul> </div> </div> <div id="tab-security" class="detail-content"> <div class="detail-section"> <h2>安全检测</h2> <div class="sec-grid"> <div class="sec-card"> <h4>腾讯云安全 (Keen)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://tix.qq.com/search/skill?keyword=e1dfb2d5414f5d9fd02819e9491d7318" target="_blank">查看报告</a> </div> <div class="sec-card"> <h4>腾讯云安全 (Sanbu)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://static.cloudsec.tencent.com/html-report-v2/2026/05/25/395078_58d85fe6ee1394fc99d4a472bb8a334b.html?q-sign-algorithm=sha1&q-ak=AKID8JMG1bzBC1dz96qNhssfFftujT1NCoFi&q-sign-time=1781385381%3B1812921381&q-key-time=1781385381%3B1812921381&q-header-list=host&q-url-param-list=&q-signature=29fb671123123812fb04e5b808098dec16504574" target="_blank">查看报告</a> </div> </div> </div> </div> <!-- Recommended Skills --> <div style="margin-top:24px;"> <h2 style="font-size:18px;font-weight:600;margin-bottom:16px;">🔗 相关推荐</h2> <div class="rec-grid"> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">developer-tools</span> <h3><a href="/s/vikunja-kanban">Vikunja Kanban</a></h3> <div class="rec-owner">shad0wca7</div> <div class="rec-desc">通过 API 管理 Vikunja 看板,读取、创建、移动和完成任务,跨预设 bucket 并集成 cron 同步。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 0</span> <span style="color:#5b6abf;">📥 1,518</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">productivity</span> <h3><a href="/s/nano-pdf">Nano Pdf</a></h3> <div class="rec-owner">steipete</div> <div class="rec-desc">使用nano-pdf CLI通过自然语言指令编辑PDF</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 275</span> <span style="color:#5b6abf;">📥 114,861</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">productivity</span> <h3><a href="/s/weather">Weather</a></h3> <div class="rec-owner">steipete</div> <div class="rec-desc">获取当前天气和预报(无需API密钥)</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 445</span> <span style="color:#5b6abf;">📥 226,320</span> </div> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded',function(){ document.querySelectorAll('.detail-tab').forEach(function(btn){ btn.addEventListener('click',function(e){ var tab = this.getAttribute('data-tab'); document.querySelectorAll('.detail-tab').forEach(function(b){b.classList.remove('active')}); document.querySelectorAll('.detail-content').forEach(function(c){c.classList.remove('active')}); this.classList.add('active'); var el = document.getElementById('tab-'+tab); if(el) el.classList.add('active'); }); }); }); </script> <div class="footer"> <p>Skill工具集 © 2026</p> </div></body> </html>