COMMENT
SW-DLT
Official release on RoutineHub, avoid unknown sources!
DICTIONARY

Dictionary
COMMENT
SETTINGS: Configure these global settings in the below dictionary
isMini: selects the a-Shell app you have installed
True = a-Shell Mini
False = a-Shell (full)
deleteAll: enables or disables dependency deletion
True = enabled
False = disabled
DICTIONARY

Dictionary
COMMENT
-----END OF USER SETTINGS-----
DICTIONARY

Dictionary
SCRIPTING
Get name of
Shortcut Input

Name
TEXT
Match
^DEBUG$
in
altInput

Matches
DOCUMENTS
Get text from
mode

Text
SCRIPTING
Get
Value
for
isMini
in
globalSettings

Dictionary Value
SCRIPTING
Get
Value
for
deleteAll
in
globalSettings

Dictionary Value
SCRIPTING
URL
Decode
Shortcut Input

URL Encoded Text
SCRIPTING
Get
Value
for
output_code
in
decodedProps

Dictionary Value
SCRIPTING
If
outputCode
has any value
COMMENT
====
Start exceptionCheck Macro
====
SCRIPTING
If
outputCode
is
exception
SCRIPTING
Get
Value
for
exc_path
in
decodedProps

Dictionary Value
SCRIPTING
Get
Value
for
excPath
in
properties

Dictionary Value
SCRIPTING
Show alert
Exception Alert
SCRIPTING
End If

If Result
COMMENT
====
End exceptionCheck Macro
====
SCRIPTING
Get
Value
for
file_name
in
decodedProps

Dictionary Value
SCRIPTING
Get
Value
for
file_title
in
decodedProps

Dictionary Value
SCRIPTING
If
isMini
is
<value>
MISSING
Under Construction
SCRIPTING
Otherwise
MISSING
Under Construction
SCRIPTING
End If

If Result
SCRIPTING
Set name of
mediaFile
to
fileTitle

Renamed Item
DOCUMENTS
Show
finalMedia
in Quick Look
LIST

List
SCRIPTING
If
isMini
is
<value>
MISSING
Under Construction
SCRIPTING
Otherwise
MISSING
Under Construction
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
Get
Value
for
updateEndpoint
in
properties

Dictionary Value
NETWORK
Get contents of
apiEndpoint
Options Under Construction

Contents of URL
SCRIPTING
If
response
has any value
SCRIPTING
Get
Value
for
version
in
response

Dictionary Value
DOCUMENTS
Get text from
notes

Text
SCRIPTING
If
latestVer
is not
version
COMMENT
====
Start updateMenu Macro
====
TEXT
An Update is Available (
version
->
latestVer
)
Changelog:
changelogText

Text
VARIABLES
Set variable
updateMenuHeader
to
GeneratedMagicVariable-9710FAF7-2258-473B-853C-BEA35C4DECE1
SCRIPTING
Choose from Menu

Menu Result
SCRIPTING
Update Now

Menu Result
DOCUMENTS
Replace
^.+?(?=\/shortcut)
with
shortcuts:/
in
response

Updated Text
SAFARI
Open
updateURL
SCRIPTING
Skip Once

Menu Result
SCRIPTING
End Menu

Menu Result
COMMENT
====
End updateMenu Macro
====
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
If
Shortcut Input
does not have any value
VARIABLES
Set variable
mediaURL
to
Clipboard
SCRIPTING
Otherwise
VARIABLES
Set variable
mediaURL
to
Shortcut Input
SCRIPTING
End If

If Result
SCRIPTING
If
deleteAll
is
<value>
SCRIPTING
Show alert
vars.deleteAllTitle
Title
[{'class': 'magic', 'value': 'vars.deleteAllTitle', 'glyph': '', 'UUID': '619CFBBE-E7F5-43F6-AD26-11967B6ACA4F'}]
VARIABLES
Set variable
args
to
vars.deleteAll
VARIABLES
Set variable
mediaURL
to
vars.urlPlaceholder
SCRIPTING
Otherwise
WEB
Get URLs from
mediaURL

