360 Secure SkillHub
360 安全技能中心

Apple Notes Updater

核心功能:通过osascript按准确标题非交互更新苹果笔记内容,支持HTML富文本格式,用临时文件传递内容规避命令行参数限制。典型场景:自动化脚本批量更新笔记、程序化修改指定笔记内容。输入为笔记标题和新内容(含HTML),输出为更新后的苹果笔记。仅支持macOS,需确保苹果笔记处于运行状态。

cryptol0rd
cryptol0rd
热度 45.07
最近更新 2026-05-17 12:30:20
分类:自动化依赖:代码执行 / 读写文件应用场景:自动化脚本 / 笔记整理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add apple-notes-updater
Metadata
name
apple-notes-updater
description
Update Apple Notes content by note name using osascript. This skill allows non-interactive updating of note content, preserving formatting and supporting HTML.

Apple Notes Updater

This skill provides a robust, non-interactive way to update the content of an Apple Note by its title. It uses osascript to directly interact with the Apple Notes application.

Usage

The primary function of this skill is to update a note's body.

Update Note by Title

To update a note, you will need the exact title of the note and the new content (which can include HTML tags for rich text formatting). The skill handles the safe transfer of the content via a temporary file, bypassing command-line argument limitations.

Example Script Usage:

./skills/apple-notes-updater/update_note.sh "My Note Title" "<h1>New Content</h1><p>With <b>HTML</b> formatting.</p>"

Underlying AppleScript Logic:

set noteTitle to "My Note Title"
set newBodyFilePath to (POSIX file "/path/to/temp/file.html") as alias -- Path to a temporary file containing HTML content

tell application "Notes"
    set theNote to first note whose name is noteTitle
    
    set fileRef to open for access newBodyFilePath
    set theContent to read fileRef as «class utf8»
    close access fileRef
    
    set body of theNote to theContent
end tell

Implementation Details

  • Uses osascript for direct Apple Notes application control.
  • Content (including HTML) is passed via a temporary file to ensure correct escaping and formatting.
  • Supports HTML within the newBody for rich text formatting.
  • Requires Apple Notes.app to be running and accessible.
  • macOS-only.