Good Morning ComputerFeb 13
A while ago in the Mac Power Users Facebook Group I was challenged to make a Workflow which would tell the user about their upcoming day. When it runs Workflow will say something like this:
Good morning Rose, it is 07:38. In Vienna the weather will be mixed precipitation throughout the week, with temperatures rising to 6°C on Friday.. The current temperature is 0 degrees celcius. There is a 11% chance of rain. Your iPad has 80% battery. Your calendar events for today are Shrove Tuesday, Work. The top news headlines for today are:
Here is some of your favourite music:
After it speaks this it then plays some of my favourite music (shuffling from a playlist I chose).
So, how does this all work?
When you import the Workflow it asks you three questions, what you name is, your Dark Sky Weather API, and the RSS feed of your favourite news source.
You can get your API Key from Dark Sky, on the free plan you get up to 1000 calls per day - more than enough for our Workflow.
Next the Workflow gets the data we need:
- the date
- the titles of the last 6 items from the RSS feed
- the current location and the name of it
- the weather for your current location
- the kind of device you're using
- the battery level of the device you're using
- your calendar events for today
Then this information is inserted into the text, let's look at that again.
Good morning Name, it is Current Time. In City the weather will be Weather Summary. The current temperature is Temperature degrees celcius. There is a Rain %% chance of rain. Your Device Model has Battery Level% battery. Calendar Events. The top news headlines for today are Headlines. Here is some of your favourite music:
Everything in bold is a variable, replaced with data we either fetched from the internet, or collected from the device. After this text all that Workflow has to do is use the speak text action, and the play music action.
There are two current versions of the Workflow, an imperial version for those who prefer Farenheit and a metric version for those who prefer Celsius. If you download either of these you can have your device talk to you in the morning, and tell you about your day.