Skip to content

Instantly share code, notes, and snippets.

@cad0p
Created March 14, 2021 04:27
Show Gist options
  • Save cad0p/b1d6d23e6555fd47f61189bedf577f71 to your computer and use it in GitHub Desktop.
Save cad0p/b1d6d23e6555fd47f61189bedf577f71 to your computer and use it in GitHub Desktop.
How to convert mac text substitutions from plist to csv for export to apps like text expander and atext
with open('./TextSubstitutions.plist', 'rb') as _plist:
with open('./TextSubstitutions.csv', 'w') as _csv:
plistfile = plistlib.load(_plist)
csvfile = csv.DictWriter(_csv, fieldnames=['shortcut', 'phrase'])
csvfile.writeheader()
for data in plistfile:
csvfile.writerow(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment