ShareShortcuts
Создать форк «OpenPilot go to favorite»

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

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

Go to favorite

  • Similar to home/work, but this one lets you specify multiple place names and locations
  • When run, you can select one of the favorites from the list, verbally or by tapping (even in CarPlay 🚗)
  • There is no set format to use for the specified locations
  • The specified locations are used to search, and the top result is used. They need to be complete enough that the desired place will be the top result
  • Uses "Navigate with OpenPilot" shortcut

Что нового

Версия 1.0

First release

История версий
1.0 9 фев 2024 г.

First release

Что делает

Действий: 45
  1. Comment
    OpenPilot go to favorite By Tim Wilson, November 2023 https://github.com/twilsonco/OpenPilotSiriShortcuts Similar to home/work, but this one lets you specify multiple place names and locations When run, you can select one of the favorites from the l…
  2. Dictionary
  3. Comment
    Check for shortcut updates
  4. Nothing
  5. Comment
    【Auto-Update Routine】 Checks For Latest Shortcut Version ↳ https://routinehub.co/shortcut/16590/
  6. Dictionary
  7. Get Dictionary Value
  8. If
  9. Get IP Address
  10. If
  11. Get Contents of URL
    https://routinehub.co/api/v1/shortcuts/…/versions/latest
  12. If
  13. Split Text
  14. Repeat with Each
  15. Calculate Expression
  16. Set Variable
    Latest Version
  17. Split Text
  18. Repeat with Each
  19. Calculate Expression
  20. Set Variable
    Current Version
  21. If
  22. Choose from Menu
    New Version: … Release: … Whats New: "…"
  23. Choose from Menu
    Update → Result (Version)
  24. Expand URL
  25. Replace Text
  26. Open URLs
  27. Stop This Shortcut
  28. Choose from Menu
    Skip (Info (Version))
  29. Comment
    【Auto-Update Routine Ends Here】 Support → https://www.reddit.com/r/shortcuts/comments/18j4f9p/ 【⚙️】 Convert Semantic Number to Decimals ↳ https://routinehub.co/shortcut/16589/
  30. Nothing
  31. Get Dictionary Value
  32. Count
  33. If
  34. Get Item from List
  35. If
  36. Choose from List
  37. Get Dictionary Value
  38. Get Addresses from Input
  39. If
  40. Search Local Businesses
  41. Get Item from List
  42. Location
  43. If
  44. Location
  45. Run Shortcut
    Navigate with OpenPilot

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

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

#include 'actions/web'
#include 'actions/network'
#define color darkblue
#define glyph locationPin

/*
OpenPilot go to favorite
By Tim Wilson, November 2023
https://github.com/twilsonco/OpenPilotSiriShortcuts

Similar to home/work, but this one lets you specify multiple place names and locations
When run, you can select one of the favorites from the list, verbally or by tapping (even in CarPlay 🚗)
There is no set format to use for the specified locations
The specified locations are used to search, and the top result is used. They need to be complete enough that the desired place will be the top result
*/
const PlacesDictionary = {}
// Check for shortcut updates

nothing()
/*
【Auto-Update Routine】
Checks For Latest Shortcut Version
↳ https://routinehub.co/shortcut/16590/
*/
const Info = {
	"Author": "twilsonco",
	"RoutineHub ID": 17682,
	"Version": "1.0.1",
	"Version Check": true
}
const True = getValue(Info, "Version Check")

if True == "Yes" {
	const CurrentIPAddress = getExternalIP("IPv4")
	if CurrentIPAddress {
		const Result = downloadURL("https://routinehub.co/api/v1/shortcuts/{Info['RoutineHub ID']}/versions/latest")
		if Result contains "success" {
			const SplitText = splitText(Result['Version'], ".")
			for _ in SplitText {
				@LatestVersion = ((1/1000)^@RepeatIndex)*@RepeatItem+@LatestVersion
			}
			const SplitText1 = splitText(Info['Version'], ".")
			for _ in SplitText1 {
				@CurrentVersion = ((1/1000)^@RepeatIndex)*@RepeatItem+@CurrentVersion
			}
			if @LatestVersion > @CurrentVersion {
				menu "New Version: {Result['Version']}\nRelease: {Result['Release']}\nWhats New: \"{Result['Notes']}\"" {
				item "Update → {Result['Version']}":
					expandURL(Result['URL'])
					const UpdatedText = replaceText("https://www.icloud.com/", "shortcuts://", false)
					openURL(UpdatedText)
					stop()
				item "Skip ({Info['Version']})":
				}
			}
		}
	}
}
/*
【Auto-Update Routine Ends Here】
Support → https://www.reddit.com/r/shortcuts/comments/18j4f9p/

【⚙️】
Convert Semantic Number to Decimals
↳ https://routinehub.co/shortcut/16589/
*/
nothing()
const PlaceNames = getValue(PlacesDictionary, "")
const Count = count(PlaceNames)

if Count == 1 {
	getRandomItem(PlaceNames)
} else {
	chooseFromList(PlaceNames)
}
const ChosenPlace = getValue(PlacesDictionary)
const Addresses = getAddresses(ChosenPlace)

if !Addresses {
	rawAction("is.workflow.actions.searchlocalbusinesses", {
		"WFSearchQuery": "{ChosenPlace}"
	})
	const FirstResult = getRandomItem(LocalBusinesses)
	location(FirstResult)
} else {
	location(Addresses)
}
run("Navigate with OpenPilot", IfResult)
Открыть в Cherri Playground Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.

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

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

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

Реклама

Ещё от twilsonco

См. все

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

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