COMMENT
Swing Updater V.11.0
By: D3W10
π£πΏπΌππ²π°ππ²π± π―π ππΌπ½ππΏπΆπ΄π΅π
DICTIONARY

Dictionary
VARIABLES
Set variable
Settings
to
Dictionary
DOCUMENTS
Create Folder
Path
/Shortcuts/Swing Updater/SFU
DICTIONARY

Dictionary
DOCUMENTS
Save
Dictionary
Destination Path
/Shortcuts/Swing Updater/SFU/Swing Updater.jsonOverwrite If File Exists

Saved File
SCRIPTING
Get the
Device Name

Device Name
SCRIPTING
Get the
System Version

Device Name
VARIABLES
Set variable
Input
to
Shortcut Input
SCRIPTING
Repeat
Count

Repeat Results
COMMENT
β’-{ Transition application }-β’
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
SCRIPTING
Get
Value
for
ConfigVersion
in
File

Dictionary Value
SCRIPTING
If
Dictionary Value
has any value
SCRIPTING
Show alert
π Setup π
NOTIFICATIONS
Show notification
Input
Options Under Construction
DICTIONARY

Dictionary
DOCUMENTS
Save
Dictionary
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'value': 'Swing Updater/Configuration - ', 'class': 'text'}, {'class': 'magic', 'value': 'Device Name', 'glyph': '', 'UUID': '66218E81-5DC9-46EB-8562-33EA05983E51'}, {'value': '.json', 'class': 'text'}]Overwrite If File Exists

Saved File
DOCUMENTS
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
DOCUMENTS
DOCUMENTS

File
DOCUMENTS
DOCUMENTS

File
DOCUMENTS
DICTIONARY

Dictionary
VARIABLES
Set variable
SkipDict
to
Dictionary
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
SCRIPTING
Repeat with each item in
File

Repeat Results
TEXT
Split
Repeat Item 2
by
New Lines

Split Text
SCRIPTING
Get
First Item
from
Split Text

Item from List
SCRIPTING
Get
Last Item
from
Split Text

Item from List
SCRIPTING
Set
Item from List
to
Item from List
in
Dictionary

Dictionary
VARIABLES
Set variable
SkipDict
to
Dictionary
SCRIPTING
End Repeat

Repeat Results
DOCUMENTS
Save
SkipDict
Destination Path
/Shortcuts/Swing Updater/Skip.jsonOverwrite If File Exists

Saved File
DOCUMENTS
SCRIPTING
End If

If Result
COMMENT
β’-{ Transition application }-β’
SCRIPTING
End Repeat

Repeat Results
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
VARIABLES
Set variable
Config
to
ConfigFile
SCRIPTING
If
Config
does not have any value
SCRIPTING
Get
Value
for
English
in
Settings

Dictionary Value
SCRIPTING
Otherwise
SCRIPTING
Get
Value
for
Config
in
Settings

Dictionary Value
SCRIPTING
End If

If Result
VARIABLES
Set variable
Strings
to
If Result

Text
SCRIPTING
If
ConfigFile
does not have any value
TEXT
<!-- ππΌ π‘πΌπ ππΌπ½π π’πΏ π πΌπ±πΆπ³π πͺπΆππ΅πΌππ π£π²πΏπΊπΆπππΆπΌπ» -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>
Settings
</title>
<style>
* {
margin: 0;
padding: 0;
touch-action: manipulation;
outline: none;
}
body {
padding: 30px 25px 30px 30px;
background: #ffffff;
color: #000;
font-family: system-ui;
font-weight: 700;
letter-spacing: 0.025em;
}
h1 {
font-size: 40px;
font-weight: 800;
line-height: 40px;
margin-top: 10px;
}
h2 {
margin-top: 15px;
margin-bottom: 40px;
font-size: 30px;
font-weight: 700px;
}
p {
margin-top: 20px;
font-weight: 300;
}
.su {
color: #00c2d6;
}
.done {
font-weight: bold;
color: #0A84FF;
}
.lastp {
margin-top: 40px;
}
h1, h2, p, button {
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #000;
color: #f1f1f1;
}
p {
color: #f1f1f1;
}
}
</style>
</head>
<body>
<h1>ππ» Hi</h1>
<h2>
Welcome to
<br>
<span class="su">
Settings
</span>
</h2>
<p>
First of all
<strong>
thanks for installing
Settings
</strong>
, hope you like it.
</p>
<p>
Settings
was made to be user friendly and simple to use so you always have the latest updates for your favourite shortcuts.
</p>
<p>
You can personalise
Settings
with your language, just select it when the Setup asks for it, if your language is not available, you can always contribute!
</p>
<p>
If you have any suggestion please use the "Send Feedback" button on Settings or comment on
Settings
RoutineHub page.
</p>
<p>
<strong>
Changing the shortcut name isn't recommended!
</strong>
</p>
<p class="lastp">
When finished, tap
<span class="done">
Done
</span>
.
</p>
</body>
</html>

