If you don’t have the actions app, and want to learn how to build them yourself:
-
Photo encoding can be done with the “Base64 Encode” action, just make sure to change the setting from “Every 76 characters” to “None”
-
All you need to make the menu cosmetically appealing is… BEGIN:VCARD, N:, ORG:, PHOTO;ENCODING=b:, and END:VCARD. Each separated by new lines.
-
A helpful tip to make them easier to edit and smooth out the creation of large shortcuts: Put your Base64 encoded images into a dictionary, and call them to the shortcut with a dictionary variable.
More Details for each step:
-
Step 1: Make this shortcut
-
“Select Photos” action (Limit = 1)
-
“Resize Image” or “Crop Image” or a combination of both? Either way, you want the image to be 123x123 [Selected Photo]
-
“Base64 Encode” (Line Breaks = 0) [Resized Image]
-
“Copy to Clipboard” or “Save File” [Resized Image] Note: I recommend saving the images, so you can collect them easier in the future!
-
Step 2: What each of your vCards should look like, where each number repeats a new line
-
BEGIN:VCARD
-
N:“insert menu item name here“
-
ORG:“insert a brief description of the menu item here”
-
PHOTO;ENCODING=b:“insert Base64 code here”
-
END:VCARD
-
Here is an example of a full vCard if you want to see examples of how to make it display differently or store extra data like it’s a dictionary!
-
Step 3: Creating and using the dictionary
-
Use the Text option when adding an item to the dictionary. Then make the “Key” of each image the Name of what the menu item will be, and the “Value” of each will be the Base64 code.
-
To extract the image for use in the vCard:
-
In the photo portion of the vCard, select the dictionary variable as the option for that image.
-
In the settings for that variable, scroll to the bottom of the list.
-
Enter the key for that image where it says “Get Value for Key” (Make sure to use proper spelling and punctuation, because it will only find exact matches!)
- If you are curious how I store images, here is the shortcut that I use to organize my Base64 Encoded images vCard Icon Manager: I put this on my Home Screen, so it’s easy to Create, Store, and Extract Base64 encoded images. Note: If you run this shortcut, make sure to use the upload option first, to create the necessary files. Also: You can ignore the option for full images, I use that to work with JavaScript pages (I’m still learning how they work!)
Let me know if you have any questions, or need help with anything else!
- Источник: www.reddit.com
- _Мета слова: _