On Oct 18, 2011, at 3:40 PM, metropical wrote:
> some of my mnemonics seem to be getting forgotten.
> Is there a way to fix this?
> I've used AA to try to reset them.
> Sometimes that works, sometimes not.
> I'm on b60(3850), 10.6.7
Here’s a script I wrote when making some changes to the way mnemonics are
stored. (B60 actually stores too many.) Change the “lookfor” list on line 10 to
include the mnemonics you think are missing.
To run it, type `python scan_mnemonics.py` in Terminal. It’ll show you each
abbreviation with a count of what you’ve used it for. The count should go up
every time you use an abbreviation. If it doesn’t, something is wrong.
--
Rob McBroom
<http://www.skurfer.com/>
#!/usr/bin/env python
import os
import plistlib
plist_path = os.getenv('HOME', '') + '/Library/Application Support/Quicksilver/Mnemonics.plist'
mnemonics = plistlib.readPlist(plist_path)
lookfor = ['cons', 'ab', 'ut', 'cal', 'nnw', 'sp']
# lookfor = []
for qsab in lookfor:
try:
matched_objects = mnemonics['abbreviation'][qsab]
print qsab
for qso in matched_objects:
print ' ', qso, '(used %d times)' % mnemonics['implied'][qso][qsab]
except KeyError:
print 'no match for "%s"' % qsab
empty_count = 0
for (qso, abbs) in mnemonics['implied'].items():
if '' in abbs:
empty_count += abbs['']
print
print "empties:", empty_count