Writing on Tablets Tech stuff from @yeltzland

My Cool (and even more over-engineered) Shopping List System 2.0

As I’ve written about before (read here and here for some background), I’ve got a crazy-complicated system to manage my shopping list, involving my Amazon Echo, Todoist, IFTTT and Slack.

The original system was working OK, but it had several non-optimal parts including:

  • Getting a notification every time I was near the supermarket, whether there was anything on my shopping list or not
  • Even if there is anything on the list, I get the same alert each time
  • Ideally I’d like to see what is on the list in the notification, rather than just a link open Todoist. That would mean I can see on my Apple Watch what I need to buy without having to get my phone out.

New “Architecture”

I thought I’d draw the new, improved setup on my whiteboard to make it a little clearer to explain …

Shopping List setup


When I was building the original system, I didn’t know about IFTTT Maker Channel, which can:

Integrate other services on IFTTT with your DIY projects. You can create Applets that work with any devices or apps that can make or receive a web request (aka webhooks).

This is fantastic, as you can really build some complex systems that hook into your own logic. So with a little more work I can now build exactly the setup I want.

New Service Logic

The logic for Shopping List v2.0 is as follows:

  1. Setup two location-based IFTTT applets that trigger when I am near the two Hexham supermarkets (as before)
  2. The “that” part of the applets now simply make an API call to my web server (passing a secret authentication token for security)
  3. The web service, on receipt of an authenticated call, will:
    1. Call the Todoist API to see if there are any items on my shopping list
    2. If the list is non-empty, and has changed since the last call to the service, make a HTTP call to a third IFTTT applet (passing the shopping list details as a parameter)
  4. The third IFTTT applet simply coordinates the incoming parameters into a Slack message sent to me

You can see the results from yesterday’s trip here:

Shopping List in Slack

The first alert was when I got to Waitrose, and after I’d crossed off 3 items from the list in Tododist, when I got to Tescos it then reminded me about the final item.

I’m pretty happy with this now. It really is great to use Alexa as a way of managing our shopping list, and I don’t use any other way of doing it any more than by voice.

Yes, it is a pretty nobby list of things to fetch (I was going to Waitrose after all).

And no, I never did get the Sausage Casserole mix. It appears Hexham is all out right now.

Alexa Amazon Echo Todoist IFTTT Slack Voice

Moving 'Count The Days Left' to Swift 3

Version 2.3 of Count The Days Left has now hit the App Store for your viewing pleasure.

I finally got around to upgrading the code to Swift 3. The XCode migration code did a reasonable job with the syntax changes, but missed a few things around interface changes - especially in the WatchOS code - that I had to fix manually.

I also fixed a very minor logic error in the date calculation in the settings page. Quite amazing it had been sitting there in plain sight for a long time without me noticing it.

Not much more to do in the app right now, but maybe WWDC in the summer will bring some exciting new areas in which to play in?

Count The Days Left Apps Swift

A Workflow to upload web content to Medium

Building an efficient way to copy posts from my web site to Medium

In the near future, Writing on Tablets is obviously be massive success, when the whole world discovers pearls of wisdom like these.

However right now, I get many more readers on Medium - although still not many! - so I’m currently duplicating posts from the website to Medium.

I want to automate this, and in theory I should be able to do this through IFTTT by hooking up the site’s RSS feed and my Medium account. However, for whatever reason this has never worked for me.

On a PC, it’s pretty easy to copy and paste the website page content into Medium, but as ever this isn’t quite so easy on an iPad. However, what we do have is the Workflow App to help, and I’ve built a workflow to do just that.

The workflow takes a selection from Safari as input (via the Share extension), and uses the Medium API to first get your user ID, and then post up the selected content as Markdown. I also added some code to automatically append an attribution for the original page at the end.

The code needs an Medium Integration Token, which can be generated on your Medium Settings page, but other than that is simple to configure.

I’ve submitted it to the Workflow Gallery, so I’ll add a link if/when it’s approved.

If you’re reading this on Writing on Tablets, the generated Medium article is at https://medium.com/@yeltzland/a-workflow-to-upload-web-content-to-medium-writing-on-tablets-8e5798b8f56e#.49ymh1stz

Workflow Medium

Trello vs GitHub Projects. Power vs Simplicity

Trello is great and has lots of features, but I've switched to using GitHub Projects for tracking my work items

Big news this week is that Trello is being acquired by Atlassian for a whopping $425 million!

Now I like Trello a lot. I’ve used it for my own projects for a while, as have a few companies I’ve worked with recently. It’s got a nice interface, is easy to use with some powerful extensions and can be easily integrated into other systems to make it really useful.

However recently I’ve switched to using GitHub Projects for tracking my work items and I’m pretty happy about doing so.

GitHub Projects has a similar style Kanban card-based interface, but has no extensions and as far as I can tell, and the API is currently only in Preview mode. The web interface is also slightly flaky in Safari on iOS.

So what’s to like? Well for me, the big advantage is that the work items are right next to the code in GitHub, so it’s really easy to find when you are working on multiple projects. It integrates perfectly into managing issues via GitHub - great for my open-source projects, especially when following the GitHub Flow process using pull requests Also, even though Trello is very extensible, I never really use those power features, and a simple Kanban board is enough for me.

I really hope GitHub do add a few more features to their Projects board - for example webhooks for when a card changes column, and the ability to assign cards to commits - but for now it’s good enough for me.

It’s interesting Atlassian recognise the potential synergies with their existing software management software too. However I’ve recently gone all in with using GitHub, and I’m really happy about that decision right now.

GitHub Trello Productivity

Consolidating Some Old Posts

Just a quick note today.

In case you were following closely and thought I’d be unbelieveably productive and added lots of posts, I’ve moved over my old blog posts from my bravelocation.com site on to here.

I didn’t make sense to have two homes for my writing, so this is now the home for all my posts. Some of them date back to 2005 when they lived on my old MSDN blog and are now chiefly interesting from a historical point of view.