COMMENT
INTEGRITY • ™️𝘽𝙪𝙨𝙩𝙡. 𝖲ʜᴏʀᴛᴄᴜᴛs
Operates compatible shortcuts for data integrity, and to measure your results from automation.
——
MIT License
𝐈𝐍𝐓𝐄𝐆𝐑𝐈𝐓𝐘 Framework
Copyright © 2021 Scott Wright
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
——
{"name":"INTEGRITY","auuid":"90B9ED1A-1330-44A5-8B39-4E53A68A7632","version":"3.1"}
DATE
Current Date

Date
COMMENT
Setting Default. Option
—————————————————
- debug : False ( True )
- wait : nowait (↑45 secs )
- mode : run ( notify )
- key : primary ( alternate )
DICTIONARY

Dictionary
COMMENT
▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️
🚫 No changes below 🚫
Get Input for target shortcut. ——>
VARIABLES
Get
Shortcut Input
SCRIPTING
Count
Items
in
Shortcut Input

Count
SCRIPTING
If
Count
is greater than
1
SCRIPTING
Get
Items in Range
2
to
End Index
from
Shortcut Input

Item from List
SCRIPTING
Otherwise
NOTHING
Nothing
SCRIPTING
End If

If Result
VARIABLES
Add
If Result
to
Shortcut Input
COMMENT
<—— Input for Target shortcut
▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️
▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️
initialize Integrity ——>
TEXT
INTEGRITY

Text
DOCUMENTS
Create Folder
Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'INTEGRITY', 'glyph': '', 'UUID': '292ea389-c42f-4539-b0bd-df80e449c09e'}]
DICTIONARY

Dictionary
SCRIPTING
Get dictionary from
shortcut

Dictionary
TEXT
nane
By
application

Text
COMMENT
If the shortcut input is the Integrity framework command “identify,” exit with the initializing shortcut dictionary.
VARIABLES
Get
Shortcut Input
SCRIPTING
Get
First Item
from
Shortcut Input

Item from List
TEXT
First Item

Text
SCRIPTING
If
First Input
is
identify
SCRIPTING
Exit shortcut with
Shortcut
SCRIPTING
End If

If Result
COMMENT
Check the first item in the shortcut input stack for a target shortcut. If the item is a dictionary, check for a value at key “input” and assign it to the target shortcut’s “Shortcut Input” variable. Then check for a value at key “name”. If no dictionary is found, but there is valid text, assume it may be the target shortcut’s name.
SCRIPTING
Get dictionary from
First Input

Dictionary
SCRIPTING
If
Dictionary
has any value
SCRIPTING
If
input
has any value
SCRIPTING
Get
Value
for
input
in
Dictionary

Dictionary Value
VARIABLES
Set variable
Shortcut Input
to
Dictionary Value
SCRIPTING
End If

If Result
SCRIPTING
Get
Value
for
name
in
Dictionary

Dictionary Value
SCRIPTING
Otherwise
TEXT
#
First Input
#

Text
SCRIPTING
If
Text
is not
##
VARIABLES
Get
First Input
SCRIPTING
Otherwise
NOTHING
Nothing
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
VARIABLES
Set variable
Target
to
Target
COMMENT
<—— initialize Integrity
▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️
If the variable “Target” has a text value, search the device shortcuts library for a shortcut with that name. Otherwise, present a menu of available shortcuts.
SHORTCUTS
Get my shortcuts

My Shortcuts
SCRIPTING
If
Target
has any value
FILES
Filter
My Shortcuts
where
[{'class': 'filter-property', 'value': 'Name'}, {'class': 'filter-operator', 'value': 'is'}, {'class': 'filter-benchmark inline', 'value': [{'class': 'magic', 'value': 'Target', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]}] Get 1 File



Files
SCRIPTING
Otherwise
SHORTCUTS
Get my shortcuts

My Shortcuts
FILES
Filter
My Shortcuts
where
All the following are true [{'class': 'filter-property', 'value': 'Name'}, {'class': 'filter-operator', 'value': 'is not'}, {'class': 'filter-benchmark inline', 'value': [{'class': 'magic', 'value': 'INTEGRITY', 'glyph': '', 'UUID': '292ea389-c42f-4539-b0bd-df80e449c09e'}]}] [{'class': 'filter-property', 'value': 'Name'}, {'class': 'filter-operator', 'value': 'does not contain'}, {'class': 'filter-benchmark', 'value': '.shortcut'}] Get 99 Files



Files
SCRIPTING
Choose from
Files
Prompt
[{'class': 'magic', 'value': 'Display Billboard', 'glyph': '', 'UUID': 'f0bd510a-11f9-430c-97d6-069a207cd181'}]

Chosen Item
SCRIPTING
End If

If Result
SCRIPTING
If
Target
has any value
DOCUMENTS
Create Folder
Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'Name', 'glyph': '', 'UUID': 'f9cc1602-66cf-4086-acb7-2cafa30f89d0'}]
NOTHING
Nothing
COMMENT
🟢 🟢
🟢🟢 🟢🟢
🟢🟢🟢 🟢🟢🟢
🟢🟢 🟢🟢
🟢 🟢
DATE
Current Date

