ShareShortcuts

MyUpdater

Basically like Shortcuts Updater but much more lightweight, and basically much better

daboy
Создать форк «MyUpdater»

Создали что-то новое на основе этой команды? Поделитесь ей как форком: она станет вашей собственной командой, которой вы управляете, а обе страницы будут ссылаться друг на друга, чтобы daboy получил(а) признание.

  1. 1Получите команду и измените её в приложении «Быстрые команды». Дайте ей собственное название.
  2. 2Поделись ею из приложения «Быстрые команды» и скопируй ссылку iCloud.
  3. 3Вернись сюда, вставь ссылку и опиши, что изменилось, например: «Добавлен шаг, который использует Apple Intelligence для персонализации текста».
Загрузки
50K
Сохранено
3
Действия
53
Категория
Productivity
Версия
1.4
Язык
EN

Basically like Shortcuts Updater but much more lightweight, and basically much better. It works the same because I don’t want to confuse anyone. So just find how to use Shortcuts Updater, and do it but with this. If you need any help, tell me in the comments.

Что нового

Версия 1.4

Fixed a slight bug.

История версий
1.4 4 июл 2021 г.

Added the ability to view changes.

1.4 4 июл 2021 г.

Fixed a slight bug.

1.3 3 июл 2021 г.

Fixed a bug where MyUpdater always said a new version for MyUpdater is available, even when one wasn’t.

1.2 26 июн 2021 г.

Fixed a MAJOR bug that stopped it from working.

1.1 26 июн 2021 г.

Made MyUpdater check for updates when you tap the shortcut without a shortcut input (tapping it manually.)

1.0 26 июн 2021 г.

First release

Что делает

Действий: 53
  1. Number
  2. Get IP Address
  3. If
  4. Stop This Shortcut
  5. If
  6. Choose from Menu
    Which do you want to do? (Messaging me shows your name to me, but if you don't trust me then you don't have to send anything.)
  7. Choose from Menu
    Check for updates
  8. Get Contents of URL
    shareshortcuts.com/1444.update
  9. Get Dictionary Value
  10. Get Numbers from Input
  11. If
  12. Get Item from List
  13. Text
  14. Choose from Menu
    …
  15. Choose from Menu
    Yes
  16. Get Dictionary Value
  17. Open URLs
  18. Stop This Shortcut
  19. Choose from Menu
    No
  20. Nothing
  21. If
  22. Show Notification
    MyUpdater has no new updates.
  23. Choose from Menu
    Check for updates on any shortcut
  24. Ask for Input
    What is the name of the shortcut? (Optional)
  25. Ask for Input
    What is the version you are currently using on that shortcut? (Not optional)
  26. Ask for Input
    What is the shareshortcuts ID? (Not optional. To find the ID look at the URL and find what comes before the name.)
  27. Dictionary
  28. Run Shortcut
    MyUpdater
  29. Choose from Menu
    Message developer
  30. Send Email
  31. Stop This Shortcut
  32. Get Dictionary Value
  33. Set Variable
    Name
  34. Get Dictionary Value
  35. Set Variable
    Version
  36. Get Dictionary Value
  37. Set Variable
    ID
  38. Replace Text
  39. Get Contents of URL
    shareshortcuts.com/….update
  40. Get Dictionary Value
  41. Get Dictionary Value
  42. If
  43. Get Item from List
  44. Text
  45. Choose from Menu
    …
  46. Choose from Menu
    Yes
  47. Get Dictionary Value
  48. Open URLs
  49. Stop This Shortcut
  50. Choose from Menu
    No
  51. Nothing
  52. If
  53. Nothing

Посмотреть как код
Бета

Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.

#include 'actions/web'
#include 'actions/network'
#define color green
#define glyph smileyFace

const CurrentVersion = 1.4
const CurrentIPAddress = getExternalIP()

if !CurrentIPAddress {
	stop()
}

if !ShortcutInput {
	menu "Which do you want to do? (Messaging me shows your name to me, but if you don't trust me then you don't have to send anything.) " {
	item "Check for updates":
		const ContentsOfURL = downloadURL("shareshortcuts.com/1444.update")
		const CVersion = getValue(ContentsOfURL['Shortcut'], "Version")
		const Version = getNumbers(CVersion)
		if Version > CurrentVersion {
			getFirstItem(ContentsOfURL['Changelog'])
			menu  {
			item "Yes":
				const DictionaryValue = getValue(ContentsOfURL['Shortcut'], "URL-download")
				openURL(DictionaryValue)
				stop()
			item "No":
			}
		} else {
			showNotification("MyUpdater has no new updates.", "Hm", false)
		}
	item "Check for updates on any shortcut":
		const Name = prompt("What is the name of the shortcut? (Optional)")
		const Version1 = prompt("What is the version you are currently using on that shortcut? (Not optional)", "Number")
		const ID = prompt("What is the shareshortcuts ID? (Not optional. To find the ID look at the URL and find what comes before the name.)", "Number")
		const Dictionary = {
			"name": "{Name}",
			"sharei": "{ID}",
			"version": "{Version1}"
		}
		runSelf(Dictionary)
	item "Message developer":
		sendEmail(, "[email protected]", "", "")
	}
	stop()
}
@Name = ShortcutInput['name']
@Version = ShortcutInput['version']
@ID = ShortcutInput['shareid']
const ShortName = replaceText(" ", "", @Name)
const ContentsOfURL1 = downloadURL("shareshortcuts.com/{@ID}.update")
const Shortcut = getValue(ContentsOfURL1, "Shortcut")
const Version2 = getValue(Shortcut, "Version")

if Version2 > @Version {
	getRandomItem(ContentsOfURL1['Changelog'])
	menu  {
	item "Yes":
		const DictionaryValue1 = getValue(Shortcut, "URL-download")
		openURL(DictionaryValue1)
		stop()
	item "No":
		nothing()
	}
} else {
}
Открыть в Cherri Playground Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.

Оценки и отзывы

Написать отзыв
–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Пока нет отзывов. Поделись мнением первым!

Реклама

Ещё от daboy

См. все

Вам также может понравиться

См. все
Реклама