Tag: automation

Edit: Updated the plug-in to include Sal’s code for viewing the kanban tags (the top-down view) and for adding the kanban tags to OmniFocus if they don’t already exist. Updated the article’s instructions accordingly.

I’ve recently been trying out Kanban boards for my personal use, both at home and at work.

I’m by no means a software developer, but I find the idea of selecting a subset of tasks to be done today and then further highlighting the one task that is currently in progress to be very helpful for a scatterbrain like me.

In my work, I also get constantly interrupted by people asking me questions or handing me “one quick task” – so it’s always helpful to see what it was that I was working on before the interruption.
But as much as I like the Kanban board idea, I was not interested in trying another task manager (i.e. Trello). I am happy with OmniFocus, and I wanted to see whether it was possible to implement a Kanban board with OmniFocus.

Kanban Board Layout

I searched online for solutions other people have come up with. And there were a few, most of them involving the capture of OmniFocus data and then creating a visual board using some script of another.
Although there were some interesting ideas, I didn’t want a board I couldn’t edit and that required me to jump back into OmniFocus to tick off my tasks.

One of the other suggestions was to create tags for the different Kanban columns and then open multiple instances of OmniFocus, each showing their respective “column” of tasks.

This was a workable idea for me. It just required a little fiddling with Keyboard Maestro to create the three instances of OmniFocus and have them show the correct Perspective. (I’m not a programmer, so I don’t need the “Testing” column. However, I have replaced it with a “Waiting” column – sometimes, I need to pass tasks off to other people, and I need to keep track of what I’m waiting for.)

The other option, of course, is to have the one instance of OmniFocus open and select just the Kanban tags I’m interested in seeing.

Update: There is now an additional script in the plug-in called “Kanban View”. Activating this script will automatically take you into this Top-Down view. This might be the easiest way to implement the kanban view (if you don’t want to mess about with Keyboard Maestro).

OmniFocus Automation Plug-In

But this was just the barest of what I need to make a viable Kanban board – you see, I needed a way to move tasks between the columns quickly.

It was possible to edit the task tags manually, but the whole point was to make this as painless as possible (not to mention that to move a task from one column to another properly, you had to remove the tag of the previous column as well).

So I created a few automation scripts to remove unwanted Kanban tags and assign the correct one quickly.
I’ve put all six scripts into one OmniFocus Plug-In bundle. I chose to create a plug-in bundle instead of standalone files because the bundle allows me to include icons that would show up in the toolbar if you were to add the script up there.

You can download the OmniFocus plug-in here. Unzip it before trying to install it.

For more information on how to install OmniFocus automation plug-ins, please visit the Omni Automation website.

TLDR; You double click it on the .omnifocusjs file and follow the OmniFocus prompts.

There is just one thing you need to do before using the scripts – and you don’t even need to do it if you don’t care about keeping your OmniFocus tags neat – create the tag “Kanban” and create the following sub-tags (you would want them in this order):

  • To Do
  • In Progress
  • Waiting
  • Done

Update: If you run the “Kanban View” script, it will automatically create all the tags required.

How I Use the Scripts

I put the scripts in the OmniFocus toolbar for easy access.1Right-click the toolbar and select “Customize Toolbar”. You then find the little icons for the Kanban scripts and drag them up to the toolbar.
You might notice the icons look a little different in your version – that was because I realised at the time of creating this blogpost that my icons don’t show very well in dark mode, so I went and changed all the icons.

Otherwise, you can activate the script by going to Automation > Kanban:

Update: You will now see the “Kanban View” script above “Kanban: To Do”.

Every day I go through my master list of potential tasks and select the ones I want to work on today. I then activate the “Kanban: To Do” script and the selected tasks would be assigned the appropriate tag.

I then move to my Kanban board layout – whether that is the three-column view or the top-down view, it doesn’t matter – and I select the one item that I want to start work on. I click on the “Kanban: In Progress”. This moves the task into the appropriate “column”, and I begin my work.