Date
SHORTCUTS
Run
Name
Input
Shortcut Input

Shortcut Result
DATE
Current Date

Date
COMMENT
🔴 🔴
🔴🔴 🔴🔴
🔴🔴🔴 🔴🔴🔴
🔴🔴 🔴🔴
🔴 🔴
NOTHING
Nothing
COMMENT
<—— Run desired Shortcut
▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️
▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️
Verify and save results ——>
CALENDAR
Get time between
start
and
end
in
Seconds

Time Between Dates
CALENDAR
Format
start
Options Under Construction

Formatted Date
CALENDAR
Format
end
Options Under Construction

Formatted Date
CALENDAR
Format
Current Date
Options Under Construction

Formatted Date
DOCUMENTS
Make
.zip
archive from
Shortcut Result
Archive Name
[{'class': 'magic', 'value': 'Now', 'glyph': '', 'UUID': '71E68F52-B956-4EB3-92BA-E17D1A7EFA64'}, {'value': '_', 'class': 'text'}, {'class': 'magic', 'value': 'Name', 'glyph': '', 'UUID': 'f9cc1602-66cf-4086-acb7-2cafa30f89d0'}]

Archive
SCRIPTING
Set name of
Archive
to
Now
_
Name
.zip

Renamed Item
DOCUMENTS
Save
Renamed Item
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'Renamed Item', 'glyph': '', 'UUID': '8AD73797-8959-4CB7-A904-2F24B0FCFF94'}, {'value': '/', 'class': 'text'}, {'class': 'magic', 'value': 'Name', 'glyph': '', 'UUID': 'f9cc1602-66cf-4086-acb7-2cafa30f89d0'}]Overwrite If File Exists

Saved File
SCRIPTING
Mode
Saved File
with base64

Base64 Encoded
SHORTCUTS

Shortcut Result
SCRIPTING
Get
Value
for
client.cuuid
in
Profile

Dictionary Value
DICTIONARY

Dictionary
DICTIONARY

Dictionary
SCRIPTING
Set
tracker
to
Dictionary
in
Dictionary

Dictionary
SCRIPTING
Set name of
Payload
to
Now
_
Name
.json

Renamed Item
DOCUMENTS
Save
Payload
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'Payload', 'glyph': '', 'UUID': '3992bcaf-af0f-4a20-b443-43f01910f184'}, {'value': '/', 'class': 'text'}, {'class': 'magic', 'value': 'INTEGRITY', 'glyph': '', 'UUID': '292ea389-c42f-4539-b0bd-df80e449c09e'}]Overwrite If File Exists

Saved File
TEXT
Payload

Text
VARIABLES
Set variable
Payload
to
Payload
COMMENT
<—— Verify and save results
▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️
▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️
Load settings with current API ——>
SCRIPTING
Get
Value
for
debug
in
Switches

Dictionary Value
VARIABLES
Get
Profile
DICTIONARY

Dictionary
URL
https://raw.githubusercontent.com/ShortcutPros/library/main/settings.json

URL
SCRIPTING
Get file of type
public.json
from
URL

File of Type
SCRIPTING
If
Remote Dictionary
has any value
SCRIPTING
If
Debug
is
<value>
SCRIPTING
Get dictionary from
settings

Dictionary
SCRIPTING
Otherwise
MISSING
Under Construction
SCRIPTING
End If

If Result
SCRIPTING
Otherwise
SCRIPTING
Get dictionary from
settings

Dictionary
SCRIPTING
End If

If Result
VARIABLES
Set variable
Settings
to
Settings
COMMENT
<—— Load settings file with current API
▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️
▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️▪️▫️
Place HTTP POST API call——>
SCRIPTING
Get
Value
for
api.
Settings
in
Settings

Dictionary Value
SCRIPTING
Get
Value
for
action.
Settings
in
Settings

Dictionary Value