URLs
SCRIPTING
If
urls
has any value
TEXT
BEGIN:VCARD
N:Download Video;;;;
PHOTO;ENCODING=b:
icons.aIcon
ORG:Videos, GIFs, Clips at Custom Quality;
END:VCARD
BEGIN:VCARD
N:Download Audio;;;;
PHOTO;ENCODING=b:
icons.pIcon
ORG:Standalone or Video-Extracted;
END:VCARD
BEGIN:VCARD
N:Download Playlist;;;;
PHOTO;ENCODING=b:
icons.vIcon
ORG:Video or Audio, at Default Quality;
END:VCARD
BEGIN:VCARD
N:Download Gallery;;;;
PHOTO;ENCODING=b:
icons.gIcon
ORG:Images, GIFs, Clips, Albums, Entire Profiles;
END:VCARD

Text
VARIABLES
Set variable
enabledFeatures
to
GeneratedMagicVariable-769B9C89-6D6E-4696-8C17-23C394225D62
SCRIPTING
Otherwise
VARIABLES
Set variable
mediaURL
to
vars.noURL
SCRIPTING
End If

If Result
SCRIPTING
Count
Characters
in
mediaURL

Count
SCRIPTING
If
charCount
is less than or equal to
30
TEXT
mediaURL

Text
VARIABLES
Set variable
displayURL
to
GeneratedMagicVariable-75057CCB-0646-42A9-8873-4882ABE5D1AA
SCRIPTING
Otherwise
TEXT
Match
^.{30}
in
mediaURL

Matches
TEXT
urlPreview
...

Text
VARIABLES
Set variable
displayURL
to
GeneratedMagicVariable-F5CFD009-446B-4B73-A48C-D10820F21250
SCRIPTING
End If

If Result
TEXT
icons.hIcon
BEGIN:VCARD
N:About;;;;
PHOTO;ENCODING=b:
enabledFeatures
ORG:Helpful links & Donations;
END:VCARD

Text
VARIABLES
Set variable
mainMenuTemplate
to
GeneratedMagicVariable-475BC376-6EA5-4AAA-A931-8CD9702BFFB0
SCRIPTING
Set name of
mainMenuTemplate
to
mainMenu.vcf

Renamed Item
TEXT
SW-DLT: Main Menu
RUN_MODE
URL:
displayURL

Text
VARIABLES
Set variable
mainMenuHeader
to
GeneratedMagicVariable-357337DD-6D99-43F5-AB0C-88D783999589
SCRIPTING
Choose from
mainMenu
Prompt
[{'class': 'magic', 'value': 'mainMenuHeader', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]

Chosen Item
SCRIPTING
Get
Value
for
dlChoice
in
listMap

Dictionary Value
VARIABLES
Set variable
dlChoiceKeyText
to
dlChoiceKey
SCRIPTING
If
dlChoiceKeyText
is
videoDownload
SCRIPTING
Choose from
lists.videoRes
Prompt
[{'class': 'magic', 'value': 'vars.videoResPrompt', 'glyph': '', 'UUID': '619CFBBE-E7F5-43F6-AD26-11967B6ACA4F'}]

Chosen Item
SCRIPTING
Get
Value
for
resChoice
in
listMap

Dictionary Value
SCRIPTING
If
res
is not
default
SCRIPTING
Choose from
properties
Prompt
[{'class': 'magic', 'value': 'vars.videoFPSPrompt', 'glyph': '', 'UUID': '619CFBBE-E7F5-43F6-AD26-11967B6ACA4F'}]

Chosen Item
SCRIPTING
Get
Value
for
fpsChoice
in
listMap

Dictionary Value
TEXT
-v
fps
res

Text
VARIABLES
Set variable
args
to
GeneratedMagicVariable-BA38CAE1-7FC7-488C-95C2-FA3BE8580B9D