If a task gets held up because I’m waiting for someone to give me something, I click on the “Kanban: Waiting” script and the task would be moved to the “Waiting” column. I either rename the task or add a note to remind myself who I was waiting.
As an alternative, you may want to check out Rosemary Orchard’s “Complete and Await Reply” automation plug-in. This plug-in marks a selected task as complete and create a duplicate of the task and prepend the task name with “Waiting on reply: ”
Just a note though: this plug-in doesn’t assign any tags to the task, so you would still need to use the “Kanban: Waiting” script to move the task to the correct column.

Once I complete a task, I use the “Kanban: Done” script to move it to the Done column. The script marks the task as completed and assigns the “Done” tag to it.

You only need to do this if you’re interested in seeing how many tasks you’ve completed in a day (it might give you a sense of accomplishment, or you may want to review your completed task for planning purposes). If you aren’t interested in this, you can mark a task as completed normally once you’re done with it.

The Done column is actually a specially created Perspective that shows all completed items with the “Done” tag.

Once I’m done with my end of the day review, I select all the tasks in the Done column and run the “Kanban: Clear” script. This would clear the “Done” tag from the tasks, and the tasks would disappear from the Done perspective.

— * —

The scripts are fairly straightforward; for the most part, they just remove and assign tags. But that’s the whole point of the automation – to remove friction and speed up a task I have to do multiple times a day.

And the great thing about this Kanban Board automation? It works even if you have other tags assigned to the tasks. If on a particular day, I didn’t want to view my task as a Kanban board I can still use my “Hot” perspective (flagged tasks with either the “Personal” or “Work” tag assigned) to work on my Top-3 tasks of the day.

Let me know in the comments below if this helped in any way.

References

References
1 Right-click the toolbar and select “Customize Toolbar”. You then find the little icons for the Kanban scripts and drag them up to the toolbar.
I read a lot of web series, whether they are webcomics or web novels, so I created this Shortcut script to keep track of which chapter/episode I’m up to.
I also created a subsequent script that would extract and load the latest chapter from your reading log.
I’m sure you can tweak this to keep track of your web TV shows too.

How To Use

  1. You need to have both the Shortcuts app and the Drafts app on your phone (it is not necessary to have Drafts Pro)
  2. Download the following three scripts (you need all three for it to work properly):
    • Load Web Reading
    • Log Web Reading
    • Create Web Reading Log1You don’t run this script, this script is called by “Log Web Reading”

To Record Your Progress

  1. When you’re reading your favourite web series and want to record your progress, open Share Sheet on Safari and select the “Log Web Reading” script

  1. Select “^New Reading”2In my screenshot, you would see some of the web series I’m currently reading, but when you run the script for the first time, you would only see “^New Reading” and in the prompt, enter the name of the web series you’re reading3it would auto-populate with the name of the website, but this may not be accurate

  1. Wait for a little bit, it would show two notifications. First, to tell you when your new reading log has been created, and second when your current progress has been logged.

  1. The next time you run the “Log Web Reading” script, you can select your previously created log in the drop-down menu to update your progress

To Load Your Latest Chapter

  1. To load your latest chapter, activate the “Load Web Reading” Script – I have it on my home screen, but you can activate it from Safari Share Sheet if you want.
  2. Select the web series you want to read
  3. Safari would load up the latest chapter you were reading
  4. When you’re done reading, remember to run “Log Web Reading” to mark down your latest chapter
Click on the image to see the full-sized image

How It Works

An individual Drafts note is created for each web series you want to track.
When you run the “Log Web Reading” script and select “^New Reading”, Shortcuts creates a new Drafts note for the web series you want to log.
The Shortcut script would extract the URL of the website you were on when you activated the Safari Share Sheet and save it to the Drafts note4It also includes a date stamp because I like to keep track of my reading progress.

The next time you run “Log Web Reading” and select an existing web series log, Shortcuts would find the original Drafts note it had created and append the latest URL to the note.

When you run the “Load Web Reading” script and select the web series you want to read, Shortcuts would find the latest entry in the Drafts note, extract the URL and load it in Safari.

How the Drafts Notes Work

