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
What's New
Version 1.0
First release
What it does
48 actions-
CommentOpenPilot 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.
-
CommentCheck for shortcut updates
-
Nothing
-
Comment【Auto-Update Routine】 Checks For Latest Shortcut Version ↳ https://routinehub.co/shortcut/16590/
-
Dictionary
-
Get Dictionary Value
-
If
-
Get IP Address
-
If
-
Get Contents of URLhttps://routinehub.co/api/v1/shortcuts/…/versions/latest
-
If
-
Split Text
-
Repeat with Each
-
Calculate Expression
-
Set VariableLatest Version
-
Split Text
-
Repeat with Each
-
Calculate Expression
-
Set VariableCurrent Version
-
If
-
Choose from MenuNew Version: … Release: … Whats New: "…"
-
Choose from MenuUpdate → Result (Version)
-
Expand URL
-
Replace Text
-
Open URLs
-
Stop This Shortcut
-
Choose from MenuSkip (Info (Version))
-
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/
-
Nothing
-
Find Calendar Events
-
Repeat with Each
-
If
-
Get Addresses from Input
-
Count
-
If
-
Location
-
If
-
Search Local Businesses
-
Count
-
If
-
Choose from List
-
If
-
Get Item from List
-
Location
-
Run ShortcutNavigate with OpenPilot
-
Open Event in Calendar
-
Stop This Shortcut
-
Show Result
View as code
Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.
#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.")
Open in Cherri Playground
Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.
Ratings & Reviews
Write a Review–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Advertisement
More by twilsonco
You Might Also Like
Advertisement