Here is a short how-to save time with a daily task. Recently, I got a pdf file from the school of my children with several dozen important dates and appointments over the next year. The new LLM functionality offers a neat little hack to extract all dates and generate an ics file which you can directly pull on your calendar to add all dates in a document. As I cannot post the pdf file from the school here, I will use the Wolfram U Scheduled Courses website Calendar of Wolfram U Scheduled Courses instead.
The following code creates an interim file on the Desktop (of a Mac) which it then converts via command line to an ics file.
makeICSfile[input_,output_]:=Module[{},Export["~/Desktop/mynewAppointments.txt",Quiet[LLMFunction["The following text `1` contains events at certain dates and time. Extract all dates and times and produce the content of an ics file which adds these dates to my calendar. Make it so that I can copy this in a terminal into an empty file with ics extension. Only produce the contents of that file.",LLMEvaluator->LLMConfiguration["Model"->"gpt-4"]][Import[input,"Plaintext"]]]];​​Run["mv ~/Desktop/mynewAppointments.txt "<>output];]
I have noticed that this only appears to work with gpt-4. It is easy to adjust the file paths to a Windows machine. Here is how you run the function:
makeICSfile["https://www.wolfram.com/wolfram-u/calendar/","~/Desktop/mynewAppointment.ics"]
I have not extensively tested the function, but it should work on other “file types”, too, such as pdfs. Once you have the ics file just pull it into your calendar app - AT YOUR OWN RISK.
​
The entire thing could be made into a prompt for the repository, I guess, but I just wanted a quick hack, not a polished product.

CITE THIS NOTEBOOK

ChatGPT & LLMs: add dates & appointments from websites & files to your calendar with LLMFunction​
by Marco Thiel​
Wolfram Community, STAFF PICKS, August 31, 2023
​https://community.wolfram.com/groups/-/m/t/3002284