Listify
COMMENT
𝐋𝐢𝐬𝐭𝐢𝐟𝐲 can be used to create fancy lists with image icons, title, and subtitle text through on-the-fly generated Contact vCards.
Created by /u/imaldonado on Reddit, or @ian on RoutineHub ( https://routinehub.co/user/Ian )
Can be used as a dependency within your Shortcuts by passing images to 𝐋𝐢𝐬𝐭𝐢𝐟𝐲, and using a 𝙲𝚑𝚘𝚘𝚜𝚎 𝚏𝚛𝚘𝚖 𝙻𝚒𝚜𝚝 action immediately following the 𝚁𝚞𝚗 𝚂𝚑𝚘𝚛𝚝𝚌𝚞𝚝: 𝙻𝚒𝚜𝚝𝚒𝚏𝚢 action.
Before passing a group of images to this shortcut, use a 𝚂𝚎𝚝 𝙽𝚊𝚖𝚎 action on each one.
Format the name with some text which will be used as the list item 𝗧𝗶𝘁𝗹𝗲, and if you'd like a 𝗦𝘂𝗯𝘁𝗶𝘁𝗹𝗲, include that text within square brackets.
Example image being passed to 𝐋𝐢𝐬𝐭𝐢𝐟𝐲:
𝚂𝚎𝚝 𝙽𝚊𝚖𝚎: 𝗧𝗵𝗶𝘀 𝗶𝘀 𝘀𝗼𝗺𝗲 𝘁𝗶𝘁𝗹𝗲 𝘁𝗲𝘅𝘁 [𝘩𝘦𝘳𝘦 𝘪𝘴 𝘴𝘰𝘮𝘦 𝘴𝘶𝘣𝘵𝘪𝘵𝘭𝘦 𝘵𝘦𝘹𝘵].png
If you also add the word (𝚗𝚘𝚏𝚛𝚊𝚖𝚎) including parenthesis to the item's 𝚂𝚎𝚝 𝙽𝚊𝚖𝚎 action, 𝐋𝐢𝐬𝐭𝐢𝐟𝐲 won't add a border around your image, useful when passing . 𝚙𝚗𝚐 images with transparency to make non-circular icons.
Note that animated gif images can be passed in addition to other image types, resulting in animated icons within the list.
An example shortcut can be downloaded from the 𝐋𝐢𝐬𝐭𝐢𝐟𝐲'𝐬 RoutineHub page that demonstrates it in action.
DICTIONARY

Dictionary
VARIABLES
Get
Shortcut Input
SCRIPTING
Repeat with each item in
Input

Repeat Results
MEDIA
Resize
Image
to
500.0
x
500.0

Resized Image
VARIABLES
Set variable
img
to
Input
SCRIPTING
Mode
Dictionary
with base64

Base64 Encoded
VARIABLES
Set variable
Icon
to
Input
VARIABLES
Get
Repeat Item
TEXT
Match
(?<=\[)(.*?)(?=\])
in
Text

Matches
SCRIPTING
Get
Last Item
from
List

Item from List
VARIABLES
Set variable
Subtitle
to
Input
VARIABLES
Get
Repeat Item
SCRIPTING
If
Input
Condition
DOCUMENTS
Replace
(noframe)
with
World
in
Text

Updated Text
DOCUMENTS
Replace
[
Subtitle
]
with
World
in
Text

Updated Text
VARIABLES
Set variable
Title
to
Input
SCRIPTING
Otherwise
DOCUMENTS
Replace
[
Subtitle
]
with
World
in
Text

Updated Text
VARIABLES
Set variable
Title
to
Input
VARIABLES
Get
frame
SCRIPTING
Decode
Dictionary
with base64

Base64 Encoded
VARIABLES
Get
img
MEDIA
Overlay
Base64 Encoded
on
Image

Overlaid Image
SCRIPTING
Mode
Dictionary
with base64

Base64 Encoded
VARIABLES
Set variable
Icon
to
Input
SCRIPTING
End If

If Result

Text
SCRIPTING
Set name of
Input
to
Title
.vcf

Renamed Item
SCRIPTING
End Repeat

Repeat Results
CONTACTS
Get contacts from
Input

Contacts
Showcuts