Accepts
Safari Web Pages and URLs
VARIABLES
Set variable
Input
to
Shortcut Input
SCRIPTING
Get type of
Input

Type
VARIABLES
Set variable
InputType
to
Type
DICTIONARY

Dictionary
VARIABLES
Set variable
Dict
to
MainDict
VARIABLES
Set variable
SName
to
Dict
COMMENT
1.44
- add option for not saving post text to iCloud Drive
- adjust updater to use a quicklook to display the prompt instead of the choose from list action
- adjust prompt for saving post text
- adjusted the regex used for grabbing story content due to a regional instagram difference
1.43
- Updated the RegEx used when grabbing story media due to some changes that Instagram made. No more smaller square photo downloads from stories :)
1.42
- Fix some variable type bugs to make overlay and copy clipboard features work again
- Update adjustments: removed notifications
1.41
- Add iOS version detection to keep the shortcut from opening the Shortcuts app
1.40
- Slight adjustment in the chosen item for main menu choices to be set to look at the Contact Name instead of just Contact (due to iOS 14)
- Story downloads now send the user to Safari due to issues with loading of Show Webpage in iOS 14
1.39
- Better handling of issues when using VPN or user is from certain regions
- Reworded the private post alert to accommodate VPN user errors
1.38
- Handling of story sharing from the Instagram app and also from clipboard has been added
- Removed character count for URLs.txt file
- Removed multi post downloads option for downloading "half" of the posts (reducing actions)
- Removed unnecessary actions remaining in the Get Caption section
- Tweaks to index chooser for multi post downloads
1.37
- Adjustment for stories username grabbing
- Tweak to how the PageJSON data is grabbed
1.36
- Changed the URL check to look for nstagram instead of just being a valid URL
- Fixed an issue with saving to Photos app
- Minor improvement to reduce clipboard actions in beginning of shortcut
- PageJSON is now containing just the graphql dictionary (optimization)
- Reduction of actions by optimizing and reducing unnecessary action blocks
- Removal of ask for input when running from main menu. Now the shortcut just grabs clipboard
1.35
- Added a fix for profile photo downloads sometimes grabbing the wrong username
- Added first run question for showing notifications or not when downloading items
- Added Main Menu option to toggle notification setting
- Added 1 second wait before returning to share source to keep the notification banner from disappearing so fast
- Profile bio is now included in the post text to be downloaded or copied to clipboard
1.34
- Fix for profile photo downloading from link on clipboard
- Return to the app the item was shared from added at the end of the shortcut
- Updater fixes. If you're trying to update and it's not working, you can download the shortcut again.
1.33
- Adjustment or username grabbing when user is grabbing their own profile photo
- Added Yes/No list as variable to cut down on actions
- Caption grabbing is now the same for both Safari and App method
- Move Username grab above the normal mode if statement
- Slimmed the get caption section slightly and modified the method if safari is the input type
- Slimmed NormalMode check section with match text instead of multiple IFs
1.32
- Adjustment on Auto Mode Skip variable setting
- Implement Swing Updater E (by: D3W10) instead of the previous updater to save on actions and runtime
- Move continue in shortcuts app action to beginning to help with speed
- Moved settings initialization to top of shortcut for addition of updater cool down time (4 hours)
- Move settings saving to be below the post text save so the media is saved together in iCloud when sorting by date
- Optimize actions while running the shortcut and simplify some of the if statements
- Optimize main menu to only use one delete files and one exit shortcut action at the end of the menu.
1.31
- Incorporated slightly different updater method
- Change post text copy to clipboard notification to be an alert
1.30
- Adjusted updater for localization issues
- Disable overlay of username if downloading profile photo
- Fixes for username grabbing when JSON isn't found
- Fixes for downloading profile photo from Safari
- Fixes for downloading profile photo from App
- Fixes for download a post via Safari also downloading the profile photo
- Moved updater to beginning of shortcut (to reduce issues that can't be fixed without downloading again manually)
- Update to main menu buttons text (minor)
1.29
- Move username overlay to right edge
- Add setup question for overlay always, overlay never, always ask for overlay
- Add setup question for always downloading all items (for multi media posts)
- Added Exit Shortcut Action after resetting settings
- Overlay of username now has rounded rectangle
1.28
- Added setting for copying post text to clipboard every time, asking each time, or never
1.27
- Check if JSON value exists before getting username from it
- Adjustment for new IGTV urls
- Username grabbing fix for when JSON isn't able to be found (sorry, JSON's mom, I tried lol)
1.26
- Fix PageJSON with get dictionary from input action
1.25
- Adjustments for better username grabbing
- New Feature: Overlay of username onto photos (credit to robric18 for the base of the overlay method)
1.24
- Slight RegEx adjustment for username grabbing
1.23
- Added compatibility for iOS 14 beta
- Added menu option to delete all downloaded media
- Added exit shortcut actions after the delete urls.txt and reset settings options in the main menu
1.22
- multiple post downloading added. Need to use Insta Indexer in Safari first, then run Instagram Media Saver
- adjustment of file name saving for better sorting
- able to download media from post link on clipboard
- all post media is selected as default but items can be left out from saving by deselecting them
- implemented ability to save to iCloud Drive or Photos app instead of defaulting to Photos app
- Adjusted updater mechanism to use a menu instead of alert. Using number comparison again due to help of calculated current version (e.g. Version in dictionary is set to 122 but calculated to be 1.22 or 1,22 depending on region)
- Profile picture download support. (See the RoutineHub page for instructions)
- Slight modification to username grabbing due to issue found with not grabbing the right information
- Cleaned up saving section for faster response
1.21
- adjustment for posts that have no caption
1.20
- updater adjusted for international number formatting (x,xx)
1.19
- address further updated issue
- address issue with RegEx for downloading photos to not show choose from images multiple times
1.18
- Fix issue with updater
1.17
- Fixed an issue with some videos not being grabbed due to the RegEx not looking far enough ahead.
1.16
- Cleaned up some remaining items from 1.15 that are no longer needed due to the new RegEx used
- Improved URL grabbing for videos so the video image is not downloaded
- Added some additional comments to clearly define the sections
1.15
- Refined username grabbing due to issue found
1.14
- Improvement to the caption grabbing
- Improvement to username grabbing
1.13
- Copied post text also includes the post link now
1.12
- removed some previous actions required to not download profile pictures in story downloads. This was needed to address story videos not downloading.
1.11
- modified username RegEx
- modifications to add username grabs
- added caption feature
New in 1.10:
Resolved issue with some story downloads from private profiles
New in 1.09:
- (fix) Profile pictures are no longer downloaded from private profiles
New in 1.08:
- Made adjustments time the notification at the end so it tells you if the item is photo or video
- Made adjustments to story downloads so it only grabs the relevant photo/video desired (videos also have an image as well)
New in 1.07:
- Story downloads supported via Instagram in Safari
New in 1.06:
- some photo name adjustments
New in 1.05:
- fix for private posts not working properly
New in 1.04:
Adjustments for when some private images won't load properly.
New in 1.03:
Fix for different region's instagram source URLs
SCRIPTING
Get the
System Version

