Notes Module Reference

New in version 0.0.1.

Control the macOS Notes application using JXA-like syntax.

Classes:

XANote(properties)

A class for interacting with notes in the Notes application.

XANoteAttachment(properties)

A class for interacting with attachments in the Notes application.

XANoteList(properties[, filter])

A wrapper around a list of notes.

XANotesAccount(properties)

A class for interacting with accounts in the Notes application.

XANotesAccountList(properties[, filter])

A wrapper around a list of accounts.

XANotesApplication(properties)

A class for interacting with Notes.app.

XANotesAttachmentList(properties[, filter])

A wrapper around a list of attachments.

XANotesDocument(properties)

A class for interacting with documents in Notes.app.

XANotesDocumentList(properties[, filter])

A wrapper around a list of documents.

XANotesFolder(properties)

A class for interacting with Notes folders and their contents.

XANotesFolderList(properties[, filter])

A wrapper around a list of Notes folders.

XANotesWindow(properties)

A window of Notes.app.

class PyXA.apps.Notes.XANote(properties)[source]

Bases: XAObject, XAClipboardCodable, XAShowable, XADeletable

A class for interacting with notes in the Notes application.

See also

XANotesFolder

Changed in version 0.0.3: Added show() and show_separately()

New in version 0.0.1.

Methods:

attachments([filter])

Returns a list of attachments, as PyXA objects, matching the given filter.

get_clipboard_representation()

Gets a clipboard-codable representation of the note.

move_to(folder)

Moves the note to the specified folder.

show()

Shows the note in the main Notes window.

show_separately()

Shows the note in a separate window.

Attributes:

body

The HTML content of the note.

container

The folder that the note is in.

creation_date

The date and time the note was created.

id

The unique identifier for the note.

modification_date

The date and time the note was last modified.

name

The name of the note (generally the first line of the body).

password_protected

Whether the note is password protected.

plaintext

The plaintext content of the note.

shared

Whether the note is shared.

attachments(filter: dict | None = None) XANotesAttachmentList[source]

Returns a list of attachments, as PyXA objects, matching the given filter.

Parameters:

filter (dict, optional) – Keys and values to filter attachments by, defaults to None

Returns:

A PyXA list object wrapping a list of attachments

Return type:

XANotesAttachmentList

Example 1:

List all attachments of a note

