ShareShortcuts

OpenPilot go to next event

twilsonco
Fork “OpenPilot go to next event”

Har du bygget noget nyt oven på denne genvej? Del den som en fork: den bliver din egen genvej, som du styrer, og begge sider linker til hinanden, så twilsonco får kredit.

  1. 1Hent genvejen og ret den i Genveje-appen. Giv den sit eget navn.
  2. 2Del den fra Genveje-appen og kopiér iCloud-linket.
  3. 3Kom tilbage hertil, indsæt linket og beskriv, hvad der er anderledes, fx “Tilføjet et trin, der bruger Apple Intelligence til at gøre teksten mere personlig.”
Downloads
26K
Gemt
0
Handlinger
48
Kategori
Rejser og kort
Version
1.0
Sprog
EN

Go to next event

  • This shortcut fetches your next calendar event that has a location specified, and sets OpenPilot and phone navigation to its location
  • Uses "Navigate with OpenPilot" shortcut

Nyheder

Version 1.0

First release

Versionshistorik
1.0 9. feb. 2024

First release

Hvad den gør

48 handlinger
  1. Comment
    OpenPilot go to next event By Tim Wilson, November 2023 https://github.com/twilsonco/OpenPilotSiriShortcuts Fetch the next calendar event that has a specified location, and set OpenPilot and phone navigation to that event.
  2. Comment
    Check for shortcut updates
  3. Nothing
  4. Comment
    【Auto-Update Routine】 Checks For Latest Shortcut Version ↳ https://routinehub.co/shortcut/16590/
  5. Dictionary
  6. Get Dictionary Value
  7. If
  8. Get IP Address
  9. If
  10. Get Contents of URL
    https://routinehub.co/api/v1/shortcuts/…/versions/latest
  11. If
  12. Split Text
  13. Repeat with Each
  14. Calculate Expression
  15. Set Variable
    Latest Version
  16. Split Text
  17. Repeat with Each
  18. Calculate Expression
  19. Set Variable
    Current Version
  20. If
  21. Choose from Menu
    New Version: … Release: … Whats New: "…"
  22. Choose from Menu
    Update → Result (Version)
  23. Expand URL
  24. Replace Text
  25. Open URLs
  26. Stop This Shortcut
  27. Choose from Menu
    Skip (Info (Version))
  28. 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/
  29. Nothing
  30. Find Calendar Events
  31. Repeat with Each
  32. If
  33. Get Addresses from Input
  34. Count
  35. If
  36. Location
  37. If
  38. Search Local Businesses
  39. Count
  40. If
  41. Choose from List
  42. If
  43. Get Item from List
  44. Location
  45. Run Shortcut
    Navigate with OpenPilot
  46. Open Event in Calendar
  47. Stop This Shortcut
  48. Show Result

Vis som kode
Beta

Alle genvejens handlinger skrevet ud i Cherri, et programmeringssprog til genveje. Perfekt til at lære, hvordan den virker.

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

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

Fetch the next calendar event that has a specified location, and set OpenPilot and phone navigation to that event.
*/
// Check for shortcut updates

nothing()
/*
【Auto-Update Routine】
Checks For Latest Shortcut Version
↳ https://routinehub.co/shortcut/16590/
*/
const Info = {
	"Author": "twilsonco",
	"RoutineHub ID": 17683,
	"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()
rawAction("is.workflow.actions.filter.calendarevents", {
	"WFContentItemFilter": "",
	"WFContentItemSortOrder": "Oldest First",
	"WFContentItemSortProperty": "Start Date"
})

for _ in CalendarEvents {
	if @RepeatItem {
		const Addresses = getAddresses(@RepeatItem)
		const Count = count(Addresses)
		if Count > 0 {
			location(Addresses)
		} else {
			rawAction("is.workflow.actions.searchlocalbusinesses", {
				"WFSearchQuery": "{@RepeatItem['Location']}"
			})
			const Count1 = count(LocalBusinesses)
			if Count1 > 1 {
				chooseFromList(LocalBusinesses)
			} else {
				getListItems(LocalBusinesses, 0, 0)
			}
			location(IfResult)
		}
		run("Navigate with OpenPilot", IfResult1)
		showInCalendar(@RepeatItem)
		stop()
	}
}
show("Not running because no upcoming events have location specified.")
Åbn i Cherri Playground Dekompileret med cherri 2.3.0 (GPL-2.0). Kan kræve små rettelser, før den kan kompileres.

Bedømmelser og anmeldelser

Skriv en anmeldelse
–
ud af 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Ingen anmeldelser endnu. Vær den første!

Annonce

Mere fra twilsonco

Se alle

Du vil måske også kunne lide

Se alle
Annonce