Forhåndsvisning
- You specify one or more Reminders lists along with number of past/future days to include, and when run, the shortcut produces a nicely formatted PDF that contains all reminders in the specified lists, one PDF per list
- Shows most pertinent reminder data if present: title, name (if different from title), notes, completed, priority, flagged, tags, location (macOS only due to a bug in iOS), URL, images, and subtasks
- Works with repeat reminders, showing next due instance of the repeat reminder and the count of completed instances
- Images are added by first uploading to Imgur (one image per image-containing reminder)
- Here's what the resulting PDF looks like (see screenshot)
Nyheder
Version 1.0
First release
Hvad den gør
250 handlinger-
CommentCreate compiled PDF from specified Reminders lists, one PDF file per list
-
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
-
CommentSpecify one or more Reminders lists, one per line
-
Text
-
CommentWhen searching for reminders, how many days into the past should be searched?
-
Number
-
CommentWhen searching for reminders, how many days into the future should be searched?
-
Number
-
CommentEnter the text that goes in each PDF title between each lists’ reminder count and name. For example, to get the title “12 reminder(s) in list Work Reminders”, you would enter “reminder(s) in list” as the value. Please enter in whatever language you …
-
Text
-
CommentSize for downscaling images before they’re combined into a grid and uploaded to Imgur (combination is necessary to avoid hitting their 50 image per hour upload limit)
-
Number
-
Nothing
-
CommentFunction to construct markdown string from reminder
-
Get Type
-
If
-
Set VariableInputReminder
-
Get Details of Reminders
-
Get Details of Reminders
-
If
-
Text
-
If
-
If
-
Text
-
If
-
If
-
Text
-
If
-
Nothing
-
Get Details of Reminders
-
If
-
Text
-
If
-
Nothing
-
Get Details of Reminders
-
If
-
Text
-
If
-
Nothing
-
Get Details of Reminders
-
If
-
Text
-
If
-
Nothing
-
Get Details of Reminders
-
If
-
Text
-
If
-
Nothing
-
Get Details of Reminders
-
If
-
Repeat with Each
-
Text
-
Add to Variable
-
Combine Text
-
Text
-
If
-
Nothing
-
Get Details of Reminders
-
If
-
Get Component of URL
-
Text
-
If
-
Nothing
-
Get Details of Reminders
-
If
-
Text
-
If
-
Nothing
-
Get Details of Reminders
-
If
-
Get Device Details
-
If
-
CommentAccessing location causes KCLErrorDomain error 2 on iOS, so only include for Mac
-
Split Text
-
Combine Text
-
Text
-
If
-
Text
-
If
-
Nothing
-
Get Details of Reminders
-
If
-
Set VariableImgList
-
Repeat with Each
-
Resize Image
-
Add to Variable
-
Count
-
Calculate
-
If
-
Combine Images
-
Set VariableImg
-
If
-
Combine Images
-
Set VariableImg
-
List
-
Calculate Statistics
-
If
-
Resize Image
-
Set VariableImg
-
Imgur Upload
-
Text
-
If
-
Nothing
-
Text
-
Stop and Output
-
Choose from MenuSave PDF file to iCloud documents folder?
-
Choose from MenuYes
-
Number
-
Choose from MenuNo (view/share only)
-
Number
-
Set VariableSavePDF
-
Date
-
Adjust Date
-
Adjust Date
-
Adjust Date
-
Find Reminders
-
Adjust Date
-
Adjust Date
-
Split Text
-
Repeat with Each
-
Find Reminders
-
Nothing
-
Set VariableReminderCheckDict
-
Repeat with Each
-
If
-
Text
-
If
-
Get Dictionary Value
-
Get Dictionary Value
-
If
-
Calculate
-
If
-
Number
-
Get Dictionary Value
-
Calculate
-
If
-
Get Dictionary Value
-
If
-
Nothing
-
If
-
Nothing
-
If
-
Get Details of Reminders
-
If
-
If
-
Dictionary
-
If
-
Dictionary
-
Set Dictionary Value
-
Set VariableReminderCheckDict
-
If
-
If
-
If
-
Get Time Between Dates
-
Calculate
-
Get Time Between Dates
-
Calculate
-
If
-
Text
-
If
-
Text
-
Dictionary
-
Set Dictionary Value
-
Set VariableReminderCheckDict
-
If
-
Dictionary
-
Set Dictionary Value
-
Set VariableReminderCheckDict
-
If
-
If
-
Number
-
If
Vis som kode
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 blue
#define glyph checklist
// Create compiled PDF from specified Reminders lists, one PDF file per list
// Check for shortcut updates
nothing()
/*
【Auto-Update Routine】
Checks For Latest Shortcut Version
↳ https://routinehub.co/shortcut/16590/
*/
const Info = {
"Author": "twilsonco",
"RoutineHub ID": 17512,
"Version": "1.0.2",
"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()
// Specify one or more Reminders lists, one per line
const ReminderList = "Reminders\nWork\nHome"
// When searching for reminders, how many days into the past should be searched?
const NumPastDays = 30
// When searching for reminders, how many days into the future should be searched?
const NumFutureDays = 30
// Enter the text that goes in each PDF title between each lists’ reminder count and name. For example, to get the title “12 reminder(s) in list Work Reminders”, you would enter “reminder(s) in list” as the value. Please enter in whatever language you want to use.
const TitleMiddleStr = "reminder(s) in list"
// Size for downscaling images before they’re combined into a grid and uploaded to Imgur (combination is necessary to avoid hitting their 50 image per hour upload limit)
const ImageSize = 150
nothing()
// Function to construct markdown string from reminder
const Type = typeOf(ShortcutInput)
if Type == "Reminder" {
@InputReminder = ShortcutInput
rawAction("is.workflow.actions.properties.reminders", {
"WFContentItemPropertyName": "Title",
"WFInput": "@InputReminder"
})
rawAction("is.workflow.actions.properties.reminders", {
"WFContentItemPropertyName": "Priority",
"WFInput": "@InputReminder"
})
if Priority == {
} else {
if Priority == {
} else {
if Priority == {
} else {
}
}
}
rawAction("is.workflow.actions.properties.reminders", {
"WFContentItemPropertyName": "Is Flagged",
"WFInput": "@InputReminder"
})
if IsFlagged == {
} else {
}
rawAction("is.workflow.actions.properties.reminders", {
"WFContentItemPropertyName": "Notes",
"WFInput": "@InputReminder"
})
if Notes {
} else {
}
rawAction("is.workflow.actions.properties.reminders", {
"WFContentItemPropertyName": "Due Date",
"WFInput": "@InputReminder"
})
if DueDate {
} else {
}
rawAction("is.workflow.actions.properties.reminders", {
"WFContentItemPropertyName": "Completion Date",
"WFInput": "@InputReminder"
})
if CompletionDate {
} else {
}
rawAction("is.workflow.actions.properties.reminders", {
"WFContentItemPropertyName": "Tags",
"WFInput": "@InputReminder"
})
if Tags {
for _ in Tags {
@TagList += "`#{@RepeatItem}`"
}
joinText(@TagList, " ")
} else {
}
rawAction("is.workflow.actions.properties.reminders", {
"WFContentItemPropertyName": "URL",
"WFInput": "@InputReminder"
})
if URL {
getURLDetail(URL, "Host")
} else {
}
rawAction("is.workflow.actions.properties.reminders", {
"WFContentItemPropertyName": "Name",
"WFInput": "@InputReminder"
})
if Name != {
} else {
}
rawAction("is.workflow.actions.properties.reminders", {
"WFContentItemPropertyName": "Reminder Location",
"WFInput": "@InputReminder"
})
if ReminderLocation {
const DeviceModel = getDeviceDetail("Device Model")
if DeviceModel == "Mac" {
// Accessing location causes KCLErrorDomain error 2 on iOS, so only include for Mac
const SplitText2 = splitText(ReminderLocation)
const InlineAddress = joinText(SplitText2, " ")
} else {
}
} else {
}
rawAction("is.workflow.actions.properties.reminders", {
"WFContentItemPropertyName": "Images",
"WFInput": "@InputReminder"
})
if Images {
@ImgList
for _ in Images {
resizeImage(@RepeatItem, ImageSize)
@ImgList
}
const Count = count(@ImgList)
const CalculationResult = Count * ImageSize
if CalculationResult < 1000 {
rawAction("is.workflow.actions.image.combine", {
"WFImageCombineMode": "Horizontally",
"WFImageCombineSpacing": "10",
"WFInput": "@ImgList"
})
@Img
} else {
rawAction("is.workflow.actions.image.combine", {
"WFImageCombineMode": "In a Grid",
"WFImageCombineSpacing": "10",
"WFInput": "@ImgList"
})
@Img = CombinedImage
const ImgDims = list(CombinedImage['Width'], CombinedImage['Height'])
const Maximum = statistic("Maximum", nil)
if Maximum > 600 {
resizeImageByLongestEdge(CombinedImage, "600")
@Img
}
}
rawAction("is.workflow.actions.imgur.upload", {
"WFImgurAnonymous": false,
"WFImgurDirectLink": true,
"WFInput": "@Img"
})
} else {
}
const ReminderMarkdownOutputString = "{Priority1}{}{Name1}{Flagged}\n\n{Notes1}{DueDate1}{CompletionDate1}{Tags1}{Location}{URL1}{Images1}"
output(ReminderMarkdownOutputString)
}
menu "Save PDF file to iCloud documents folder?" {
item "Yes":
item "No (view/share only)":
}
@SavePDF = 0
const CurrentDate = currentDate()
const PastDate = adjustDate(CurrentDate, "Subtract")
adjustDate(CurrentDate, "")
const FutureDate = adjustDate(, "Get Start of Day")
rawAction("is.workflow.actions.filter.reminders", {
"WFContentItemFilter": ""
})
adjustDate(CurrentDate, "")
adjustDate(, "Get Start of Day")
const ReminderLists = splitText(ReminderList)
for _ in ReminderLists {
rawAction("is.workflow.actions.filter.reminders", {
"WFContentItemFilter": "",
"WFContentItemInputParameter": "Reminders"
})
nothing()
@ReminderCheckDict
for _ in Reminders1 {
if !@RepeatItem2 {
const ReminderKey = "{@RepeatItem2}{@RepeatItem2['Notes']}{@RepeatItem2['Priority']}{@RepeatItem2['Is Flagged']}{@RepeatItem2['Tags']}"
if @ReminderCheckDict contains ReminderKey {
const RemCheckData = getValue(@ReminderCheckDict, ReminderKey)
const OldNumCompleted = getValue(RemCheckData, "completed")
if @RepeatItem2 == {
} else {
number(OldNumCompleted)
}
const NewTotal = getValue(RemCheckData, "total")
const NewNumTotal = NewTotal + 1
if RemCheckData['Keys'] contains "due date" {
getValue(RemCheckData, "due date")
} else {
}
if @RepeatItem2 == {
} else {
rawAction("is.workflow.actions.properties.reminders", {
"WFContentItemPropertyName": "Due Date",
"WFInput": "@RepeatItem2"
})
}
if !RemDueDate {
if CheckDueDate {
} else {
}
setValue(@ReminderCheckDict, ReminderKey)
@ReminderCheckDict
} else {
if RemCheckData['Keys'] contains "due date" {
if @RepeatItem2 {
rawAction("is.workflow.actions.gettimebetweendates", {
"WFInput": "{RemCheckData['due date']}",
"WFTimeUntilFromDate": "{}",
"WFTimeUntilUnit": "Hours"
})
const TimeDistOld = TimeBetweenDates … nil
rawAction("is.workflow.actions.gettimebetweendates", {
"WFInput": "{}",
"WFTimeUntilFromDate": "{}",
"WFTimeUntilUnit": "Hours"
})
const TimeDistCur = TimeBetweenDates1 … nil
if TimeDistCur < TimeDistOld {
} else {
}
setValue(@ReminderCheckDict, ReminderKey)
@ReminderCheckDict
}
} else {
setValue(@ReminderCheckDict, ReminderKey)
@ReminderCheckDict
}
}
} else {
if @RepeatItem2 == {
} else {
}
rawAction("is.workflow.actions.properties.reminders", {
"WFContentItemPropertyName": "Due Date",
"WFInput": "@RepeatItem2"
})
if DueDate2 {
} else {
}
setValue(@ReminderCheckDict, ReminderKey)
@ReminderCheckDict
}
}
}
count(@ReminderCheckDict)
@ReminderCount
@PDFText = "nil"
for _ in @ReminderCheckDict {
const CurRemDict = getValue(@ReminderCheckDict, @RepeatItem2)
if CurRemDict['Keys'] contains "due date" {
rawAction("is.workflow.actions.filter.reminders", {
"WFContentItemFilter": "",
"WFContentItemLimitEnabled": true,
"WFContentItemLimitNumber": 1
})
} else {
rawAction("is.workflow.actions.filter.reminders", {
"WFContentItemFilter": "",
"WFContentItemLimitEnabled": true,
"WFContentItemLimitNumber": 1
})
}
@CurRem
const CurRemNumTotal = getValue(CurRemDict, "total")
const CurRemNumComplete = getValue(CurRemDict, "completed")
if CurRemNumComplete == CurRemNumTotal {
} else {
}
if CurRemNumTotal > 1 {
if CurRemNumComplete < CurRemNumTotal {
} else {
}
} else {
}
const ReminderMarkdownString = runSelf(@CurRem)
@PDFText = "\n{@PDFText}\n\n-----\n\n## {CompleteStr}{ReminderMarkdownString}"
rawAction("is.workflow.actions.properties.reminders", {
"WFContentItemPropertyName": "Subtasks",
"WFInput": "@CurRem"
})
for _ in Subtasks {
const SubtaskMarkdownString = runSelf(@RepeatItem3)
@PDFText = "{@PDFText}\n\n### {SubtaskMarkdownString}"
}
}
const Text = "# {@ReminderCount} {TitleMiddleStr} *{@RepeatItem}*:\n\n{@PDFText}"
const RichTextFromMarkdown = getRichTextFromMarkdown(Text)
const PDF = makePDF(RichTextFromMarkdown, true)
if @SavePDF == 1 {
const FileName = "{@RepeatItem} PDF created {CurrentDate}"
const FileNameOut = replaceText(":", ".", FileName)
saveFile(FileNameOut, PDF, true)
showNotification("At iCloud/Documents/{FileName}", "PDF saved for {@RepeatItem}", false, File)
} else {
quicklook(PDF)
}
}
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
Du vil måske også kunne lide
Annonce