-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
7,746 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Command Line Reference | ||
|
||
::: mkdocs-click | ||
:module: macnotesapp.cli | ||
:command: cli_main | ||
:prog_name: notes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Welcome to MacNotesApp | ||
|
||
Work with Apple MacOS Notes.app from the command line. Also includes python interface for scripting Notes.app from your own python code. Interactive browsing of notes in a TUI (Terminal User Interface? Textual User Interface?) coming soon! | ||
|
||
For full documentation visit [macnotesapp](https://rhettbull.github.io/macnotesapp/). | ||
|
||
## Installation | ||
|
||
If you just want to use the command line tool, the easiest option is to install via [pipx](https://pypa.github.io/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](https://brew.sh/): | ||
|
||
* Open `Terminal` (search for `Terminal` in Spotlight or look in `Applications/Utilities`) | ||
* Install `homebrew` according to instructions at [https://brew.sh/](https://brew.sh/) | ||
* Type the following into Terminal: `brew install pipx` | ||
* Then type this: `pipx install macnotesapp` | ||
* `pipx` will install the `macnotesapp` command line interface (CLI) as an executable named `notes` | ||
* 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 | ||
|
||
**Note**: Currently tested on MacOS 10.15.7/Catalina and 13.1/Ventura. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
""""Remove rich markup from the given text. | ||
The CLI docstrings use rich markup for pretty-printing help text but this needs to be stripped for serving the docs. | ||
""" | ||
import re | ||
|
||
import mkdocs.plugins | ||
|
||
mkdocs.plugins.event_priority(-50) | ||
|
||
|
||
def on_page_content(html, page, config, files, **kwargs): | ||
html = re.sub(r"\[[ib\/][ib]?\]", r"", html) | ||
return html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
site_name: MacNotesApp Docs | ||
site_url: https://rhettbull.github.io/macnotesapp/ | ||
markdown_extensions: | ||
- mkdocs-click | ||
nav: | ||
- Home: index.md | ||
- Command Line Reference: cli.md | ||
hooks: | ||
- docs/strip_rich_markup.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
|
||
|
||
<link rel="shortcut icon" href="/macnotesapp/img/favicon.ico"> | ||
<title>MacNotesApp Docs</title> | ||
<link href="/macnotesapp/css/bootstrap.min.css" rel="stylesheet"> | ||
<link href="/macnotesapp/css/font-awesome.min.css" rel="stylesheet"> | ||
<link href="/macnotesapp/css/base.css" rel="stylesheet"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css"> | ||
|
||
<script src="/macnotesapp/js/jquery-1.10.2.min.js" defer></script> | ||
<script src="/macnotesapp/js/bootstrap.min.js" defer></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script> | ||
<script>hljs.initHighlightingOnLoad();</script> | ||
</head> | ||
|
||
<body> | ||
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary"> | ||
<div class="container"> | ||
<a class="navbar-brand" href="/macnotesapp/.">MacNotesApp Docs</a> | ||
<!-- Expander button --> | ||
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
<!-- Expanded navigation --> | ||
<div id="navbar-collapse" class="navbar-collapse collapse"> | ||
<!-- Main navigation --> | ||
<ul class="nav navbar-nav"> | ||
<li class="navitem"> | ||
<a href="/macnotesapp/." class="nav-link">Home</a> | ||
</li> | ||
<li class="navitem"> | ||
<a href="/macnotesapp/cli/" class="nav-link">Command Line Reference</a> | ||
</li> | ||
</ul> | ||
|
||
<ul class="nav navbar-nav ml-auto"> | ||
<li class="nav-item"> | ||
<a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal"> | ||
<i class="fa fa-search"></i> Search | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="container"> | ||
<div class="row"> | ||
|
||
<div class="row-fluid"> | ||
<div id="main-content" class="span12"> | ||
<h1 id="404-page-not-found" style="text-align: center">404</h1> | ||
<p style="text-align: center"><strong>Page not found</strong></p> | ||
</div> | ||
</div> | ||
|
||
|
||
</div> | ||
</div> | ||
|
||
<footer class="col-md-12"> | ||
<hr> | ||
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p> | ||
</footer> | ||
<script> | ||
var base_url = "/macnotesapp/", | ||
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83}; | ||
</script> | ||
<script src="/macnotesapp/js/base.js" defer></script> | ||
<script src="/macnotesapp/search/main.js" defer></script> | ||
|
||
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true"> | ||
<div class="modal-dialog modal-lg"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h4 class="modal-title" id="searchModalLabel">Search</h4> | ||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> | ||
</div> | ||
<div class="modal-body"> | ||
<p>From here you can search these documents. Enter your search terms below.</p> | ||
<form> | ||
<div class="form-group"> | ||
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here"> | ||
</div> | ||
</form> | ||
<div id="mkdocs-search-results" data-no-results-text="No results found"></div> | ||
</div> | ||
<div class="modal-footer"> | ||
</div> | ||
</div> | ||
</div> | ||
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4> | ||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> | ||
</div> | ||
<div class="modal-body"> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th style="width: 20%;">Keys</th> | ||
<th>Action</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td class="help shortcut"><kbd>?</kbd></td> | ||
<td>Open this help</td> | ||
</tr> | ||
<tr> | ||
<td class="next shortcut"><kbd>n</kbd></td> | ||
<td>Next page</td> | ||
</tr> | ||
<tr> | ||
<td class="prev shortcut"><kbd>p</kbd></td> | ||
<td>Previous page</td> | ||
</tr> | ||
<tr> | ||
<td class="search shortcut"><kbd>s</kbd></td> | ||
<td>Search</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<div class="modal-footer"> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.