Two Map Photos Workflows on iOS

A few weeks ago I thought I’d be clever (too clever it turns out) and try to integrate Dr. Drang’s map-photos.py Pythonista Script with Workflow so I could map photo locations directly from Photos.app. I was hoping to use Workflow to create an action extension that could grab a photo, put it to the clipboard and then run map-photos.py to display the location of the photo on a map without having to launch the script through Launch Center Pro or, slower still, opening up Pythonista, navigating to the script, and then tapping run. Unfortunately that project turned out to be a miserable failure because clipboard.get_image() in Pythonista doesn’t allow you to get the metadata of the image on the clipboard. Out of sheer laziness I left the useless workflow on my phone, taunting me every time I opened the app.

With the advent of general stability in Workflow 1.11, I decided to spend some time thinking about how I could better use the app. Tonight, for some reason, inspiration struck when I saw the Map Photos workflow looking me in the eyes. So I decided to take on the challenge.

The initial workflow idea was to create an action extension that could select multiple photos and display them all as separate pins on the map. While I think this is possible, I didn’t want to get derailed with that. I just wanted a reliable way to serially display multiple images on a map on iOS. The easiest way I could figure out how to do this was by using an X-Callback-URL. The problem is that there isn’t a reliable way to return to the source app when using an X-Callback-URL from an action extension on iOS. Also, Apple Maps doesn’t support the callback function of the X-Callback spec, obviously.

So I looked online and it turns out that Google Maps on iOS does support the X-Callback-URL spec, making the choice a no-brainer. So I built two different workflows:

  • one that would be able to run as an action extension to map photos directly from Photos.app as well as other apps, and
  • one that could take a series of images, display them in Google Maps, then return to Workflow to load up the location of the next image and send that one to Google Maps.

The what I like better about the Dr.’s method is that it actually grabs the Latitude and Longitude from the image file, whereas my workflows grab the address. I typically prefer Lat/Long because, especially in rural or newly developed areas, using the address can be highly inaccurate. This is another reason why I’m using Google Maps on iOS for this project. Three years into Apple Maps I still trust Google’s data more.


  1. probably because now I know that the steps of my workflows won’t just randomly be erased when running the workflow 
Advertisement

Using Drafts and Pythonista for Quick Bible Verses (ESV)

This workflow has been turned into the BibleDraft project. Visit that page for more info.

I have long had the desire to have quick access to the text of bible verses. Maybe I want to email it, text it, put it in Day One, or just have it for my immediate consumption. I've always felt that the Bible apps were too slow or had too many taps for that time when you just need to get the verse and move things forward.

So while on vacation this summer I took two of my favorite apps, Drafts and Pythonista and built a very simple Bible action. Drafts is perfect for this because when you open it up, it's ready to accept text. And I'd already modified a Python script for Editorial to take sermon notes with inline Bible verses. So I took those two tools and created a simple Drafts action to:

  1. Take the draft, needs to be a Bible verse (call me Captain Obvious)
  2. Send the reference to Pythonista
  3. run a Python script entitled “quick ESV verse” and have Pythonista pull the reference text from the ESV Bible's API
  4. Return the reference as bold markdown with the verses on the lines below it.

And that's all the action was designed to do. For the 3 people in the world who:

  • use Drafts
  • use Pythonista
  • use the ESV translation
  • are dissatisfied with the speed of looking up verses in their current Bible app

I hope you find this helpful. Grab the “Quick ESV” action for Drafts and create a script in Pythonista entitled “quick ESV verse.py” with the code below or if you have the “New from Gist” workflow installed in Pythonista you can get the link here.

Update 1: I realize that the way I tweaked the Drafts Action now requires Drafts 4. Some of you may still be running Drafts 3. If that’s the case let me know and I’ll update the script so it works on both versions

A URL Scheme for Logos Bible Software for iOS

As a quick follow-up to my previous post, it turns out that Logos for iPhone/iPad does have a URL scheme. No, not the type I was looking for with X-Callback support, but still, a URL scheme nonetheless. I thought I’d quick publish how I’m using it in case any other geeks are looking for a way to open Logos directly to a bible or book.

We have chosen Psalms as a passage of scripture for our two girls. As a part of my nightly routine with my daughters, I will read the Psalm with them. I could be a normal dad and pull out a physical bible[1] or I could pull out my phone, which I invariably have with me everywhere I go. That means that if we’re somewhere and we just need to read something to keep her engaged, I have easy access to it.

I had been using the built in “favorites” feature to Logos for iOS but that was way too many steps. I was trying to think of ways to get to get to the Psalm. Should I put the text into a markdown file and launch that file from Launch Center Pro? Should I use LCP to launch directly to a website like Biblia.com that will have the passage? Neither of these options were great in my mind. Then after a few weeks, I remembered that Logos had URL links long before I got into this whole iOS automation thing.

I went to the Logos forums and realized that someone had already done a great job with LCP & Logos. So here’s what I did.

  1. Went to the passage I wanted in Logos for Mac and selected Copy Location as URL.
  2. Send Logos URL to my iPhone via Command-C
  3. Open Launch Center Pro
  4. Create a new action using the url on the clipboard as the URL.
  5. Name the action.
  6. Boom! Open directly to the passage (or section if it’s a book)

Getting a URL from Logos Bible Software for Mac

 


  1. I should note that my daughter and I do read out of The Big Picture Story Bible by David Helm almost every night.  ↩