Text
DOCUMENTS
Make rich text from
Text

Rich Text from HTML
DOCUMENTS
Show
Rich Text from HTML
in Quick Look
SCRIPTING
Set name of
MenuAssets
to
languages.vcf

Renamed Item
SCRIPTING
Choose from
Renamed Item
Prompt
[{'class': 'magic', 'value': 'MenuAssets', 'glyph': '', 'UUID': '4BD5B9D4-D244-4F84-AD38-8E83A791A02F'}]

Chosen Item
SCRIPTING
Get
Value
for
Chosen Item
in
Settings

Dictionary Value
VARIABLES
Set variable
Strings
to
Dictionary Value
SCRIPTING

Provided Input
NETWORK
Get contents of
https://api.ipsw.me/v4/devices
Options Under Construction

Contents of URL
SCRIPTING
Repeat with each item in
Contents of URL

Repeat Results
SCRIPTING
Get
Value
for
name
in
Repeat Item

Dictionary Value
SCRIPTING
End Repeat

Repeat Results
FILES
Filter
Repeat Results
where
Any of the following are true [{'class': 'filter-property', 'value': 'Name'}, {'class': 'filter-operator', 'value': 'contains'}, {'class': 'filter-benchmark', 'value': 'iPhone'}] [{'class': 'filter-property', 'value': 'Name'}, {'class': 'filter-operator', 'value': 'contains'}, {'class': 'filter-benchmark', 'value': 'iPad'}] [{'class': 'filter-property', 'value': 'Name'}, {'class': 'filter-operator', 'value': 'contains'}, {'class': 'filter-benchmark', 'value': 'iPod'}]

Files
FILES
Filter
Files
where
[{'class': 'filter-property', 'value': 'Name'}, {'class': 'filter-operator', 'value': 'contains'}, {'class': 'filter-benchmark inline', 'value': [{'class': 'magic', 'value': 'Provided Input', 'glyph': '', 'UUID': '2CEBB43F-8C86-4820-BD8B-8FEB46716E24'}]}]

Files
SCRIPTING

Chosen Item
SCRIPTING
Show alert
π
Strings
π
Title
[{'value': 'π ', 'class': 'text'}, {'class': 'magic', 'value': 'Strings', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}, {'value': ' π ', 'class': 'text'}]
DICTIONARY

Dictionary
DOCUMENTS
Save
Dictionary
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'value': 'Swing Updater/Configuration - ', 'class': 'text'}, {'class': 'magic', 'value': 'Device Name', 'glyph': '', 'UUID': '66218E81-5DC9-46EB-8562-33EA05983E51'}, {'value': '.json', 'class': 'text'}]Overwrite If File Exists

Saved File
SHORTCUTS
Run
Settings

Shortcut Result
MISSING
output Under Construction
SCRIPTING
End If

If Result
SCRIPTING
Get
Value
for
Configuration
in
Config

Dictionary Value
SCRIPTING
If
Dictionary Value
is less than
Settings
SCRIPTING
Show alert
βΉοΈ
Strings
βΉοΈ
Title
[{'value': 'βΉοΈ ', 'class': 'text'}, {'class': 'magic', 'value': 'Strings', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}, {'value': ' βΉοΈ', 'class': 'text'}]
DOCUMENTS
SHORTCUTS
Run
Settings

Shortcut Result
MISSING
output Under Construction
SCRIPTING
End If

If Result
TEXT
Combine
Input
with
Spaces

Combined Text
TEXT
Match
^(?=.*Name)(?=.*Version)(?=.*RH ID|.*SS ID|.*Server)
in
Combined Text

Matches
SCRIPTING
If
Matches
has any value
SAFARI
Get contents of web page at
data:text/html,%3Cscript%3Edocument.write(navigator.onLine)%3C/script%3E

Contents of Web Page
SCRIPTING
If
Contents of Web Page
is
false
MISSING
output Under Construction
SCRIPTING
End If

If Result
SCRIPTING
If
Input
does not have any value
DOCUMENTS

File
SCRIPTING
Get
Value
for
Input
in
File

Dictionary Value
SCRIPTING
End If

If Result
NETWORK
Get contents of
Settings
update
Options Under Construction

Contents of URL
SCRIPTING
If
Input
has any value
MISSING
output Under Construction
SCRIPTING
End If

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

Saved File
VARIABLES
Set variable
Status
to
Engine
SCRIPTING
If
Status
is
Error
SCRIPTING
Show alert
π«
Strings
π«
Title
[{'value': 'π« ', 'class': 'text'}, {'class': 'magic', 'value': 'Strings', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}, {'value': ' π«', 'class': 'text'}]
MISSING
output Under Construction
SCRIPTING
End If

If Result
TEXT
Match
(Updated)|(Already Skipped)|(Unsupported)
in
Status

Matches