I wrote a short applescript to parse simple TextExpander .textpander plist Files.
set TextExpanderFilePath to "MYFILE.textpander"
tell application "Keyboard Maestro Engine"
set MyTriggerText to getvariable "MYVARIABLENAME"
end tell
tell application "System Events"
tell property list file TextExpanderFilePath
set TextexpanderSnippets to value of property list item "Snippets"
repeat with i from 1 to the count of TextexpanderSnippets
if Abbreviation of item i of TextexpanderSnippets is myTriggerText then return |plain text| of item i of TextexpanderSnippets
end repeat
return ""
end tell
end tell
It expands via RegEx Match to the found counterpart in the .textpander plist file.
I tested it with a 700 Snippets file and it is relatively fast. The Advantage to this approach is that Keyboard Maestro is not slowed down and not cluttered by 700 Macros.
The plist i used was in the Format of:
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>Snippets</key>
<array>
<dict>
<key>Abbreviation</key>
<string>00AB.</string>
<key>Mode</key>
<integer>1</integer>
<key>Plain Text</key>
<string>00AB my expanded text</string>
</dict>
At the moment ist is just the basic expansion, but can be extended if needed.
This method can also be used to store large sets of snippets outside of Keyboard Maestro in .plist files.