For every web series you track, a Drafts note is created with the following properties:
– Titled with the name you entered in the prompt (name of the web series)
– tagged with “bookmark” and “log”
– is flagged
– is archived

Every time you run the “Log” and “Load” scripts, they would search for all the notes that match the above criteria and extract the titles to populate the web series drop-down menu.

In fact, when you run “Log Web Reading” for the first time, a note is created with the title “^New Reading” and all the above properties – which is why you have the “^New Reading” option in the drop-down menu.5The reason why New Reading is prepended with a “^” is that the drop-down menu is sorted alphabetically and I wanted New Reading to be at the top. So don’t delete that note.

I create a Drafts Workspace that shows me all my reading logs – this makes it easy to manage my logs (see below)

How to Remove a Series

When you’re finished with a web series and you don’t want to it to show up on the drop-down menu anymore, simply remove the flag from the Drafts note6or delete the note.

References

References
1 You don’t run this script, this script is called by “Log Web Reading”
2 In my screenshot, you would see some of the web series I’m currently reading, but when you run the script for the first time, you would only see “^New Reading”
3 it would auto-populate with the name of the website, but this may not be accurate
4 It also includes a date stamp because I like to keep track of my reading progress
5 The reason why New Reading is prepended with a “^” is that the drop-down menu is sorted alphabetically and I wanted New Reading to be at the top.
6 or delete the note
Edit: I’ve updated the workflow because I realised there was an actual book links field that I could use instead of trying to extract the book ID to build the link.

I also realise that my workflow was built using iOS 13’s Shortcuts app, so a lot of people won’t be able to use it. I will build one using iOS 12 asap and will post a link to that as soon as that’s done.

Lastly, you might find that the workflow doesn’t populate some start/finish dates. This is not an error with the workflow, instead, it seems that Goodreads doesn’t provide the dates for some of the books. The date fields are just missing, I’m not sure why. I’ve tried re-adding the dates on some of my books but they still don’t show up, although the modify dates changed, so I know something has been recorded. I will keep looking into this and will report back if I find anything.


So I forgot where I’d read it, but I saw that some people were creating a “read/reading” page1; listing all the books they’ve read/reading this year.

I’ve also created my own page, but – being the nerd that I am – I decided to create a Shortcuts workflow to help me create and maintain this list.

I use Goodreads to keep track of my books and I thought I would use Goodreads’ API to help gather the books I’ve read/currently reading, and create a markdown list with all the pertinent information (ie. title, author, date started, date finished, rating, and whether this is a re-reading of a book).

I can then prepend that list to my previously mentioned page.

I know my workflow is not very polished – my method of processing XML files probably needs work – but for now it does the job.

Installing the workflow

You can download the Shortcuts workflow here.

When you first import the script, it’ll ask you for your Goodreads ID and your API key.

You can find your Goodreads ID by going to your bookshelf after you’ve logged into Goodreads and looking at the URL; it should be the string of numbers and letters between “list/” and “?”.
eg. https://www.goodreads.com/review/list/USERNAME?shelf=read

The workflow would ask that you save your Goodreads ID in a dictionary that the workflow would then refer to.

To get a Goodreads API key, you’d need to register here. It’s free and doesn’t require more than your name and your application name (I just used “Shortcuts”).

I save my API key in a text file in my Shortcuts folder and reference it in the script.

How to use the workflow

Now for how to use the workflow.

When you run it, it’ll ask for which bookshelf you want to list. I’ve put in two options, read and currently-reading. You can add any other bookshelf you currently use.2

Then the script will ask for the number of books you want to list.

When I ran the script the first time, I entered in 200 – I knew I’ve only read about 30 books this year, but I wanted to create pages for previous years as well.

For on going maintenance of my books list, I’d probably run the script once a month and then only need to request info on 1 to 2 books.

The script would then produce a markdown list with the requested books (sorted by read date) and copy them to the clipboard. I would then paste them into my reading page.

Final words

As I’ve mentioned, my workflow is not the most polished, but I hope it helped some people. If you customised it in any quirky way or figured out a more elegant way to deal with XML files, please comment and let me know. I would love to see how people use this.


  1. So if you have a “read/reading page”, please let me know so I can retroactively add links to your page. 
  2. Remember that the shelf name uses “-” in place of spaces and is all lower case, ie. Currently Reading is rendered as currently-reading 