>>> import PyXA
>>> app = PyXA.Application("Notes")
>>> note = app.notes()[-4]
>>> print(note.attachments())
<<class 'PyXA.apps.Notes.XANotesAttachmentList'>[('Example.pdf, 'x-coredata://224D909C-B449-42B0-96EC-380EE22332E2/ICAttachment/p526')]>
Example 2:

Save the attachments of a note to the Downloads folder

>>> import PyXA
>>> app = PyXA.Application("Notes")
>>> note = app.notes()[0]
>>> print(note.attachments().save("/Users/exampleuser/Downloads/"))

Changed in version 0.0.3: Now returns an object of XANotesAttachmentList instead of a default list.

New in version 0.0.1.

property body: str

The HTML content of the note.

property container: XANotesFolder

The folder that the note is in.

property creation_date: datetime

The date and time the note was created.

get_clipboard_representation() str[source]

Gets a clipboard-codable representation of the note.

When the clipboard content is set to a note, the plaintext representation of the note is added to the clipboard.

Returns:

The plaintext representation of the note

Return type:

str

New in version 0.0.8.

property id: str

The unique identifier for the note.

property modification_date: datetime

The date and time the note was last modified.

move_to(folder: XANotesFolder) XANote[source]

Moves the note to the specified folder.

Parameters:

folder (XANotesFolder) – The folder to move the note to

Returns:

A reference to the note object

Return type:

XANote

New in version 0.0.4.

property name: str

The name of the note (generally the first line of the body).

property password_protected: bool

Whether the note is password protected.

property plaintext: str

The plaintext content of the note.

property shared: bool

Whether the note is shared.

show() XANote[source]

Shows the note in the main Notes window.

Returns:

A reference to the note object

Return type:

XANote

New in version 0.0.3.

show_separately() XANote[source]

Shows the note in a separate window.

Returns:

A reference to the note object

Return type:

XANote

New in version 0.0.3.

class PyXA.apps.Notes.XANoteAttachment(properties)[source]

Bases: XAObject, XAClipboardCodable

A class for interacting with attachments in the Notes application.

Changed in version 0.0.3: Added show() and show_separately()

New in version 0.0.1.

Attributes:

container

The note containing the attachment.

content_identifier

The content ID of the attachment in the note's HTML.

creation_date

The date the attachment was created.

id

The unique identifier for the attachment.

modification_date

The date the attachment was last modified.

name

The name of the attachment.

shared

Whether the attachment is shared.

url

The URL that the attachment represents, if any.

Methods:

delete()

Permanently deletes the attachment.

get_clipboard_representation()

Gets a clipboard-codable representation of the attachment.

save(directory)

Saves the attachment to the specified directory.

show()

Shows the attachment in the main Notes window.

show_separately()

Shows the attachment in a separate window.

property container: XANote

The note containing the attachment.

property content_identifier: str

The content ID of the attachment in the note’s HTML.

property creation_date: datetime

The date the attachment was created.

delete()[source]

Permanently deletes the attachment.

New in version 0.0.4.

get_clipboard_representation() str | list[NSURL | str][source]

Gets a clipboard-codable representation of the attachment.

When the clipboard content is set to an attachment, the URL of the attachment (if one exists) and the attachment’s name are added to the clipboard.

Returns:

The URL and name of the attachment, or just the name of the attachment

Return type:

list[Union[AppKit.NSURL, str]]

New in version 0.0.8.

property id: str

The unique identifier for the attachment.

property modification_date: datetime

The date the attachment was last modified.

property name: str

The name of the attachment.

save(directory: str) XANoteAttachment[source]

Saves the attachment to the specified directory.

Parameters:

directory (str) – The directory to store the saved attachment in

Returns:

A reference to the attachment object

Return type:

XANoteAttachment

New in version 0.0.4.

property shared: bool

Whether the attachment is shared.

show() XANoteAttachment[source]

Shows the attachment in the main Notes window.

Returns:

A reference to the attachment object

Return type:

XANoteAttachment

New in version 0.0.3.

show_separately() XANoteAttachment[source]

Shows the attachment in a separate window.

Returns:

A reference to the attachment object

Return type:

XANoteAttachment

New in version 0.0.3.

property url: XAURL | None

The URL that the attachment represents, if any.

class PyXA.apps.Notes.XANoteList(properties: dict, filter: dict | None = None)[source]

Bases: XAList, XAClipboardCodable

A wrapper around a list of notes.

New in version 0.0.3.

Methods:

attachments()

body()

by_body(body)

by_container(container)

by_creation_date(creation_date)

by_id(id)

by_modification_date(modification_date)

by_name(name)

by_password_protected(password_protected)

by_plaintext(plaintext)

by_shared(shared)

container()

creation_date()

get_clipboard_representation()

Gets a clipboard-codable representation of each note in the list.

id()

modification_date()

name()

password_protected()

plaintext()

shared()

show_separately()

Shows each note in the list in a separate window.

attachments() XANotesAttachmentList[source]
body() list[str][source]
by_body(body: str) XANote[source]
by_container(container: XANotesFolder) XANote[source]
by_creation_date(creation_date: datetime) XANote[source]
by_id(id: str) XANote[source]
by_modification_date(modification_date: datetime) XANote[source]
by_name(name: str) XANote[source]
by_password_protected(password_protected: bool) XANote[source]
by_plaintext(plaintext: str) XANote[source]
by_shared(shared: bool) XANote[source]
container() XANotesFolderList[source]
creation_date() list[datetime][source]
get_clipboard_representation() list[str][source]

Gets a clipboard-codable representation of each note in the list.

When the clipboard content is set to a list of notes, the plaintext of each note is added to the clipboard.

Returns:

A list of note plaintext representations

Return type:

list[str]

New in version 0.0.8.

id() list[str][source]
modification_date() list[datetime][source]
name() list[str][source]
password_protected() list[bool][source]
plaintext() list[str][source]
shared() list[bool][source]
show_separately() XANoteList[source]

Shows each note in the list in a separate window.

Example 1:

Show the currently selected notes in separate windows

>>> import PyXA
>>> app = PyXA.Application("Notes")
>>> notes = app.selection.show_separately()

New in version 0.0.4.

class PyXA.apps.Notes.XANotesAccount(properties)[source]

Bases: XAObject, XAClipboardCodable

A class for interacting with accounts in the Notes application.

Changed in version 0.0.3: Added show()

New in version 0.0.1.

Attributes:

default_folder

The default folder for creating new notes.

id

The unique identifier of the account.

name

The name of the account.

upgraded

Whether the account is upgraded.

Methods:

folders([filter])

Returns a list of folders, as PyXA objects, matching the given filter.

get_clipboard_representation()

Gets a clipboard-codable representation of the account.

notes([filter])

Returns a list of notes, as PyXA objects, matching the given filter.

show()

Shows the first folder belonging to the account.

property default_folder: XANotesFolder

The default folder for creating new notes.

folders(filter: dict | None = None) XANotesFolderList[source]

Returns a list of folders, as PyXA objects, matching the given filter.

Parameters:

filter (dict, optional) – Keys and values to filter folders by, defaults to None

Returns:

A PyXA list object wrapping a list of folders

Return type:

XANotesFolderList

Example 1:

List all folders belonging to an account

>>> import PyXA
>>> app = PyXA.Application("Notes")
>>> account = app.accounts()[0]
>>> print(account.folders())
<<class 'PyXA.apps.Notes.XANotesFolderList'>[('Imported Notes', 'x-coredata://224D909C-B449-42B0-96EC-380EE22332E2/ICFolder/p3104'), ('Notes', 'x-coredata://224D909C-B449-42B0-96EC-380EE22332E2/ICFolder/p3123'), ...]>

Changed in version 0.0.3: Now returns an object of XANotesFolderList instead of a default list.

New in version 0.0.1.

get_clipboard_representation() str[source]

Gets a clipboard-codable representation of the account.

When the clipboard content is set to an account, the account’s name are added to the clipboard.

Returns:

The name of the account

Return type:

str

New in version 0.0.8.

property id: str

The unique identifier of the account.

property name: str

The name of the account.

notes(filter: dict | None = None) XANoteList[source]

Returns a list of notes, as PyXA objects, matching the given filter.

Parameters:

filter (dict, optional) – Keys and values to filter notes by, defaults to None

Returns:

A PyXA list object wrapping a list of notes

Return type:

XANoteList

Example 1:

List all notes belonging to an account

>>> import PyXA
>>> app = PyXA.Application("Notes")
>>> account = app.accounts()[0]
>>> print(account.notes())
<<class 'PyXA.apps.Notes.XANoteList'>[('PyXA Stuff', 'x-coredata://224D909C-B449-42B0-96EC-380EE22332E2/ICNote/p3380'), ('Important Note', 'x-coredata://224D909C-B449-42B0-96EC-380EE22332E2/ICNote/p614'), ...]>

Changed in version 0.0.3: Now returns an object of XANoteList instead of a default list.

New in version 0.0.1.

show() XANotesAccount[source]

Shows the first folder belonging to the account.

Returns:

A reference to the account object

Return type:

XANotesAccount

New in version 0.0.3.

property upgraded: bool

Whether the account is upgraded.

class PyXA.apps.Notes.XANotesAccountList(properties: dict, filter: dict | None = None)[source]

Bases: XAList, XAClipboardCodable

A wrapper around a list of accounts.

New in version 0.0.3.

Methods:

by_default_folder(default_folder)

by_id(id)

by_name(name)

by_upgraded(upgraded)

default_folder()

folders()

get_clipboard_representation()

Gets a clipboard-codable representation of each account in the list.

id()

name()

notes()

upgraded()

by_default_folder(default_folder: XANotesFolder) XANotesAccount[source]
by_id(id: str) XANotesAccount[source]
by_name(name: str) XANotesAccount[source]
by_upgraded(upgraded: bool) XANotesAccount[source]
default_folder() XANotesFolderList[source]
folders() XANotesFolderList[source]
get_clipboard_representation() list[str][source]

Gets a clipboard-codable representation of each account in the list.

When the clipboard content is set to a list of accounts, the name of each account is added to the clipboard.

Returns:

A list of account names

Return type:

list[str]

New in version 0.0.8.

id() list[str][source]
name() list[str][source]
notes() XANoteList[source]
upgraded() list[bool][source]
class PyXA.apps.Notes.XANotesApplication(properties)[source]

Bases: XASBApplication, XACanOpenPath, XACanPrintPath

A class for interacting with Notes.app.

Changed in version 0.0.3: Added accounts(), attachments(), and related methods

New in version 0.0.1.

Classes:

FileFormat(value)

An enumeration.

ObjectType(value)

Types of objects that can be created using make().

Methods:

accounts([filter])

Returns a list of Notes accounts, as PyXA objects, matching the given filter.

attachments([filter])

Returns a list of attachments, as PyXA objects, matching the given filter.

documents([filter])

Returns a list of documents, as PyXA objects, matching the given filter.

folders([filter])

Returns a list of Notes folders, as PyXA objects, matching the given filter.

make(specifier[, properties, data])

Creates a new element of the given specifier class without adding it to any list.

new_folder([name, account])

Creates a new Notes folder with the given name.

new_note([name, body, folder])

Creates a new note with the given name and body text in the given folder.

notes([filter])

Returns a list of notes, as PyXA objects, matching the given filter.

open(file_ref)

Opens the file/website at the given filepath/URL.

Attributes:

default_account

The account that new notes are created in by default.

frontmost

Whether Notes is the active application.

name

The name of the application.

selection

A list of currently selected notes.

version

The version number of Notes.app.

class FileFormat(value)[source]

Bases: Enum

An enumeration.

Attributes:

NATIVE

The native Notes format

NATIVE = 1769235821

The native Notes format

class ObjectType(value)[source]

Bases: Enum

Types of objects that can be created using make().

Attributes:

ACCOUNT

ATTACHMENT

FOLDER

NOTE

ACCOUNT = 'account'
ATTACHMENT = 'attachment'
FOLDER = 'folder'
NOTE = 'note'
accounts(filter: dict | None = None) XANotesAccountList[source]

Returns a list of Notes accounts, as PyXA objects, matching the given filter.

New in version 0.0.3.

attachments(filter: dict | None = None) XANotesAttachmentList[source]

Returns a list of attachments, as PyXA objects, matching the given filter.

New in version 0.0.3.

property default_account: XANotesAccount

The account that new notes are created in by default.

documents(filter: dict | None = None) XANotesDocumentList[source]

Returns a list of documents, as PyXA objects, matching the given filter.

New in version 0.0.3.

folders(filter: dict | None = None) XANotesFolderList[source]

Returns a list of Notes folders, as PyXA objects, matching the given filter.

Example 1:

Retrieve the name of each folder

>>> import PyXA
>>> app = PyXA.Application("Notes")
>>> print(app.folders().name())
['ExampleFolder1', 'ExampleFolder2', 'ExampleFolder3', ...]

Changed in version 0.0.3: Now returns an object of XANotesFolderList instead of a default list.

New in version 0.0.1.

property frontmost: bool

Whether Notes is the active application.

make(specifier: str | ObjectType, properties: dict | None = None, data: XAPath | str | None = None)[source]

Creates a new element of the given specifier class without adding it to any list.

Use XABase.XAList.push() to push the element onto a list.

Parameters:
  • specifier (Union[str, XANotesApplication.ObjectType]) – The classname of the object to create

  • properties (dict) – The properties to give the object

Returns:

A PyXA wrapped form of the object

Return type:

XABase.XAObject

Example 1:

Make a new folder and add a new note to that folder

>>> import PyXA
>>> app = PyXA.Application("Notes")
>>> new_folder = app.make("folder", {"name": "Example Folder"})
>>> new_note = app.make("note", {"name": "Example Note"})
>>> app.folders().push(new_folder)
>>> new_folder.notes().push(new_note)

New in version 0.0.3.

property name: str

The name of the application.

new_folder(name: str = 'New Folder', account: XANotesAccount | None = None) XANotesFolder[source]

Creates a new Notes folder with the given name.

Parameters:

name (str, optional) – The name of the folder, defaults to “New Folder”

Returns:

A reference to the newly created folder.

Return type:

XANote

Example:

>>> import PyXA
>>> app = PyXA.Application("Notes")
>>> folder = app.new_folder("PyXA Notes Folder")
>>> print(folder)
<<class 'PyXA.apps.Notes.XANotesFolder'>PyXA Notes Folder, x-coredata://224D909C-B449-42B0-96EC-380EE22332E2/ICFolder/p3389>

New in version 0.0.1.

new_note(name: str = 'New Note', body: str | XAText = '', folder: XANotesFolder | None = None) XANote[source]

Creates a new note with the given name and body text in the given folder. If no folder is provided, the note is created in the default Notes folder.

Parameters:
  • name (str, optional) – The name of the note, defaults to “New Note”

  • body (str, optional) – The initial body text of the note, defaults to “”

  • folder (XANotesFolder, optional) – The folder to create the new note in, defaults to None

Returns:

A reference to the newly created note.

Return type:

XANote

Example:

>>> import PyXA
>>> app = PyXA.Application("Notes")
>>> note = app.new_note("PyXA Notes", "Example text of new note.")
>>> print(note)
<<class 'PyXA.apps.Notes.XANote'>PyXA Notes, x-coredata://224D909C-B449-42B0-96EC-380EE22332E2/ICNote/p3388>

See also

XANote, new_folder()

New in version 0.0.1.

notes(filter: dict | None = None) XANoteList[source]

Returns a list of notes, as PyXA objects, matching the given filter.

Parameters:

filter (dict, optional) – Keys and values to filter notes by, defaults to None

Returns:

A PyXA list object wrapping a list of notes

Return type:

XANoteList

Example 1:

Retrieve the name of each note

>>> import PyXA
>>> app = PyXA.Application("Notes")
>>> print(app.notes().name())
['ExampleName1', 'ExampleName2', 'ExampleName3', ...]
Example 2:

Retrieve notes by using a filter

>>> import PyXA
>>> app = PyXA.Application("Notes")
>>> print(app.notes().containing("name", "fancy"))
[('ExampleName1', 'x-coredata://213D109C-B439-42A0-96EC-380DE31393E2/ICNote/p2964'), ('ExampleName11', 'x-coredata://213D109C-B439-42A0-96EC-380DE31393E2/ICNote/p2963'), ...]
Example 3:

Iterate over each note

>>> import PyXA
>>> app = PyXA.Application("Notes")
>>> for note in app.notes():
>>>     print(note.name)
ExampleName1
ExampleName2
ExampleName3
...

Changed in version 0.0.3: Now returns an object of XANoteList instead of a default list.

New in version 0.0.1.

open(file_ref: XAPath | str) XANote[source]

Opens the file/website at the given filepath/URL.

Child classes of XACanOpenPath should redefine this method as necessary.

Parameters:

target (str) – The path to a file or the URL to a website to open.

Returns:

A reference to the opened document or element, or None if no document/element was created or it cannot be found

Return type:

Any

New in version 0.0.1.

property selection: XANoteList

A list of currently selected notes.

property version: str

The version number of Notes.app.

class PyXA.apps.Notes.XANotesAttachmentList(properties: dict, filter: dict | None = None)[source]

Bases: XAList, XAClipboardCodable

A wrapper around a list of attachments.

New in version 0.0.3.

Methods:

by_container(container)

by_content_identifier(content_identifier)

by_creation_date(creation_date)

by_id(id)

by_modification_date(modification_date)

by_name(name)

by_shared(shared)

by_url(url)

container()

content_identifier()

creation_date()

id()

modification_date()

name()

save(directory)

Saves all attachments in the list in the specified directory.

shared()

url()

by_container(container: XANote) XANoteAttachment | None[source]
by_content_identifier(content_identifier: str) XANoteAttachment | None[source]
by_creation_date(creation_date: datetime) XANoteAttachment[source]
by_id(id: str) XANoteAttachment | None[source]
by_modification_date(modification_date: datetime) XANoteAttachment | None[source]
by_name(name: str) XANoteAttachment | None[source]
by_shared(shared: bool) XANoteAttachment | None[source]
by_url(url: str | XAURL) XANoteAttachment | None[source]
container() XANoteList[source]
content_identifier() list[str][source]
creation_date() list[datetime][source]
id() list[str][source]
modification_date() list[datetime][source]
name() list[str][source]
save(directory: str) XANotesAttachmentList[source]

Saves all attachments in the list in the specified directory.

Parameters:

directory (str) – The directory to store the saved attachments in

Returns:

A reference to the attachment list object

Return type:

XANotesAttachmentList

Example 1:

Save the attachments in currently selected notes to the downloads folder

>>> import PyXA
>>> app = PyXA.Application("Notes")
>>> app.selection.attachments().save("/Users/exampleuser/Downloads/")

New in version 0.0.4.

shared() list[bool][source]
url() list[XAURL][source]
class PyXA.apps.Notes.XANotesDocument(properties)[source]

Bases: XAObject, XAClipboardCodable

A class for interacting with documents in Notes.app.

New in version 0.0.3.

Attributes:

file

The location of the document on the disk, if one exists.

modified

Whether the document has been modified since the last save.

name

The name of the document.

Methods:

get_clipboard_representation()

Gets a clipboard-codable representation of the document.

property file: str

The location of the document on the disk, if one exists.

get_clipboard_representation() str[source]

Gets a clipboard-codable representation of the document.

When the clipboard content is set to a document, the document’s name is added to the clipboard.

Returns:

The name of the document

Return type:

str

New in version 0.0.8.

property modified: bool

Whether the document has been modified since the last save.

property name: str

The name of the document.

class PyXA.apps.Notes.XANotesDocumentList(properties: dict, filter: dict | None = None)[source]

Bases: XAList, XAClipboardCodable

A wrapper around a list of documents.

New in version 0.0.3.

Methods:

by_file(file)

by_modified(modified)

by_name(name)

file()

get_clipboard_representation()

Gets a clipboard-codable representation of each document in the list.

modified()

name()

by_file(file: str) XANotesDocument[source]
by_modified(modified: bool) XANotesDocument[source]
by_name(name: str) XANotesDocument[source]
file() list[str][source]
get_clipboard_representation() list[str][source]

Gets a clipboard-codable representation of each document in the list.

When the clipboard content is set to a list of documents, the name of each document is added to the clipboard.

Returns:

A list of document names

Return type:

list[str]

New in version 0.0.8.

modified() list[bool][source]
name() list[str][source]
class PyXA.apps.Notes.XANotesFolder(properties)[source]

Bases: XAObject, XAClipboardCodable

A class for interacting with Notes folders and their contents.

See also

class:XANote

Changed in version 0.0.3: Added show()

New in version 0.0.1.

Attributes:

container

The account the folder belongs to.

id

The unique identifier for the folder.

name

The name of the folder.

shared

Whether the folder is shared.

Methods:

delete()

Permanently deletes the folder.

folders([filter])

Returns a list of folders, as PyXA objects, matching the given filter.

get_clipboard_representation()

Gets a clipboard-codable representation of the folder.

move_to(destination)

Moves the folder to the specified container.

notes([filter])

Returns a list of notes, as PyXA objects, matching the given filter.

show()

Shows the folder in the main Notes window.

property container: XANotesAccount

The account the folder belongs to.

delete()[source]

Permanently deletes the folder.

New in version 0.2.0.

folders(filter: dict | None = None) XANotesFolderList[source]

Returns a list of folders, as PyXA objects, matching the given filter.

Parameters:

filter (dict, optional) – Keys and values to filter folders by, defaults to None

Returns:

A PyXA list object wrapping a list of folders

Return type:

XANotesFolderList

New in version 0.2.0.

get_clipboard_representation() str[source]

Gets a clipboard-codable representation of the folder.

When the clipboard content is set to a notes folder, the name of the folder is added to the clipboard.

Returns:

The name of the notes folder

Return type:

str

New in version 0.0.8.

property id: str

The unique identifier for the folder.

move_to(destination: XANotesFolder | XANotesAccount) XANotesFolder[source]

Moves the folder to the specified container.

Returns:

The folder object.

Return type:

XANotesFolder

New in version 0.2.0.

property name: str

The name of the folder.

notes(filter: dict | None = None) XANoteList[source]

Returns a list of notes, as PyXA objects, matching the given filter.

Parameters:

filter (dict, optional) – Keys and values to filter notes by, defaults to None

Returns:

A PyXA list object wrapping a list of notes

Return type:

XANoteList

Changed in version 0.0.3: Now returns an object of XANoteList instead of a default list.

New in version 0.0.1.

property shared: bool

Whether the folder is shared.

show() XANotesFolder[source]

Shows the folder in the main Notes window.

Returns:

The folder object.

Return type:

XANotesFolder

New in version 0.0.3.

class PyXA.apps.Notes.XANotesFolderList(properties: dict, filter: dict | None = None)[source]

Bases: XAList, XAClipboardCodable

A wrapper around a list of Notes folders.

New in version 0.0.3.

Methods:

by_container(container)

by_id(id)

by_name(name)

by_shared(shared)

container()

folders()

get_clipboard_representation()

Gets a clipboard-codable representation of each folder in the list.

id()

name()

notes()

shared()

by_container(container: XANotesAccount) XANotesFolder[source]
by_id(id: str) XANotesFolder[source]
by_name(name: str) XANotesFolder[source]
by_shared(shared: bool) XANotesFolder[source]
container() XANotesAccountList[source]
folders() XANotesFolderList[source]
get_clipboard_representation() list[str][source]

Gets a clipboard-codable representation of each folder in the list.

When the clipboard content is set to a list of folders, the name of each folder is added to the clipboard.

Returns:

A list of folder names

Return type:

list[str]

New in version 0.0.8.

id() list[str][source]
name() list[str][source]
notes() XANoteList[source]
shared() list[bool][source]
class PyXA.apps.Notes.XANotesWindow(properties)[source]

Bases: XASBWindow

A window of Notes.app.

New in version 0.0.1.

Attributes:

document

The active document.

property document: XANotesDocument

The active document.