Mit dem iPhone scannen, um zu installieren
Completely redesigned from the ground up!
Totally Not A Shortcut Updater is an updater whose focus is being as smooth as possible.
Neue Funktionen
Version 1.2
New Menu for Settings! And, obviously, bug fixes.
Was er macht
66 Aktionen-
CommentSettings for the Updater:
-
Dictionary
-
CommentFiles saved to On My iPhone
-
Set VariableWhereSave
-
If
-
File
-
Set VariableSavingTo
-
If
-
File
-
Set VariableSavingTo
-
Create Folder
-
CommentClear Skips and Rollbacks after 7 days
-
Set VariableWhenClear
-
Get File
-
If
-
Get Details of Files
-
Get Time Between Dates
-
If
-
Delete Files
-
Get File
-
If
-
Get Details of Files
-
Get Time Between Dates
-
If
-
Delete Files
-
CommentLatest Version Message
-
Set VariableVersionMessage
-
CommentInput Shortcut Variables
-
Get Dictionary from Input
-
Set VariableOGSH-Name
-
Set VariableOGSH-Version
-
Set VariableOGSH-RHID
-
CommentOnline Shortcut Data Variables
-
Get Contents of URLhttps://routinehub.co/api/v1/shortcuts/…/versions/latest
-
Get Dictionary from Input
-
Set VariableONL-Version
-
Set VariableONL-iURL
-
CommentNo need to update
-
If
-
If
-
Show Alert
-
If
-
CommentNeed to update
-
If
-
Get File
-
If
-
Choose from MenuAn update is available! (Version … ▶️ Version …)
-
Choose from MenuSkip
-
Text
-
Save File
-
Text
-
Save File
-
Choose from MenuUpdate
-
Open URLs
-
CommentNeed to rollback
-
If
-
Get File
-
If
-
Choose from MenuA rollback is available! (Version … ▶️ Version …)
-
Choose from MenuSkip
-
Text
-
Save File
-
Text
-
Save File
-
Choose from MenuUpdate
-
Open URLs
Als Code ansehen
Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.
#include 'actions/documents'
#define color blue
#define glyph syncArrows
// Settings for the Updater:
// Files saved to On My iPhone
@WhereSave = {
"Clear Skips and Rollbacks after 7 days": false,
"Files saved to On My iPhone": true,
"Latest Version Message": false
}
if @WhereSave == {
file()
@SavingTo
} else {
file()
@SavingTo
}
createFolder("TNASU")
// Clear Skips and Rollbacks after 7 days
@WhenClear = ['Clear Skips and Rollbacks after 7 days']
const File = getFile("rollback-skip.txt", @SavingTo, false)
if File {
const CreationDate = getFileDetail(nil, "Creation Date")
rawAction("is.workflow.actions.gettimebetweendates", {
"WFInput": "{CreationDate}",
"WFTimeUntilFromDate": "{CurrentDate}"
})
if TimeBetweenDates == 7 {
deleteFiles(File)
}
}
const File1 = getFile("update-skip.txt", @SavingTo, false)
if File1 {
getFileDetail(nil, CreationDate)
rawAction("is.workflow.actions.gettimebetweendates", {
"WFInput": "{}",
"WFTimeUntilFromDate": "{CurrentDate}",
"WFTimeUntilUnit": "Days"
})
if TimeBetweenDates1 == 7 {
deleteFiles(File1)
}
}
// Latest Version Message
@VersionMessage = ['Latest Version Message']
// Input Shortcut Variables
getDictionary(ShortcutInput)
@OGSHName = ['Name']
@OGSHVersion = ['Version']
@OGSHRHID = ['ID']
// Online Shortcut Data Variables
const ContentsOfURL = downloadURL("https://routinehub.co/api/v1/shortcuts/{@OGSHRHID}/versions/latest")
getDictionary(ContentsOfURL)
@ONLVersion = ['Version']
@ONLiURL = ['URL']
// No need to update
if @OGSHVersion == @ONLVersion {
if @VersionMessage == {
confirm("{@OGSHName} is at the latest version. (Version {@OGSHVersion})\n")
} else {
}
}
// Need to update
if @OGSHVersion < @ONLVersion {
const File2 = getFile("/UD-S-{@OGSHName}.txt", @SavingTo, false)
if !File2 {
menu "An update is available! (Version {@OGSHVersion} ▶️ Version {@ONLVersion})" {
item "Skip":
const Text = "{@OGSHName}\nUpdate\nSkip: Yes"
saveFile("/UD-S-{@OGSHName}.txt", Text, true)
const Text1 = "{CurrentDate}"
saveFile("/rollback-skip.txt", Text1, true)
item "Update":
openURL(@ONLiURL)
}
}
}
// Need to rollback
if @OGSHVersion > @ONLVersion {
const File3 = getFile("/RB-S-{@OGSHName}.txt", @SavingTo, false)
if !File3 {
menu "A rollback is available! (Version {@OGSHVersion} ▶️ Version {@ONLVersion})" {
item "Skip":
const Text2 = "{@OGSHName}\nRollback\nSkip: Yes"
saveFile("/RB-S-{@OGSHName}.txt", Text2, true)
const Text3 = "{CurrentDate}"
saveFile("update-skip.txt", Text3, true)
item "Update":
openURL(@ONLiURL)
}
}
}
In Cherri Playground öffnen
Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.
Bewertungen und Rezensionen
Rezension schreiben–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Werbung
Mehr von theshortcutguy2
Das gefällt dir vielleicht auch
Werbung