Automate Apple / macOS Notes.app with python.
Project description
MacNotesApp
Work with Apple MacOS Notes.app from the command line. Also includes python interface for scripting Notes.app from your own python code.
Installation
If you just want to use the command line tool, the easiest option is to install via pipx.
If you use pipx
, you will not need to create a python virtual environment as pipx
takes care of this. The easiest way to do this on a Mac is to use homebrew:
- Open
Terminal
(search forTerminal
in Spotlight or look inApplications/Utilities
) - Install
homebrew
according to instructions at https://brew.sh/ - Type the following into Terminal:
brew install pipx
- Then type this:
pipx install macnotesapp
pipx
will install themacnotesapp
command line interface (CLI) as an executable namednotes
- Now you should be able to run
notes
by typing:notes
Once you've installed macnotesapp with pipx, to upgrade to the latest version:
pipx upgrade macnotesapp
Command Line Usage
Usage: notes [OPTIONS] COMMAND [ARGS]...
notes: work with Apple Notes on the command line.
Options:
-v, --version Show the version and exit.
-h, --help Show this message and exit.
Commands:
accounts Print information about Notes accounts.
add Add new note.
config Configure default settings for account, editor, etc.
help Print help; for help on commands: help <command>.
list List notes, optionally filtering by account or text.
Use notes help COMMAND
to get help on a specific command. For example, notes help add
:
Usage: notes add [OPTIONS] NOTE
Add new note.
There are multiple ways to add a new note:
Add a new note from standard input (STDIN):
notes add
cat file.txt | notes add
notes add < file.txt
Add a new note by passing string on command line:
notes add NOTE
Add a new note by opening default editor (defined in $EDITOR or via `notes
config`):
notes add --edit
notes add -e
If NOTE is a single line, adds new note with name NOTE and no body. If NOTE is
more than one line, adds new note where name is first line of NOTE and body is
remainder.
Body of note must be plain text unless --html/-h or --markdown/-m
flag is set in which case body should be HTML or Markdown, respectively. If
--edit/-e flag is set, note will be opened in default editor before
being added. If --show/-s flag is set, note will be shown in Notes.app
after being added.
Account and top level folder may be specified with --account/-a and
--folder/-f, respectively. If not provided, default account and folder
are used.
Options:
-s, --show Show note in Notes after adding.
-F, --file FILENAME
-h, --html Use HTML for body of note.
-m, --markdown Use Markdown for body of note.
-p, --plaintext Use plaintext for body of note (default unless changed
in `notes config`).
-e, --edit Edit note text before adding in default editor.
-a, --account ACCOUNT Add note to account ACCOUNT.
-f, --folder FOLDER Add note to folder FOLDER.
--help Show this message and exit.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
macnotesapp-0.2.0.tar.gz
(18.0 kB
view hashes)
Built Distribution
Close
Hashes for macnotesapp-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82b1c3e03e9789b5a36e7edc833f6234a4447b352c2cf69ae56e9e003d142352 |
|
MD5 | 08999368d89bf17fb2724d3888f12476 |
|
BLAKE2b-256 | 014116f49eeb4efd749d0a5993bd8a687cd4742511f28f842ccb3b197e0b72db |