COMMENT
This Twitter client lets you download media from public or private accounts at the highest quality, save to Photos or Files or share. It can also upload images at up to 8K.
2022-02-12 v2.5.1 u/gluebyte
https://routinehub.co/shortcut/7912
LIST

List
SCRIPTING
Get dictionary from
List

Dictionary
VARIABLES
Set variable
mainDict
to
Dictionary
SCRIPTING
If
WFInput?
is
<value>
NUMBER
4

Number
SCRIPTING
Otherwise
SCRIPTING
Get the
System Version

Device Name
DOCUMENTS
Replace
^(\d+)\.(\d).*
with
$1$2
in
System Version
.0

Updated Text
NUMBER
3

Number
SCRIPTING
If
Updated Text
is less than
150
NUMBER
2

Number
SCRIPTING
If
Updated Text
is less than
143
NUMBER
1

Number
SCRIPTING
If
Updated Text
is less than
140
NUMBER
0

Number
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
VARIABLES
Set variable
OS
to
If Result
COMMENT
◥◤ CHECK INPUT
SCRIPTING
If
Shortcut Input
has any value
SCRIPTING
If
Shortcut Input
begins with
{"
VARIABLES
Set variable
command
to
mainDict
SCRIPTING
Otherwise
SCRIPTING
Get
Last Item
from
Shortcut Input

Item from List
SCRIPTING
If
Item from List
contains
t.co/
WEB
Expand
Item from List

Expanded URL
SCRIPTING
End If

If Result
SCRIPTING
If
twurl
contains
twitter.com/
DOCUMENTS
Replace
^.*/(\d{17,}).*$
with
$1
in
ㅁ
twurl

Updated Text
SCRIPTING
If
ID
begins with
ㅁ
SCRIPTING
Show alert
Informational Message
SCRIPTING
Otherwise
VARIABLES
Set variable
input
to
twurl
VARIABLES
Set variable
command
to
mainDict
SCRIPTING
End If

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

If Result
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
COMMENT
◥◤ CHECK PREF
SCRIPTING
If
OS
is greater than
2
SCRIPTING
Set
filename
to
Shortcuts/
mainDict
in
Dictionary

Dictionary
VARIABLES
Set variable
mainDict
to
Dictionary
SCRIPTING
End If

If Result
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
SCRIPTING
If
File
does not have any value
SCRIPTING
If
OS
is greater than
2
DOCUMENTS
Create Folder
Path
/Shortcuts/Shortcuts/
SCRIPTING
End If

If Result
SCRIPTING
Get dictionary from
mainDict

Dictionary
VARIABLES
Set variable
pref
to
Dictionary
DOCUMENTS
Save
pref
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'mainDict', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]Overwrite If File Exists

Saved File
DOCUMENTS
Make rich text from
mainDict

Rich Text from HTML
DOCUMENTS
Show
Rich Text from HTML
in Quick Look
SCRIPTING
Otherwise
SCRIPTING
Get dictionary from
File

Dictionary
VARIABLES
Set variable
pref
to
Dictionary
SCRIPTING
Get
Value
for
prefversion
in
pref

Dictionary Value
SCRIPTING
If
prefversion
is not
mainDict
SCRIPTING
If
prefversion
is greater than
mainDict
SCRIPTING
Choose from Menu

Menu Result
SCRIPTING
mainDict (gotoweb)

Menu Result
SAFARI
Open
mainDict
SCRIPTING
End Menu

Menu Result
SCRIPTING
Exit shortcut with
Result
SCRIPTING
End If

If Result
TEXT
Combine
pref
with
Custom
Text

Combined Text
SCRIPTING
If
prefversion
is
1
DOCUMENTS
Replace
...$
with
2$0
in
Combined Text

Updated Text
SCRIPTING
End If

If Result
SCRIPTING
If
prefversion
is less than
3
DOCUMENTS
Replace
^.
with
$03
in
If Result

Updated Text
SCRIPTING
End If

If Result
SCRIPTING
If
prefversion
is less than
4
DOCUMENTS
Replace
.$
with
2$0
in
If Result

Updated Text
SCRIPTING
End If

If Result
SCRIPTING
If
prefversion
is less than
5
DOCUMENTS
Replace
2(.)$
with
3$1
in
If Result

Updated Text
SCRIPTING
End If

If Result
TEXT
Split
If Result
by
Every Character

Split Text
SCRIPTING
Set
selection
to
Split Text
in
Dictionary

Dictionary
SCRIPTING
Set
prefversion
to
mainDict
in
Dictionary

Dictionary
VARIABLES
Set variable
pref
to
Dictionary
DOCUMENTS
Save
pref
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'mainDict', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]Overwrite If File Exists

Saved File
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
COMMENT
◥◤ CHECK ACCOUNTS
SCRIPTING
Get
All Keys
in
pref

Dictionary Value
FILES
Filter
Dictionary Value

Files
VARIABLES
Set variable
users
to
Files
SCRIPTING
Count
Items
in
users

Count
VARIABLES
Set variable
usercount
to
Count
SCRIPTING
If
usercount
is not
0
SCRIPTING
If
input
has any value
DOCUMENTS
Replace
.*twitter\.com/([^/]+)/.*
with
$1
in
twurl

Updated Text
TEXT
ㅁ
users

Text