ShareShortcuts

Totally Not A Shortcut Updater

Completely redesigned from the ground up!

theshortcutguy2
Fazer fork de “Totally Not A Shortcut Updater”

Criou algo novo a partir deste atalho? Compartilhe como uma derivação: ela se torna um atalho seu, que você gerencia, e as duas páginas têm links entre si para que theshortcutguy2 receba o crédito.

  1. 1Obtenha o atalho e altere-o no app Atalhos. Dê a ele um nome próprio.
  2. 2Compartilhe pelo app Atalhos e copie o link do iCloud.
  3. 3Volte aqui, cole o link e descreva o que mudou, por exemplo: “Adicionei uma etapa que usa a Apple Intelligence para personalizar o texto.”
Downloads
39K
Salvo
0
Ações
66
Categoria
Utilities
Versão
1.2
Idioma
EN

Completely redesigned from the ground up!

Totally Not A Shortcut Updater is an updater whose focus is being as smooth as possible.

Novidades

Versão 1.2

New Menu for Settings! And, obviously, bug fixes.

Histórico de versões
1.2 29 de ago de 2024

New Menu for Settings! And, obviously, bug fixes.

1.1 18 de set de 2022

Nothing

1.0 18 de set de 2022

First release

O que ele faz

66 ações
  1. Comment
    Settings for the Updater:
  2. Dictionary
  3. Comment
    Files saved to On My iPhone
  4. Set Variable
    WhereSave
  5. If
  6. File
  7. Set Variable
    SavingTo
  8. If
  9. File
  10. Set Variable
    SavingTo
  11. Create Folder
  12. Comment
    Clear Skips and Rollbacks after 7 days
  13. Set Variable
    WhenClear
  14. Get File
  15. If
  16. Get Details of Files
  17. Get Time Between Dates
  18. If
  19. Delete Files
  20. Get File
  21. If
  22. Get Details of Files
  23. Get Time Between Dates
  24. If
  25. Delete Files
  26. Comment
    Latest Version Message
  27. Set Variable
    VersionMessage
  28. Comment
    Input Shortcut Variables
  29. Get Dictionary from Input
  30. Set Variable
    OGSH-Name
  31. Set Variable
    OGSH-Version
  32. Set Variable
    OGSH-RHID
  33. Comment
    Online Shortcut Data Variables
  34. Get Contents of URL
    https://routinehub.co/api/v1/shortcuts/…/versions/latest
  35. Get Dictionary from Input
  36. Set Variable
    ONL-Version
  37. Set Variable
    ONL-iURL
  38. Comment
    No need to update
  39. If
  40. If
  41. Show Alert
  42. If
  43. Comment
    Need to update
  44. If
  45. Get File
  46. If
  47. Choose from Menu
    An update is available! (Version … ▶️ Version …)
  48. Choose from Menu
    Skip
  49. Text
  50. Save File
  51. Text
  52. Save File
  53. Choose from Menu
    Update
  54. Open URLs
  55. Comment
    Need to rollback
  56. If
  57. Get File
  58. If
  59. Choose from Menu
    A rollback is available! (Version … ▶️ Version …)
  60. Choose from Menu
    Skip
  61. Text
  62. Save File
  63. Text
  64. Save File
  65. Choose from Menu
    Update
  66. Open URLs

Ver como código
Beta

Todas as ações deste atalho escritas em Cherri, uma linguagem de programação para o app Atalhos. Ótimo para aprender como ele funciona.

#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)
		}
	}
}
Abrir no Cherri Playground Descompilado com cherri 2.3.0 (GPL-2.0). Pode precisar de pequenos ajustes antes de compilar.

Avaliações e comentários

Escrever uma avaliação
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Ainda não há avaliações. Seja o primeiro a compartilhar o que você pensa!

Publicidade

Mais de theshortcutguy2

Ver tudo

Você também pode gostar

Ver tudo
Publicidade