Skip to content

Commit a22c0c4

Browse files
authored
docs: Add community docs for an iOS shortcut (attempt 2) (#5345)
1 parent 4dfc5ea commit a22c0c4

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
!!! info
2+
This guide was submitted by a community member. Find something wrong? Submit a PR to get it fixed!
3+
4+
An easy way to add recipes to Mealie from an Apple device is via an Apple Shortcut. This is a short guide to install an configure a shortcut able to add recipes via a link or image(s).
5+
6+
*Note: if adding via images make sure to enable [Mealie's openai integration](https://docs.mealie.io/documentation/getting-started/installation/open-ai/)*
7+
8+
## Javascript can only be run via Shortcuts on the Safari browser on MacOS and iOS. If you do not use Safari you may skip this section
9+
Some sites have begun blocking AI scraping bots, inadvertently blocking the recipe scraping library Mealie uses as well. To circumvent this, the shortcut uses javascript to capture the raw html loaded in the browser and sends that to mealie when possible.
10+
11+
**iOS**
12+
13+
Settings app -> apps -> Shortcuts -> Advanced -> Allow Running Scripts
14+
15+
**MacOS**
16+
17+
Shortcuts app -> Settings (CMD ,) -> Advanced -> Allow Running Scripts
18+
19+
## Initial setup
20+
An API key is needed to authenticate with mealie. To create an api key for a user, navigate to http://YOUR_MEALIE_URL/user/profile/api-tokens. Alternatively you can create a key via the mealie home page by clicking the user's profile pic in the top left -> Api Tokens
21+
22+
The shortcut can be installed via **[This link](https://www.icloud.com/shortcuts/52834724050b42aebe0f2efd8d067360)**. Upon install, replace "MEALIE_API_KEY" with the API key generated previously and "MEALIE_URI" with the full URL used to access your mealie instance e.g. "http://10.0.0.5:9000" or "https://mealie.domain.com".
23+
24+
## Using the shortcut
25+
Once installed, the shortcut will automatically appear as an option when sharing an image or webpage. It can also be useful to add the shortcut to the home screen of your device. If selected from the home screen or shortcuts app, a menu will appear with prompts to import via **taking photo(s)**, **selecting photo(s)**, **scanning a URL**, or **pasting a URL**.
26+
27+
*Note: despite the mealie API being able to accept multiple recipe images for import it is currently impossible to send multiple files in 1 web request via Shortcuts. Instead, the shortcut combines the images into a singular, vertically-concatenated image to send to mealie. This can result in slightly less-accurate text recognition.*

docs/mkdocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ nav:
9090
- Bulk Url Import: "documentation/community-guide/bulk-url-import.md"
9191
- Home Assistant: "documentation/community-guide/home-assistant.md"
9292
- Import Bookmarklet: "documentation/community-guide/import-recipe-bookmarklet.md"
93-
- iOS Shortcuts: "documentation/community-guide/ios.md"
93+
- iOS Shortcut: "documentation/community-guide/ios-shortcut.md"
9494
- Reverse Proxy (SWAG): "documentation/community-guide/swag.md"
9595

9696
- API Reference: "api/redoc.md"

0 commit comments

Comments
 (0)