Skip to content

Instantly share code, notes, and snippets.

@benoit-pierre
Last active October 10, 2021 01:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benoit-pierre/0ae7f388aa367ecbd0c8aa5e1de2b9f0 to your computer and use it in GitHub Desktop.
Save benoit-pierre/0ae7f388aa367ecbd0c8aa5e1de2b9f0 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import sys
from plover.dictionary.base import create_dictionary, load_dictionary
input = sys.argv[1]
output = sys.argv[2]
id = load_dictionary(input)
od = create_dictionary(output)
od.update(id)
od.save()
@nathyong
Copy link

I needed to add the following:

from plover.registry import registry

registry.update()
system.setup("English Stenotype")

Otherwise it could crash with the following error:

AttributeError: module 'plover.system' has no attribute 'IMPLICIT_HYPHENS' 

@user202729
Copy link

Also, in a sufficiently new Plover version, you can right click at a dictionary and choose "Save dictionaries as..." to convert between supported types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment