iOS Shortcuts: Clipboard Shortcut for Bibliographic Data

Ios Shortcuts Book Scanner.png

I recently shared an iOS Shortcut for scanning citations directly from the barcode of a book. Handy as it is, I have another shortcut I’m getting a lot of mileage from when I write on my Mac. Both Zotero, and Bookends 1 can add references to your library directly by scanning different metadata, including any book’s ISBN. You can obviously search for the numbers, or type them out by hand, but this little trick can add items to your library by using an iOS device as a scanner.

Zotero Quick Add.png
Zotero can add items to your library automatically using metadata, such as the ISBN

The shortcut works by scanning the ISBN from a barcode of any book and copying it to the clipboard.  If the Universal Clipboard is working properly, the ISBN will become immediately available on the nearest Mac to paste into Zotero, or Bookends. I have also set it to copy the number to my clipboard manager in case the universal clipboard fails, as it does far too often 2.

This version of shortcut is configured to use my favourite clipboard manager, Copied. You could also use the equally impressive Paste, which is included with Setapp. Or any other app  with a URL scheme that uses iCloud sync, like Gladys or Yoink. You could even use Apples own Notes App in a pinch.

Download the shortcut and adapt it to your needs here: IBSN Scan To Copied

 

  1. These are the two I recommend, but other reference managers will do this too 
  2. I have lost hours troubleshooting the universal clipboard when it stops working, it’s not worth it.

Automate Referencing on iPad with Shortcuts and Zotero

Zotero Shortcuts Referencing On Ipad.png

For as long as the iPad has been an excellent device for focused writing, it has never been good for citations and referencing. Referencing on iPad remains the final, stubborn piece of the puzzle to fully untether iOS from the Mac for academic writing. It appears, without exception, the iOS is not yet viewed by developers of referencing software as a fully fledged computing platform. That leaves us with a choice between poorly designed companion apps, or hacking together a solution of our own. I have opted for the latter, by configuring different workflows using Apple’s Shortcuts app and the excellent Zotero API.

What follows is not a primer on referencing, rather it is a means for managing citations on iPad, or even iPhone in a pinch. It assumes some knowledge of Zotero, but that is not difficult to acquire. These tips will be useful regardless of whether you work with both macOS and iOS, or do everything on an iPad. With a little help from iOS Shortcuts, referencing on iPad is that little bit less painful.

Shortcuts Referencing On Ipad

Getting Material into Zotero on iOS

 

Maybe one day we'll get extensible browsers on iOS. Until then, we still have JavaScript bookmarklets. Most of your research is done online anyway, so using the Zotero Bookmarklet in a web browser works just fine. The only real caveat is you want to get your references from a source that Zotero will recognise. That will usually mean a university library, and my EZProxy shortcut can help with that.

Another convenient option is to use the WorldCat Catalog. The WorldCat option has the added virtue of not needing a login, which makes it a hassle free way to get full bibliographic records. I have setup a shortcut that can be invoked from the widget to send a search query to WorldCat, and open the results in Safari. 1 Once you have the bibliographic record up, as long as you are logged in to Zotero, the Bookmarklet will scrape everything you need to populate your library with that record. Download the shortcut here:

WorldCat Web Search Shortcut

Cite as You Write on iOS

There are different ways to come at this. The method you choose will depend on a few variables. The biggest distinction is likely to be whether you work iOS only, or you also operate a Mac. However, there is also a question of how complex your work is, and whether or not you want to automate the process entirely, or you’re happy to manage a few aspects manually. If you are looking for the more comprehensive option, see the section below on rendering a bibliography.

Zotero Shortcuts Referencing On Ipad

 

If you write exclusively on iOS, and all you want to do is insert references from your Zotero library as you write, the following shortcut will do that. Invoke it from the widget to search your collection, and it will place a formatted in-text citation on the clipboard, eg. (Dickens, 1837, p. 21) 2  

Zotero Cite as You Write Shortcut

See below for how to automate the creation of your reference list.

Cite as You Write on iOS for macOS Users

Referecing on iPad

If you are also using a Mac, you only need to know how you intend to process your finished works so you know which cite key style to use. If you intend to use Zotero’s own RTF scanner, your citations must be enclosed by {curly braces}. If you’re a Pandoc user, no doubt you already know you need [square brackets], among other things. 3 You can download a workflow for either here.

Zotero RTF Shortcut

Zotero Pandoc Shortcut

Automate Rendering a Reference List or Bibliography

