Workflow reminds me of AppleScript

Workflow is an automation tool for iOS. The app is great, so great in fact that Apple bought the company.

However, when trying to do something simple like prepend asterisks to a list of text on the clipboard, I immediately ran into confusion and had to find another workflow someone else wrote to get over the hump.

AppleScript was this way – Promise of grandeur, then a lot of skinned knees.

In the end, I got the task working, but it was not at all obvious, especially since my text, a table from Numbers, isn’t exactly text.

The solution?

  • Get Clipboard
  • Repeat over every item on the clipboard
    • Split the text on new lines
    • Replace ^ with “* ” using a regular expression

  • Combine the text with a new line
  • Send to Clipboard
The real problem here is that iOS doesn’t let you introspect the type of data that is on the Clipboard, nor does workflow let you introspect what is in a variable. You kinda have to just look at the output and guess. Why did some operations result in 183 pages of text? I still don’t know.

Scanning and submitting expense receipts

As many of us do, I have to submit expense reports to the company I work for.  We have to submit receipts with each report, and the system is a bit old, so those receipts must be in small (under 2mb) TIFF format (named .tif as well).  This can be a bit of a pain not only scanning receipts (such as parking receipts) but then getting them into the proper format, especially when the Mac prefers PDF.

I have an awesome Fujitsu ScanSnap S510M which works great for bills and such, but it is not so hot on smaller receipts.  It tears them up, or they get caught in the mechanism, etc.  I could always just scan my credit card, but I do not like redacting one hundred line items just to expense five.

I tried a couple of camera solutions, but none worked until I found Scanner Pro for $6.99 on the App Store.  It is a nice little app that takes scans, converts the scans to black and white saves them into a PDF document.  Some of the plusses for my system include:

  • Easy management of multiple PDF documents (can rename documents, has a badge for number of pages)
  • Automatic uploading of the documents (once saved) to DropBox
  • Ability to add new scans to existing documents
  • Creates nice, high contrast images

This solved one of my problems – Timely scanning.  I can now scan a parking receipt while in the parking garage elevator and have the receipt in a document (such as August Parking) and uploaded to DropBox by the time I reach my car.  Score!

This did not resolve my issue with the system at work needing .tifs.  This proved to be a royal pain, because exporting as TIFF from Preview makes HUGE images.  Each receipt was around 2-3mb.  The size is not only an issue due to the constraints of our system, but also an image that large takes over a minute to upload.

I turned to my trust old friend from decades past, Graphic Converter.  At $39 on the Mac App Store, it is not cheap, but it sure is useful.  The user interface is fairly terrible, but it works!  The command I used is “Convert & Modify” from the file menu.  Once you use the terrible file browser to select your folder of PDFs from Scanner Pro, and select a destination folder, you do the following:

        • Function: Convert
        • Format: TIFF
        • Options: LZW with Prediction, Single Page File, uncheck all metadata
        • Check “WWW Ready”
        • Check “Use Batch”
        • Add two commands to the Batch Table:
          • Scale: proportional 50%
          • Resolution 72×72 ppi

 

 

 

Graphic Converter will remember these settings (The Export settings feature failed miserably on 10.8) Once everything is set up, press “Go.”  In about 5 seconds you will have one file for each page in the document named “August Parking1.tif” “August Parking2.tif” etc.  These files for a typical gas station sized receipt will average 100k in filesize.

Upload tiny documents, archive, and repeat next month.

Update: Sam Grover says that he uses automator to do the part I am using Graphic Converter for!