Skip to content

Pat Dryburgh

Yesterday, @roland sent me an audio message on Micro.blog. He then shared his process for recording, encoding, and publishing his audio.

I spent the next several hours working on my response.

I knew in doing so, I needed to make one important improvement to the process: I wanted to do everything – record, encode, and publish – on my mobile device.

Before I dove too deep, I needed to prototype my idea. I had to answer 3 questions:

  1. Can I record audio on my iOS device in a way that allows me to then encode it as an MP3?
  2. Can I encode that MP3 as a base64 string?
  3. Can I write the base64 encoded MP3 into the iOS Git client Working Copy using the base64 encoded string?

I opened up Workflow (which is being rebranded as Siri Shortcuts later this fall) and was pleased to discover the answers to questions 1 & 2 were a resounding “yes!” Workflow has a wonderful audio recording interface. Once I had the recording, I tested the base64 encoding by encoding, then decoding, then previewing the decoded audio file, proving that I was, in fact, able to record and encode an MP3 using Workflow.

Then came my first hurdle: trying to write the MP3 using Working Copy’s x-callback-url scheme.

While I could pass the base64 encoded string to the x-callback-url that would open Working Copy, and I could see a properly-named file sitting in the path I had specified, I could not get the resulting MP3 to actually play.

However, there was a progress bar that moved and a track length displayed, so I knew something was up.

To test my hypothesis that Working Copy was somehow failing to play what appeared to be a properly encoded MP3, I saved the file to Dropbox for iOS and opened the file there.

It worked perfectly.

(Until writing this post, I assumed the issue was that Working Copy had a bug in its media player. Turns out, it’s one of those apps that doesn’t play audio if the silent switch is engaged. Not sure why some media players on iOS respect that switch and others do not, but it’s a real pain in the ass to have to remember that when testing media on an iOS device.)

Once I had determined I would be able record the audio and write it to Working Copy, all that was left was to duplicate a Workflow I had created last year for posting to my Jekyll-powered blog and add the audio capturing, encoding, and writing actions to the top.

The result is the first audio post ever published on patdryburgh.com.

Of course, once I had done that, I knew I had almost everything I needed to publish a podcast from my phone.

So, I spent the next hour or so writing and validating and writing and validating a podcast.xml file that now lives at http://patdryburgh.com/feed/podcast.xml.

This morning, I received a confirmation email that my podcast has been added to the iTunes Podcast directory.

All of which is to say, I can now record and publish podcasts to my Jekyll-powered and Github Pages hosted blog and have it syndicated to Micro.blog, Twitter, and iTunes all from the comfort of my bed.

Now, to find something useful to do with all this magic.

Permalink for “Publishing a podcast from an iPhone using @Workflowhq, @WorkingCopyApp, @jekyllrb, and @github Pages” published on date_to_rfc822

This is how I recorded this one’s for Roland (@rtanglao)

  1. Created a Workflow based on a previous Workflow I had created for posting to my Jekyll site from my iPhone via Working Copy
  2. Added steps for recording and previewing the audio, encoding it to MP3 and then base64 and storing that as a variable
  3. Pass the base64 string through an x-callback URL that writes the file to my local repository
  4. Come back to Workflow to paste this text into a text field
  5. Store this text as a variable
  6. Pass that variable through to my standard x-callback URL for posting content on this site
  7. Frantically refresh my blog hoping I can spot and fix any bugs before Roland notices
  8. Quickly load the post in Working Copy and edit the incorrect scr in the audio element caused by an errant variable
  9. Come back and try it again when site.baseurl is discovered to not work on my site
  10. Realize it still isn’t playing in Safari, so pull the latest from the repository onto my Macbook Pro and rebuild the site locally to test
  11. Realize that adding a source element inside of the audio element works, but wonder why Roland didn’t seem to have to do this on his post ¯\_(ツ)_/¯
  12. Go back into Workflow to update the Workflow to match the new markup
Permalink for post published on date_to_rfc822

If you’re a Canadian citizen and plan to leave Canada for more than 183 days of the calendar year, make sure you first file an NR73 form to establish your residency status. I wasn’t aware of this law until a month ago when the Canada Revenue Agency demanded an additional $4,100 in taxes because I was out of the country for two weeks longer than permitted.

I have submitted an NR73 for the 2017 tax year and hope that I can prove I had maintained close ties to the country — all of my personal belongings, my family, and my common law partner were all here while I was away — but there’s no guarantee that they’ll change their determination.

Had I known about this law at the time, I probably would have used a tool like this one from Nomad List, which tracks the number of days you are out of your home country. (via Boris Mann)

Now all I have to worry about is what could happen when I plan to return to Uganda.

If you’re planning to live a nomadic lifestyle, please learn from my mistake.

Permalink for “A lesson about Canadian residency determination laws” published on date_to_rfc822