Depending on the complexity of your needs, this is where it can get tricky. If you're writing anything genuinely long form — a dissertation, thesis, or a book — then this is the last remaining task where it is useful to have access to a Mac, or PC if necessary. That doesn’t mean you need to own one. Workarounds exist to make this possible from an iPad.

The Simple Method

For the most simple version of this, Zotero can produce a bibliography online, but it’s not pretty. Fortunately, Shortcuts can retrieve a formatted reference list from the Zotero API. If you want to use the Cite as You Write shortcut from above, you can retrieve the reference list, or bibliography from the relevant collection with the following shortcut.

Zotero Bibliography Shortcut

Note, these workflows don’t know what references are in your document, there is no way to automate that via Shortcuts. They are by no means perfect, so proof your work carefully.

Run the Zotero RTF Scanner from an iPad (almost)

Should you wish to automate the process completely, you will need access to a desktop to scan your work through the Zotero RTF scanner. The good news about keeping your references in Zotero, being a web service you can make use of on demand computing. You don’t need to maintain your Zotero library in a local database, it remains in the cloud. That means you only need temporary access to a desktop for the sole purpose of running your work through Zotero. 4

Amazon Workstations

If you cannot access a desktop directly, there is always Amazon Workstations. It’s free to set one up, and you’ll only need it briefly. Be careful to choose an option available on the free tier though, or you could be in for an unpleasant surprise when a bill arrives. The iPad app for Amazon Workstations is useable enough for this. You can manage your referencing on iPad with Zotero, then setup a workstation to run the finished project through the scanner.

Portable Apps Zotero

Often on campus it is easy enough to access a desktop, but installing software can be a problem.  For that situation, the unofficial Portable Apps version of Zotero should do the trick.  Install it on a portable drive and run it on demand. To be honest, I like this option more than using AWS.

Beyond Referencing on iPad

Zotero’s Web API with the Shortcuts app is presently ās good as it gets for referencing on iPad. I’m not exaggerating when I say I have tried everything else, nothing comes close where iOS is concerned. From its communal, open source development, to its stance on privacy, Zotero is an antidote to the proprietary systems of giant academic publishers. 5 I cannot speak highly enough of the Zotero service. If you can spring for it, I recommend upgrading the storage option for both the utility, and to support their work. US$20 will buy you 2GB for a year, which is plenty for PDF documents.

For Mac users, Zotero is not the only solution I can recommend. I have started testing the native macOS referencing solution, Bookends, recently. I can tell you, it is impressive. I will post a proper review at some point, but there is a free trial available. Both these solutions, Zotero and Bookends, offer and excellent alternative to EndNote, Mendely, and the other big commercial referencing solutions. But at this point, for academic writing on iOS, Zotero is the best option we have currently. Whether you use these workflows, or shortcuts as they are or adapt them to your needs, I hope you find them useful. If you need any help configuring them, don't be afraid to contact me via one of the methods to your left.

Happy writing.

 

 

  1. If you use an alternate browser, you can change the final action to open the results there.
  2. If you are using footnotes, I have a post in the works to cover that
  3. I have a follow up post that will cover using Pandoc on iOS. It includes a shortcut for extracting citekeys for the Better BibTeX Plugin
  4. Unfortunately, the RTF scanner is a plugin, so it isn’t available online or through the API.  
  5. EndNote once sued Zotero for having the audacity to offer users a means for transferring their data. Mendely is run by similar ghouls. 

Show and Tell — 13 September, 2018

An almost regular collection of useful links for students, academics and other nerds.

Show And Tell Appademic Web Links

 

Markdown, Pandoc and Make

This is pretty neat. A navigable demonstration of nerdy research tools. It’s essential a fancy archive of bookmarks put together as a presentation.

Markdown Here

Some forgotten moment of madness led me back to Apple Mail, but as always happens, I’m starting to tire of it. This extension isn’t about to solve my troubles, but if you deal with your email from the browser, or with Thunderbird it might help yours.

Python Environment in Web Browser| PyPy.js

One of my aims for this year is to learn to code with Python. To be fair, I’ve barely even started yet. I can think of a few use cases for this. Sure on iOS you have Pythonista, but sometimes all you have is a web browser.

Think Julia | How to Think Like a Computer Scientist

Even if your aims are modest. Perhaps you want to do a little Workflow automation, or learn some scripting. The first challenge is always conceptual. This is the kind of resource that can help get you started.

Markx

This project hasn’t been updated in a very long time, so I’m surprised to say it still works as advertised. If you’re unsure about markdown and want to play around, this is ideal. I have forked the project to see if I can’t do something with it. No promises though, time is not exactly abundant.

ZoteroBib | Zotero

There are any number of ways to get formatted references quickly online, but as a service, Zotero stands out for me. It is a wonderfully open project that enables all kinds of tinkering. Zoterobib is not new, but there may be readers who will find it useful for creating a bibliography on the fly. Just don't go clearing your browser cache while you're building one.

Photo by Christophe Hautier on Unsplash

Learning Workflow iOS: Automate Citation Formatting

Automate Citations Ios Workflow.png

Call it a lack of imagination, but the first time I got hold of the Workflow app I was a little disappointed. The gallery made it look like a lot of fun, but most of the automations seemed a bit gimmicky. I didn’t have much need for a local area, pizza speed dial. There were automations I latched on to, but the app's power lay dormant on my devices. Fast Forward, and among the things I have figured out with Workflow is how to automate citation formatting.

I was something of a late comer to iOS. I wasn’t trying to do much serious work on the iPad when I started playing with Workflow. That meant I still had a lot of walls to hit where limitations of the platform were concerned. It soon became apparent that not only could Workflow do incredible things, it could do many things I needed, that I couldn’t otherwise do on and iPad, or an iPhone. Workflow is both a means for overcoming shortcomings of iOS, 1 and for automating tasks that are repetitive, time consuming or difficult. For a novice, I would suggest the visual programming design of workflow makes it much easier to automate tasks than it does on the Mac.

Getting to Know Workflow

There is a surfeit of ‘getting started with Workflow’ type posts about the internet. For the most I have found they fall into two categories. You have the listicles of workflows that can either be found in the Workflow Gallery itself, or are similar in kind. Basic, but fun. Don’t get me wrong, some of the uses cases you find on those lists are pretty neat. My feeling is they don’t do a lot to help somebody trying to get the most out of the app.

Then you have serious Workflow aficionados. The best known known is no doubt Federico Viticci of Macstories, but there are others. I posted appreciation for Jordan Merrick’s Workflow Directory recently. Another blog I like for iOS automation is One Tap Less. Although, It hasn’t been updated much lately. If you want to get a head start with Workflow, I would suggest listening to series the Viticci and Frasier Speirs put together for their podcast, Canvas. A podcast might seem like a strange medium for learning something like this, but following along will help with the general concepts.

Vital Concepts

If you have never done any kind of programming. Despite the relative ease of the Workflow approach, there might be a couple of things that catch you out. Variables are a good example. Somewhere in the deep recess of my mind I have the fragments of what I learned as a school child in the eighties. At least knew what a variable was when I came across it in Workflow. I know that for a lot of people , it is exactly that concept that stopped them grokking the building blocks that make up Workflow automation. Workflow has gotten more clever about the need for variables, and the way that you can use them. But knowing what they are, and how important they are to the flow of information in a program is still a crucial piece of the puzzle. Thankfully, it’s not a difficult concept to pick up.

Getting deeper into Workflow, the developers have done a great job of abstracting concepts like flow. There is another powerful automation app on iOS called Alloy hasn’t enjoyed anything like the success of Workflow. That app has taken the opposite approach, negating the visual programming language by littering the app with esoteric terms. Understanding the flow of input and output is ultimately what makes the workflow applets you build operate as you intend. Which is to say, the further you go, the more likely you will need to understand more of the mechanics beneath the interface. Thankfully, the official Workflow documentation is very good. Then there is a thriving Reddit community of helpful, Workflow nerds.

A Range of Use Cases

To dial it back a little, you don’t necessarily need the most powerful features of Workflow for it to be useful. I have a range of workflow applets, recipes, scripts, or workflows.2 Call them what you will, they range from the most basic, to complicated enough that I’m not confident I could recreate them should I ever need to. 3 Then I have workflows built by other people that hurt my brain. Trying to reverse engineer them has been one of the best ways to learn how to use the app. That is the reason I subscribe to Club Macstories, for the workflows.

As an example of a most simple use case. On the Mac I use a couple of different utilities to turn websites into either single purpose browsers, or something close to a native macOS app. For somebody with their dopamine wires crossed like I have, it can be a real nuisance working with web apps when you tend to have a million tabs open. On iOS, when I need a single purpose browser I create it with Workflow. I then place the shortcut on my home screen. Problem solved.

Ios Workflow Automation

Easier with Web APIs

