Let's say you have a couple of big attachments lost somewhere in your OmniFocus database. You're sure you don't need them any longer, but how to find them to delete them?
This discussion only applies to OmniFocus 1.1 sneakypeeks, not the original OmniFocus 1.0. The OmniFocus.ofocus file is a package containing a number of files of the following types: clients, new transactions, and ancient history. The client files have .client as their extension (for example, 20080918040533=bfkJ3BUXFgK.client) and describe a particular client in the synchronization pool (machine type, OS version, OmniFocus version, time and date of last sync, client name, time and date of first sync, etc.) These files are used to keep track of which transaction files have been seen or created by a given client so that compaction of the database can be done without losing data. Only transaction files which have been seen by all clients can be compacted. The transaction files (for example, 20080709155423=exr7j6jY8Va+osE9FUQa-Ug.zip) contain descriptions of actions and projects. Transactions which are "old news" for all clients in the pool are compacted into one big file, and new transactions are added in small files. All of these files are made visible by selecting the OmniFocus.ofocus file, control-or-right-clicking to get the contextual menu, and choosing "Show Package Contents" which will open a new window to show the list of files.
To make things simple, I'll assume that the attachments are in the "past history" section of the database, which should be easy to find. It will be the file that is larger than everything else in the usual case.
Find that file, and option-drag it to the desktop (this is a safety measure to protect against accidental modification). Next, double-click the .zip file to expand it. Open up the resulting folder.
There will also be a "contents.xml" file (not shown above). You'll open that up with an application such as BBedit or even TextEdit. But first, you'll want to find where the big attachments are (and more importantly, what they are named). All of the attachments will be in the "data" hierarchy seen above. If you use the Finder's View->Show View Options command to turn on the calculation of folder sizes in the "data" folder, you can quickly see which attachments are space hogs, if you can't tell from the names.
In the example above, "Picture 38.png" is the biggest offender, and has internal reference "cx5z9nHYpRo". So, in our editor we are using to view the "contents.xml" file, we'll search for that string. There will be two hits, but we want the one that looks like this: