Login About Gallery
List and Dictionary Helper
COMMENT
‎This shortcut supports UpdateHub: https://routinehub.co/shortcut/2066 That is, you can check for updates of all UpdateHub-supported shortcuts by manually running the UpdateHub shortcut. RoutineHubUpdate Current Version: "2.0" RoutineHub ID: "5176" RoutineHubUpdate
COMMENT
‎Run 𝗟𝗶𝘀𝘁 𝗮𝗻𝗱 𝗗𝗶𝗰𝘁𝗶𝗼𝗻𝗮𝗿𝘆 𝗛𝗲𝗹𝗽𝗲𝗿 from your shortcut to add, replace or remove an item in a list or dictionary. Please read instructions on the RoutineHub webpage below. 2020-08-26 ⓥ2.0 @gluebyte u/gluebyte https://routinehub.co/shortcut/5176
MATHS
‎Random number between ‎1 ‎and ‎10
SCRIPTING
‎If ‎Random Number ‎is ‎1
DOCUMENTS
‎Get File
Service
‎iCloud Drive
Show Document Picker
File Path
‎/Shortcuts/example.txt
Error If Not Found
SCRIPTING
‎If ‎File ‎is greater than ‎Current Date
SCRIPTING
‎Otherwise
SCRIPTING
‎Get current IP address
‎Options Under Construction
SCRIPTING
‎If ‎Current IP Address ‎has any value
NETWORK
‎Get contents of ‎https://routinehub.co/api/v1/shortcuts/5176/versions/latest
‎Options Under Construction
SCRIPTING
‎Get ‎Value ‎for ‎Version ‎in ‎Contents of URL
SCRIPTING
‎If ‎Dictionary Value ‎has any value
SCRIPTING
‎If ‎Dictionary Value ‎is not ‎2.0
NOTIFICATIONS
‎Show notification ‎Dictionary Value
‎Options Under Construction
SCRIPTING
‎End If
SCRIPTING
‎End If
CALENDAR
‎Add ‎2 ‎days ‎from ‎Current Date
DOCUMENTS
‎Save ‎Adjusted Date
Service
‎iCloud Drive
Ask Where to Save
Destination Path
‎/Shortcuts/List and Dictionary Helper Update Check.txt
Overwrite If File Exists
SCRIPTING
‎End If
SCRIPTING
‎End If
SCRIPTING
‎End If
SCRIPTING
‎If ‎Shortcut Input ‎has any value
TEXT
‎<script> let input = ‎Shortcut Input ‎; val = input.value; subo = obj = input.dictionary ?? input.list; //if (typeof obj === "string" && obj[0]+obj[obj.length-1] === "{}") { obj = JSON.parse(obj) } keys = [...(input.key ?? input.index).matchAll(/(?:^"|\.")([^"\\]*(?:\\.[^"\\]*)*)(?:")|(?:^|\.)([^"][^\.]*)/g)].map(arr => isNaN(k = arr[2] ?? arr[1]) ? k : parseInt(k)); last = keys.pop(); prevo = prevk = null; keys.forEach(k => {prevo = subo; prevk = isNaN(k) ? k : k + (k < 1 ? subo.length : -1); subo = subo[prevk]}); if (isNaN(last)) { if (val != null) { subo[last] = val } else { delete subo[last] } } else { if (!subo || subo.constructor !== Array) { subo = prevk != null ? (prevo[prevk] = [subo]) : (obj = [subo]); } last += last < 1 ? subo.length : -1; if (val != null) { subo.splice(last,0,val) } else { subo.splice(last,1) } } document.write(encodeURIComponent(JSON.stringify({"output":obj}))); </script>
SCRIPTING
‎Encode ‎Text ‎with base64
URL
‎data:text/html;charset=utf-8;base64, ‎Base64 Encoded
SCRIPTING
‎URL ‎Decode ‎URL
SCRIPTING
‎If ‎URL Encoded Text ‎has any value
SCRIPTING
‎Get ‎Value ‎for ‎output ‎in ‎URL Encoded Text
SCRIPTING
‎Otherwise
SCRIPTING
‎Show alert ‎Error in 𝙇𝙞𝙨𝙩 𝙖𝙣𝙙 𝘿𝙞𝙘𝙩𝙞𝙤𝙣𝙖𝙧𝙮 𝙃𝙚𝙡𝙥𝙚𝙧
Title
‎Error in 𝙇𝙞𝙨𝙩 𝙖𝙣𝙙 𝘿𝙞𝙘𝙩𝙞𝙤𝙣𝙖𝙧𝙮 𝙃𝙚𝙡𝙥𝙚𝙧
Show Cancel Button
SCRIPTING
‎End If
SCRIPTING
‎Otherwise
SCRIPTING
‎Show alert ‎Informational Message
Title
‎optional
Show Cancel Button
SCRIPTING
‎End If

Showcuts

Magic Vars

Screenshot

Submitted Anonymously 3 years ago

Visit iCloud (iOS)

Copy iCloud Link

Scan QR Code

0