SCRIPTING
Continue in Shortcuts app
COMMENT
Shortcut by
user/ROP (RoutineHub)
u/ROPit (Reddit)
SCRIPTING
Get dictionary from
Shortcut Input

Dictionary
SCRIPTING
Get
Value
for
function
in
Dictionary

Dictionary Value
VARIABLES
Set variable
input
to
Dictionary Value
DICTIONARY

Dictionary
VARIABLES
Set variable
local_data
to
Dictionary
COMMENT
Embed-a-Update by @pfg
Embed-a-Update is an updater like no other. Instead of requiring users download an extra shortcut to update HiRes GIFs, Embed-a-Update is embedded directly into this shortcut.
https://routinehub.co/shortcut/2672
SCRIPTING
Get current IP address
Options Under Construction

Current IP Address
SCRIPTING
Count
Items
in
Current IP Address

Count
SCRIPTING
If
Count
is
0
SCRIPTING
Otherwise
URL
https://routinehub.co/api/v1/shortcuts/
local_data
/versions/latest

URL
NETWORK
Get contents of
URL
Options Under Construction

Contents of URL
SCRIPTING
If
result
contains
success
DICTIONARY

Dictionary
TEXT
<html><head></head><body><script>
// Embed-a-Engine 1.0
function cmp (a, b) {
let pa = a.split('.');
let pb = b.split('.');
for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
let na = Number(pa[i]);
let nb = Number(pb[i]);
if (isNaN(na)) na = 0;
if (isNaN(nb)) nb = 0;
if (na > nb) return "RollbackAvailable";
if (nb > na) return "UpdateAvailable";
}
return "NoChanges";
};
let data =
CompareVersionsData
;
document.write(cmp(data.current, data.new));
</script></body></html>

Text
URL
data:text/html,
Text

URL
SAFARI
Get contents of web page at
URL

Contents of Web Page
SCRIPTING
If
Contents of Web Page
is
NoChanges
SCRIPTING
Otherwise
SCRIPTING
If
Contents of Web Page
is
RollbackAvailable
TEXT
HiRes GIFs Update Information
—
A rollback is available:
local_data
↘
result
result

Text
SCRIPTING
Otherwise
TEXT
HiRes GIFs Update Information
—
An update is available:
local_data
→
result
result

Text
SCRIPTING
End If

If Result
SCRIPTING
Choose from Menu

Menu Result
SCRIPTING
Install result (Version)

Menu Result
URL
https://routinehub.co/download/
result

URL
SAFARI
Open
URL
SCRIPTING
Exit shortcut with
Result
SCRIPTING
End Menu

Menu Result
SCRIPTING
End If

If Result
SCRIPTING
Otherwise
SCRIPTING
Show alert
Informational Message
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
DOCUMENTS
Create Folder
Path
/Shortcuts/HiRes GIFs
DICTIONARY

Dictionary
VARIABLES
Set variable
notification
to
Dictionary
SCRIPTING
Decode
notification
with base64

Base64 Encoded
VARIABLES
Set variable
yay
to
Base64 Encoded
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
SCRIPTING
Get
Value
for
size
in
File

Dictionary Value
VARIABLES
Set variable
size_result
to
Dictionary Value
VARIABLES
Set variable
run_shortcut
to
local_data
COMMENT
Videos
SCRIPTING
If
input
is
Videos
PHOTOS
Find
All Photos
where
[{'class': 'filter-property', 'value': 'Media Type'}, {'class': 'filter-operator', 'value': 'is'}, {'class': 'filter-benchmark', 'value': 'Video'}] Sort by
Last Modified Date

Photos
VARIABLES
Set variable
vids_found
to
Photos
SCRIPTING
Count
Items
in
vids_found

Count
SCRIPTING
If
Count
is
0
SCRIPTING
Show alert
No videos found!
SHORTCUTS
Run
run_shortcut

Shortcut Result
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
SCRIPTING
Choose from
vids_found
Prompt
Select at least one video

Chosen Item
VARIABLES
Set variable
selection
to
Choose from List
SCRIPTING
Count
Items
in
selection

Count
SCRIPTING
If
Count
is
0
SCRIPTING
Show alert
Please select at least one video!
Title
Please select at least one video!
DICTIONARY

Dictionary
SHORTCUTS
Run
run_shortcut

Shortcut Result
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
SHARING
Copy
selection
to clipboard
DICTIONARY

Dictionary
SHORTCUTS
Run
run_shortcut

Shortcut Result
SCRIPTING
Exit shortcut with
Result
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
COMMENT
Live Photos
SCRIPTING
If
input
is
Live Photos
PHOTOS
Find
All Photos
where
[{'class': 'filter-property', 'value': 'Photo Type'}, {'class': 'filter-operator', 'value': 'is'}, {'class': 'filter-benchmark', 'value': 'Live Photo'}] Sort by
Last Modified Date

Photos
VARIABLES
Set variable
livep_found
to
Photos
SCRIPTING
Count
Items
in
livep_found

Count
SCRIPTING
If
Count
is
0
SCRIPTING
Show alert
No live photos found!
Title
No live photos found!
SHORTCUTS
Run
run_shortcut

Shortcut Result
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
SCRIPTING
Choose from
livep_found
Prompt
Select at least one live photo

Chosen Item
VARIABLES
Set variable
selection
to
Chosen Item
SCRIPTING
Count
Items
in
selection

Count
SCRIPTING
If
Count
is
0
SCRIPTING
Show alert
Please select at least one live photo!
Title
Please select at least one live photo!
DICTIONARY

Dictionary
SHORTCUTS
Run
run_shortcut

Shortcut Result
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
SHARING
Copy
selection
to clipboard
DICTIONARY

Dictionary
SHORTCUTS
Run
run_shortcut

Shortcut Result
SCRIPTING
Exit shortcut with
Result
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
COMMENT
Bursts
SCRIPTING
If
input
is
Bursts