commit e4b25d5046231bc0b218e6db9dea740c3ab097b5
parent 4ef6389c94b3f7a8c14b19efe77b826f71ae7bf3
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Mon, 28 Oct 2024 08:57:37 +0100
feat: document shortcuts for desktop and Android
Diffstat:
M | README.md | | | 43 | +++++++++++++++++++++++++++++++++++++++++-- |
1 file changed, 41 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
@@ -70,7 +70,7 @@ matches.
![The search-mode in Rememori](https://paste.jayvii.de/7a8349abde12d6c6c3fba76aa3a68354d1310175a98e384c7ab0a3418af059cb)
-### More features
+### API Endpoints
Rememori provides simple API endpoints that can be used via `POST` and `GET`
requests.
@@ -84,11 +84,50 @@ time/date of all notes or for a specific category (for example a `ReadLater`
category). It requires the `user` and `token` arguments as well as the optional
`category` argument.
-Rememori also features a simple bookmarklet in the navigation menu. A user can
+## Using Shortcuts to save Notes to Rememori
+
+### Desktop (Webbrowser)
+
+Rememori features a simple bookmarklet in the navigation menu. A user can
simply drag this into their web browser's bookmarks toolbar to send any webpage
they are currently to to Rememori with a single click on the bookmark item in
their browser's toolbar.
+The bookmarklet contains a simple Javascript function (created in
+[lib/bookmarklet.php](https://src.jayvii.de/pub/rememori/file/lib/bookmarklet.php.html))
+that will prompt the user for a category and send the currently opened page of
+your web browser to the `/api/new.php` [API endpoint](#api-endpoints).
+
+### Android
+
+On Android, you may use Apps like
+[HTTP Shortcuts](https://http-shortcuts.rmy.ch/) (also available on
+[F-Droid](https://f-droid.org/en/packages/ch.rmy.android.http_shortcuts/)) to
+share text and URLs through Android's share-intend.
+
+To set up HTTP Shortcuts, open the app and
+[create new variables](https://http-shortcuts.rmy.ch/variables):
+
+1. `rememori_server`: "https://rememori.example.com" (your rememori URL)
+2. `rememori_user`: "me" (your username)
+3. `rememori_token`: "my-secret-token" (an extra password you need to create)
+4. `text_and_url`. Ensure this variable has the options "Allow Share..." and
+ "only text" checked
+
+Then create a new shortcut for each share-option with its own category. Name it
+appropriately, for example `Rememori (category: ReadItLater)`.
+
+Under "General settings", set the method `GET` and insert following URL (adjust
+the category accordingly. In the example below it is `ReadItLater`):
+
+```
+{rememori_server}/api/new.php?category=ReadItLater&user={rememori_user}&token={rememori_token}&content={text_and_url}
+```
+
+Save the shortcut and you are good to go! When sharing text or URLs from any
+app, you may now choose the newly created shortcut to send it directly to your
+rememori instance.
+
## Setup
Coming soon...