One area I feel the app provides an advantage over automation tools on the Mac, is how it guides you through using web APIs. 4 Even using a powerful tool like Keyboard Maestro on macOS, you will still need to build and encode URLs to interact with an API. In Workflow, you build the contents of the URL with a form. In turn the App will encode the URL for you. The consequence of this approach is you start to get a picture of what the structure of an API request looks like. I had never worked with JSON before I started experimenting with citation workflows, and yet I didn’t have much trouble putting a request together. If the API has good enough documentation, it isn’t too hard to work out which fields go where. There might be a little trial and error, but that is half the fun.

The upshot of all this fun with APIs is I have workflows to share. I’m going to post the first one here. If you want to keep up with how the effort to add to this, sign up for the mailing list over on the side bar there. 5 The first newsletter will go out in a couple of weeks, I intend for it to include this and some other study and research type tech-fu.

A Remaining Frustration

For academic writing on the iPad, managing citations can still be a pain. Decent citation management is the last remaining frustration for iOS users and academic writing. If I were to code an app for academic users on the iPad, that would be it. You can manage various parts of a bibliographic workflow on the iPad. I use Papers 3 for that job. But on the whole, it remains messy and awkward. 6 This is where Workflow comes in. It can equip you with the tools to build a citation workflow that can solve at least some of the problems for this kind of work on the iPad. If you’re inventive enough, you could put the entire workflow together using Workflow and a text editor. Adding Ulysses , or Editorial into the mix, and you have the tools for an iPad first writing system.

The whole way through my undergraduate studies I never committed a single citation style to memory. With citation managers available, why bother? At worst I could use an online generator. I claim it wasn’t really laziness though. It is an admission of fallibility. As a tutor, and as lecturer I had to take on marking work. Eventually I learned enough about which citation styles were set for the class, so that I could satisfy the requisite pedantry of one who wields a red pen. I just as easily forget the conventions the moment school is out. In the end I would rather automate this particular task and save that precious mind space for something more worthy. Like learning how to use Workflow, for example.

Automate Citation Formatting on iOS

Workflow Automate Citation Formatting on iOS

Workflow’s powerful API interactions opens up all kinds of possibilities. It just so happens there are a lot of bibliographic web tools with public APIs. The idea is to start out simple here.7 To provide both the utility for automatically formatting citations, and an example of a workflow for anyone starting out with the app. Something I hear ad nauseam — because it is true — is learning any kind of automation, scripting, or even coding, will be much easier if you have an end goal in mind. If you start out with a blank canvas, not knowing what you want to automate, you will have trouble learning automation. If you have a use case in mind, or an example to work with, it is going to work out better.

This workflow uses the Easybib Developer API to format a citation in the style that you need. You will need an API key to make it work. They are free to obtain for personal use. It will be easiest to signup for an API key before you download the workflow, as it will ask you for that key when you install it. I have set it up to chose between the MLA, APA, and the Chicago B reference styles. If you need a different style, the API supports more than 6000 of them, so no problem. Just add the style to the list in the workflow itself, it should be obvious.

A couple of quick points for using the workflow. This example is only setup for citing books with a single author. If you have the inclination, Easybib has quite comprehensive documentation so you can builds upon the workflow to suit your own needs, or replicated it for different sources. When entering an author name, use a comma between the first and last names. To suit my own writing preferences, I have also set it up to format the citation using Markdown. If you would rather it used rich text, simply remove the second to last action called ‘make markdown from rich text’. The workflow will then copy a full formatted reference to your clipboard.

If you have no inclination to commit a reference style to memory, this workflow is for you. You can download it here

Any questions, drop me a line. If you want to keep up with my efforts to use workflow for citation management on iOS, signup for the mailing list. 8 The first edition will be out soon, time willing it will include updates to this workflow to cite different sources, multiple authors, and so on

  1. Which are becoming less and less obvious
  2. You probably know the long running joke about this? The app is called Workflow, and its automation sequences are workflows. i.e. Workflow workflows. The term is ostensibly inherited from Automator
  3. Thankfully, Workflow has a sync feature that makes it difficult
  4. Application Programming Interface
  5. I don’t have the capacity or the inclination to spam you. Next year I will get the newsletter happening properly
  6. The lack of iPad multitasking is making it harder to recommend that app to new users. Even on the Mac, the acquisition by Read Cube is making me nervous. The most useful support articles from the Papers site seem to have disappeared?
  7. Not that I have chops to make the most complex workflows. But I’m getting there, slowly.
  8. Eventually this site will have a membership component. It will never be costly, but I intend to make the first 50 subscribers free members. Permanently