I’ve always been slightly annoyed that iOS Reminder has no way to purge completed items.
Well, not unless you are willing to sit there swiping to delete each item one by one. Like an animal. 😜

After seeing my “Completed Items” reach a couple of hundreds, I decided to turn to Google to see if anyone else has come up with a solution.

The results were quite disheartening. It seems that some people are just deleting the whole list and starting from scratch.

However, I did find a Six Colors article that provided instructions on how you could bulk delete completed items from iCloud’s version of Reminders. It also made mention of an AppleScript written by Dr. Drang that, when run, would delete completed items older than 30 days.

These were all well and good, but I wanted something to run automatically every month. Or at the very least sent me a reminder to run the script.
I was thinking about setting a Due Item, or maybe even setting up a cronjob… but then I remembered the Shortcuts app.

Maybe I could create a Shortcut workflow that could find and delete completed reminder items older than 30 days?

Well, apparently I can.

Click to enlarge

It’s a very simple shortcut workflow actually:

I specify all the lists that I would like to have purged – there may be some lists that you don’t want to have all the item deleted without first reviewing them. When you install the script, Shortcuts would ask you to input your own list names.

Here I specify that items completed over 30 days ago are eligible for deletion. Change this if according to your own preferences.

Then for each of the lists specified above, the filter would find items completed older than 30 days…

and remove them.

When you run the script, Shortcut would ask you three times if you are sure you want to remove the reminders, telling you that this is a permanent action. Just click “Remove” each time and presto, the items are gone.

Now, earlier on I mentioned that I want to automate this. There’s no way for Shortcut scripts to be run automatically on a schedule, but you can create a Launch Centre Pro item set to run monthly and have it run this Shortcut script. So every month a notification would pop up, you click on it, and the Shortcut script would go about removing all the old Reminder items.

If you have your own way of removing old Reminder items leave me a comment or send me an email, I’d love to know how others solve this problem.

So the link to the Shortcut script again: Deleting Old Completed Reminders Items

Bookmarked
Omg, this Shortcuts workflow is insane! Of course I immediately ran it, and the report was awesome!
There’s so much I could learn from dismantling this workflow.
I was going to write up this how-to in a Google doc to share with a Facebook group I was a part of, but I figured I might as well share it.

Prep-work

  1. Create an account on Google Drive – if you have Gmail, you just need to activate Google Drive
  2. Create a folder called “shared”
  3. Create an account on IFTTT
  4. Download Workflow (app) onto your iPhone

Google Spreadsheet

  1. Open up the mail tracker spreadsheet

Do not just use this sheet (otherwise, you’d be logging your mail directly into the template everyone else would be using).

2. Make a duplicate by selecting File –\> Make a copy
3. Rename it to “Mail Tracker” (instead of “Copy of Mail Tracker”)
4. In the “Folder” field, select the “Shared” folder you’ve previously created.
5. (you can put it somewhere else, but then you’d need to remember the folder path and change it in the Workflow script)

Workflow

  1. Open this link on your iPhone
  2. Click on the “Get Workflow” button, this would open the Workflow app and save the workflow/script to the app.

  1. To activate the workflow, you just double-click the “Logging Mail” icon twice in the app. But do this after you’ve set up the IFTTT script (next section). There’s another, quicker, way to do this and I’ll show you how later.

IFTTT

  1. Click on this link to save the IFTTT rule into your account.
  2. Assuming you’re logged into your account, you should be able to add and turn on the IFTTT script

Creating a Button

To activate the Workflow script, you currently need to open the Workflow app and double-click the “Logging Mail” icon.

To make this quicker, can create an icon on your home screen that immediately activates the Workflow script.

So let’s make the icon.
1. Open Workflow app
2. Open “Logging Mail”, but clicking the icon once.
3. Click on the share sheet button:

  1. Click “Add to Home Screen” button:

  1. Follow the instructions on the screen.
Back to top