Device Name
VARIABLES
Set variable
SysV
to
System Version
SCRIPTING
If
SysV
begins with
13
SCRIPTING
Continue in Shortcuts app
SCRIPTING
End If

If Result
LIST

List
VARIABLES
Set variable
Yes No
to
List
NUMBER
1

Number
VARIABLES
Set variable
1
to
Number
DOCUMENTS
Create Folder
Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'SName', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
SCRIPTING
If
File
does not have any value
LIST

List
TEXT
Where do you want your media stored?
This setting is saved for future runs.
To reset, delete the file "settings.json" at:
iCloud Drive/Shortcuts/
SName
This can also be done from the main menu

Text
SCRIPTING
Choose from
List
Prompt
[{'class': 'magic', 'value': 'Text', 'glyph': '', 'UUID': 'EDC965CE-11FE-4C1F-9666-26ADC5721089'}]

Chosen Item
DICTIONARY

Dictionary
DOCUMENTS
Save
Dictionary
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'SName', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}, {'value': '/settings.json', 'class': 'text'}]Overwrite If File Exists

Saved File
SCRIPTING
End If

If Result
VARIABLES
Set variable
Settings
to
If Result
VARIABLES
Set variable
InitialSettings
to
Settings
TEXT
Settings

Text
VARIABLES
Set variable
StorageLoc
to
Text
COMMENT
Update Check 🔽🔽🔽
SCRIPTING
If
Settings
contains
lastUpdateCheck
DATE
Specified Date
Settings

Date
SCRIPTING
Otherwise
CALENDAR
Subtract
1
days
from
Current Date

Adjusted Date
SCRIPTING
End If

If Result
CALENDAR
Subtract
4
hours
from
Current Date

Adjusted Date
SCRIPTING
If
LastCheck
is less than
Adjusted Date
NETWORK
Get contents of
https://routinehub.co/api/v1/shortcuts/
Dict
/versions/latest
Options Under Construction

