OSX:Changing the “Web Receipts” Folder
April 14, 2008 | 8 CommentsOne 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.
- In Finder, go to /Library/PDF Services/
- 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”
- Right-click and select “Show Package Contents”
- Naviage into the “Contents” folder
- Delete the “Resources” folder
- 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
- Open the “tool” file in a text editor
- If you want to change the target folder:
- around line 24 you’ll see something the line that sets the value of destDirectory to “~/Documents/Web Receipts/”, change that.
- If you want to add a date at the beginning of the filename
- at the top of the file (around like 9) insert a new line with:
from datetime import date
- around the previously mentioned line 24 add:
title = "%s - %s" % (date.today(), title)
- at the top of the file (around like 9) insert a new line with:
- 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!