At last my extended attribute (xattr) editor xattred is more fully capable, in that it can edit the contents of xattrs of any type, as well as copying and pasting existing xattrs between files.
The content editor drops down as a sheet over the window, and lets you create new xattrs from scratch as well as changing existing ones. It supports three different formats in which you can specify and edit contents:
- Plain Unicode UTF-8 text. This is used in a wide range of popular xattrs, and ideal if you want to append notes or copyright information as a private xattr. You could also obfuscate text content into private xattrs, as I believe that each xattr can hold as much as 150 MB of data.
- Binary property list. This is also widely used, but has a limitation at present that all content will be saved as a single NSString, and not the range of different types found. I am working on fixing this.
- Hexadecimal text, such as
d6a77d92 6889fccf 1e5e0dc2 f9ccad16 bbd2eb70. This is converted into real hex for storage, and can thus be used to store property lists, binary resource data such as images, and anything else.
I think that this is the first GUI app to support this full range of features to work with xattrs, and the only app in which you can edit the contents of any xattr. It is possible at the command line, but by no means easy.
In addition, this version fixes a particularly nasty crashing bug which would occur when trying to paste from a pasteboard which didn’t contain any existing xattr data. Other changes include:
- Added type information to the xattr class.
- Restructured the xattr class to generate all string output, such as that for the lower text view.
- Enabled/disabled/retitled action buttons according to context.
I have been looking at getting cut/copy/paste working with normal menus, but haven’t found a solution yet. I am also looking at the best solution for implementing Undo.
This new version is available here: xattred07a1
and in Downloads above.
One final word of warning: xattred is under development, and undoubtedly has bugs. It also allows you to do things to xattrs which could lead to their damage or corruption. Always work with copies of files, and check that the xattrs conform to requirements. Defective xattrs can cause Spotlight’s indexer to crash, and may cause some apps to crash.