OS X's "Word of the Day" screensaver is a great way to passively learn words:
But I've always thought that its word list kind of stunk—it was full of obscure words that I could never really see myself using. I'd prefer something like Norman Schur's 1000 Most Important Words. What if you could plug your own word list into the screensaver?
On a rather obscure comment thread, someone explained where you might find the word list that Apple uses to power the screensaver. It is at /System/Library/Graphics/Quartz\ Composer\ Plug-Ins/WOTD.plugin/Contents/Resources/NOAD_wotd_list.txt. The file looks like this:
m_en_us1282510 quinsy
m_en_us1273791 orbicular
m_en_us1220945 alimony
m_en_us1250517 genome
m_en_us1275124 palimpsest
m_en_us1246836 fibrillate
m_en_us1304617 volant
m_en_us1248876 fraudulent
m_en_us1264803 lunette
m_en_us1244369 entrepot
It is a list of tab-separated entries. On the right you have the word, and on the left, what looks like an ID. But what's it an ID for, and how would you be able to find it for another word not already on the list?
As you might expect, the ID refers to an entry in Apple's default dictionary, the "New Oxford American Dictionary". (That's what "NOAD" stands for in the word-list path above.)
I've played around with Apple's built-in dictionary files before—for my post, "You're probably using the wrong dictionary". You can find them at /Library/Dictionaries. Unfortunately, when you dig around in the dictionary packages, you find promising files—like /Library/Dictionaries/New\ Oxford\ American\ Dictionary.dictionary/Contents/EntryID.data—but these turn out to be in a custom binary format. How to parse them?
A fellow named Joseph Gentle, in a series of blog posts, shows how to get at the underlying data. In his "Apple dictionaries, part 2" post, he points to code that unpacks the binary file into XML. Using the dedict.c and strip.c files found here, and following Gentle's example, I used the following bash commands to get at the NOAD's XML (these commands are run from the directory where you downloaded the dedict.c and strip.c files):
clang dedict.c -Wall -lz -o dedict
clang strip.c -Wall -lz -o strip
./dedict "New Oxford American Dictionary" | ./strip > dict.xmlWhen I head-ed the first few lines of the dict.xml file, I saw something promising, with entries that looked like this:
<d:entry xmlns:d="http://www.apple.com/DTDs/DictionaryService-1.0.rng" id="m_en_us1219333" d:title="abode" class="entry">Notice that id param... it's an identifier that looks exactly like the one in the screensaver word list!
I wrote the following Ruby script to parse the XML, and then, using my own word list, create a new screensaver file that maps my own words to their IDs in the dictionary:
raw = File.open("./dict.xml").read
my_words = File.open("./word_list.txt").readlines.map(&:chomp)
word_id_map = {}
raw.scan(/<d:entry .*? id="(.*?)" d:title="(.*?)" class="entry">/).each do |entry|
word_id_map[entry[1]] = entry[0]
end
my_words.each do |word|
if id = word_id_map[word]
puts [id, word].join(' ')
end
endWhen I replaced the original screensaver file with this new one, it worked. You can now have a "Word of the Day" screensaver for any word list you'd like.

Thank you!
Warning to others: Watch out that your "favorite text editor" doesn't auto convert tabs to space. It will cause the Word of the Day plugin to immediately crash, without helpful error messages.