Contents of URL
SCRIPTING
If
Server
contains
success
TEXT
<html><head></head><body><script>
// Swing Engine 1.2.2
// © D3W10 - 𝗗𝗼𝗻'𝘁 𝗰𝗼𝗽𝘆 𝘁𝗵𝗶𝘀 𝗰𝗼𝗱𝗲 𝘄𝗶𝘁𝗵𝗼𝘂𝘁 𝗽𝗲𝗿𝗺𝗶𝘀𝘀𝗶𝗼𝗻.
function sue (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 "Rollback";
if (nb > na) return "Update";
}
if (a != b) return "Update";
return "Updated";
};
let data = {"current":"
Dict
","new":"
Server
"};
document.write(sue(data.current, data.new));
</script></body></html>

Text
URL
data:text/html,
Engine Code

URL
SAFARI
Get contents of web page at
URL

Contents of Web Page
SCRIPTING
If
EngineResult
is not
Updated
SCRIPTING
If
EngineResult
is
Update

Text
SCRIPTING
Otherwise

Text
SCRIPTING
End If

If Result
DOCUMENTS
Show
If Result
in Quick Look
LIST

List
SCRIPTING

Chosen Item
SCRIPTING
If
Chosen Item
is
If Result
DOCUMENTS
Replace
.*com
with
shortcuts:/
in
Server

Updated Text
SAFARI
Open
Updated Text
SCRIPTING
Exit shortcut with
Result
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
Set
lastUpdateCheck
to
Current Date
in
Dictionary

Dictionary
VARIABLES
Set variable
Settings
to
Dictionary
SCRIPTING
End If

If Result
COMMENT
Update check 🔼🔼🔼
SCRIPTING
If
Input
does not have any value
DICTIONARY

Dictionary
VARIABLES
Set variable
switches
to
Dictionary
SCRIPTING
If
Settings
contains
showSaveNotifications
VARIABLES
Set variable
on-or-off
to
Settings
SCRIPTING
If
on-or-off
is
Yes
TEXT
BEGIN:VCARD
VERSION:3.0
N;CHARSET=utf-8:Save Notifications On;
ORG:;
PHOTO;ENCODING=b:
switches
END:VCARD

Text
SCRIPTING
Otherwise
TEXT
BEGIN:VCARD
VERSION:3.0
N;CHARSET=utf-8:Save Notifications Off;
ORG:;
PHOTO;ENCODING=b:
switches
END:VCARD

Text
SCRIPTING
End If

If Result
SCRIPTING
Otherwise
NOTHING
Nothing
SCRIPTING
End If

If Result
TEXT
BEGIN:VCARD
VERSION:3.0
N;CHARSET=utf-8:Run Shortcut (multi-post or from clipboard);
ORG:;
END:VCARD
BEGIN:VCARD
VERSION:3.0
N;CHARSET=utf-8:Reset Settings;
ORG:;
END:VCARD
BEGIN:VCARD
VERSION:3.0
N;CHARSET=utf-8:Delete URLs File (if it exists);
ORG:;
END:VCARD
BEGIN:VCARD
VERSION:3.0
N;CHARSET=utf-8:Delete Downloaded Media (iCloud Drive);
ORG:;
END:VCARD
If Result

Text
SCRIPTING
Set name of
Text
to
menu.vcf

Renamed Item
TEXT
Welcome to
SName
!
You didn't share a post to the shortcut, so this menu allows some other features.

Text
SCRIPTING
Choose from
Renamed Item
Prompt
[{'class': 'magic', 'value': 'Text', 'glyph': '', 'UUID': '29429BC2-ADB0-4116-99C0-58E9C60E1AE4'}]

Chosen Item
SCRIPTING
If
Chosen Item
contains
Notifications
SCRIPTING
If
Chosen Item
contains
On
SCRIPTING
Set
showSaveNotifications
to
No
in
Dictionary

Dictionary
SCRIPTING
Otherwise
SCRIPTING
Set
showSaveNotifications
to
Yes
in
Dictionary

Dictionary
SCRIPTING
End If

If Result
DOCUMENTS
Save
If Result
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'SName', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}, {'value': '/settings.json', 'class': 'text'}]Overwrite If File Exists

Saved File
SHORTCUTS
Run
SName

Shortcut Result
SCRIPTING
Exit shortcut with
Result
SCRIPTING
End If

If Result
NOTHING
Nothing
SCRIPTING
If
Chosen Item
contains
Delete URLs
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
SCRIPTING
Otherwise
SCRIPTING
If
Chosen Item
contains
Delete Downloaded Media
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
FILES
Filter
File
where
[{'class': 'filter-property', 'value': 'Name'}, {'class': 'filter-operator', 'value': 'is not'}, {'class': 'filter-benchmark', 'value': 'settings'}]

Files
SCRIPTING
Otherwise
SCRIPTING
If
Chosen Item
contains
Reset Settings
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
SCRIPTING
End If

If Result