correspond.channels.macos#

macOS Notification Centre: a banner on this Mac (send only).

Reference: macos: (this machine; it takes no id). A send uses terminal-notifier when it is installed, because it keeps bodies with quotes intact, and osascript otherwise. Either way the text travels as program arguments, never inside a script, so nothing in a message can be run.

>>> MacOS().parse_ref("").encoded
'macos:'

Classes

MacOS(*[, run])

Notification Centre on the Mac correspond runs on.

class correspond.channels.macos.MacOS(*, run=<function run>)[source]#

Bases: object

Notification Centre on the Mac correspond runs on.

audience(ref, *, draft=None)[source]#

Only the operator: a banner on this Mac, which can be cleared.

Return type:

Audience

property capabilities: Capabilities#

Send only.

parse_ref(id)[source]#

Only macos:.

Return type:

ConversationRef

send(ref, draft, *, dry_run=False)[source]#

Show a banner with the draft’s title and text.

Return type:

SendResult