aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-06-22 00:59:03 +0530
committerArun Isaac2022-06-22 00:59:03 +0530
commit601f25011b8ddebe2e917a44aa135caa7d1ccc28 (patch)
tree6fc00ee48f2b56502126f355d7bae3caea513a84
parent23b89a6a436a038158f36b8532cbe21b25daede2 (diff)
downloadthogai-601f25011b8ddebe2e917a44aa135caa7d1ccc28.tar.gz
thogai-601f25011b8ddebe2e917a44aa135caa7d1ccc28.tar.lz
thogai-601f25011b8ddebe2e917a44aa135caa7d1ccc28.zip
Use Plover source instead of the built Plover package.
* english-orthography.py: Accept the path to the Plover source as argument and import english_stenotype from that path.
-rw-r--r--english-orthography.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/english-orthography.py b/english-orthography.py
index 914cf39..b7572c3 100644
--- a/english-orthography.py
+++ b/english-orthography.py
@@ -18,7 +18,15 @@
# You should have received a copy of the GNU General Public License
# along with thogai. If not, see <http://www.gnu.org/licenses/>.
-from plover.system.english_stenotype import ORTHOGRAPHY_RULES
+import sys
+
+if len(sys.argv) != 2:
+ print(f'Usage: {sys.argv[0]} PATH_TO_PLOVER_SOURCE')
+ sys.exit(1)
+
+sys.path.append(sys.argv[1] + '/plover/system')
+
+from english_stenotype import ORTHOGRAPHY_RULES
def make_elisp_safe(pattern):
# Remove negative lookbehind assertion not supported by elisp