OSX:Changing the “Web Receipts” Folder

April 14, 2008 | 8 Comments

One of my favorite features in Leopard is the “Save to Web Receipts”. Judging by the posts on the web I’m not sure whether this is a new feature or not. Either way, I really like it… except… Saving important web pages (receipts, confirmations, reservations, etc) is something I’ve been doing for a long time now without this feature, it was just a pain. In fact I did it on Windows for years before even switching to Mac, except all by hand. The function in OSX saves me the trouble of naming the file and choosing the directory which is great, except I don’t like the way it does either.

The first problem is that in general the date of the receipt is the most importat sorting factor, and having it in the “date modified” column is mildly dangerous, like if I make changes or notes on it for example. The second problem is at work when I’m saving receipts it doesn’t help me get them to the unified receipts folder at home.

I decided to solve both problems today and luck you, I’ll share. Reading the web the way this was implemented changed at some point. It used to be an Automator script but apparently that was rather limiting (which is pretty bad if you’re Apple and your own Automator doesn’t cut it). So they re-implemented in Python. This is a shame because having opened up Automator for the first time it looks really cool and relatively user friendly, unlike what you’re about to repeat below.

  1. In Finder, go to /Library/PDF Services/
  2. Duplicate the “Save PDF to Web Receipts Folder” and rename it to something else but keep the .pdfworkflow extension, in my case, “Save to DropBox Receipts.pdfworkflow”
  3. Right-click and select “Show Package Contents”
  4. Naviage into the “Contents” folder
  5. Delete the “Resources” folder
  6. Open “Info.plist” in a text editor and rename the “CFBundleName” string to something helpful, probably something that strongly resembles the filename you created in Step 2, then save and close that file
  7. Open the “tool” file in a text editor
  8. If you want to change the target folder:
    1. around line 24 you’ll see something the line that sets the value of destDirectory to “~/Documents/Web Receipts/”, change that.
  9. If you want to add a date at the beginning of the filename
    1. at the top of the file (around like 9) insert a new line with:
      from datetime import date
    2. around the previously mentioned line 24 add:
      title = "%s - %s" % (date.today(), title)
  10. Save and exit

That will end up giving you filed names like “2008-04-13 – American Express Online.pdf” saved in the directory of you’re choosing. To test just go to any app, bring up the print dialog and confirm that your new entry shows up. Also, if you have any problems, just trash the duplicate you created and edited.

EDIT (2008/08/26) – Fixed the missing close parenthesis at the end of item 9.2 pointed out by James. Thanks!