Editor for Dictionary Files (.sdef)

I would appreciate hearing from those of you who create Dictionaries the software you use to create the xml file. I am new to creating Dictionaries. I expect that an xml editor would be preferable to a simple text editor, such as TextEdit.


The one I’m using is a bit old but still working (at least on Hight Sierra…).
I’m using it right now!

Sdef Editor


Jonas: thank you for replying. I came across Sdef Editor - in fact, it is the only program specifically for editing sdef file I encountered. Unfortunately, it does not run on macOS 11 as it is 32 bit.

Sdef Editor is open source, with the last contribution made a 3 years ago. Some enterprising person could try building it with a modern version of Xcode :wink:.

I actually wrote one as part of ASObjC Explorer. In the end, though, I found it easier to use BBEdit. I just start with an existing file open and copy-and-paste bits as I need them, then edit them to suit. It’s useful to have the man page for sdef(5) open, too.

It’s easy for you because you know exactly what you’re doing.
But for [beginners] scripters who are not developers, the XML structure of a SDEF file is way over too complex.

I’m sure there’s a place for a paid application in the Applescript community.
We just need a good tuto to understand the benefits of using libraries and how much adding to them dictionary file is a must and very easy to do (if you have the good tool!).

1 Like

I’d probably argue that unless you plan to distribute them to others, there’s not a lot of point.

It’s one of those things that I don’t really remember. But if you start from an existing dictionary, cut-and-paste does make it relatively painless. You want a command, you look for a command, hopefully with a similar number of parameters, and you cut and edit.

I suspect it needs more than that, if @tempelmann’s issue shown in the depository still holds.

I wrote my first Dictionary yesterday (after my original post.) I used what is, basically, the method Shane described. The xml structure of a Dictionary doesn’t seem complex. I anticipate that cutting/pasting from a template or prior Dictionary will work pretty well. At this point, for me, it doesn’t seem like an xml editor will be necessary, as I thought when I first posed the question. Thanks to all the responders.

One entry I suggest for all dictionaries:

    <class name="reference" code="obj " hidden="yes">
        <synonym name="specifier"/>

It helps avoid an issue that can occur where compiling scripts using libraries results in reference changing to specifier.

1 Like

Did anyone try XML Notepad?