Converting macos dictionaries to portable format

The best thing about macos is the dictionaries accessible from dictionary.app. Is there a way to convert them to a format that is usable on other platforms as well (such as the dict format or the stardict format)?

Alternatively, is there a way to extract them into a plain text format? (How are they stored anyway and where?)

PS There is this

https://gist.github.com/josephg/5e134adf70760ee7e49d

for extracting word lists. Perhaps it could be changed to extract the whole dictionaries as well?


Solution 1:

Dictionaries used to be in /System/Library/Dictionaries, but they were moved (c. Sierra?) to various subfolders in /System/Library/Assets/com_apple_MobileAsset_DictionaryServices_dictionaryOSX.

The format is a package, and the data files inside seem to be some non-human-readable binary data format, though they start off life as XML files.

Assuming you've searched for projects that can import Apple's dictionaries, rather than just exporting them, and found nothing; then the task may be 'non-trivial', and you may be better off using the very good open source DICT format files.