@@ -326,9 +326,10 @@ def unimacroIsEnabled(self):
326326 uuDir = self .getUnimacroUserDirectory ()
327327 if not uuDir :
328328 return False
329- # ugDir = uuDir # only _control self.getUnimacroGrammarsDirectory()
329+
330+ # ugDir = self.getUnimacroGrammarsDirectory()
330331 # if not (ugDir and isdir(ugDir)):
331- # print(f'UnimacroGrammarsDirectory ({ugDir}) not present, please create ')
332+ # print(f'UnimacroGrammarsDirectory ({ugDir}) is not present, should be a subdirectory "unimacrogrammars" of {uDir}, please (re)run your pip install unimacro command, of rerun the "Configure Natlink with GUI" or "Configure Natlink with CLI" ')
332333 # return False
333334 return True
334335
@@ -362,6 +363,9 @@ def getNatlinkIni(self):
362363 raise OSError (f'getNatlinkIni: not a valid file: "{ path } "' )
363364 return path
364365
366+ getnatlinkini = getNatlinkIni
367+
368+
365369 def getNatlink_Settingsdir (self ):
366370 """get the directory where "natlink.ini" should be stored
367371
@@ -378,6 +382,8 @@ def getNatlink_Settingsdir(self):
378382
379383 return str (natlink_settings_dir )
380384
385+ getnatlink_settingsdir = getNatlink_Settingsdir
386+
381387 def getUnimacroUserDirectory (self ):
382388 isdir , abspath = os .path .isdir , os .path .abspath
383389 if self .UnimacroUserDirectory is not None :
@@ -400,7 +406,7 @@ def getUnimacroUserDirectory(self):
400406
401407 self .UnimacroUserDirectory = ''
402408 return ''
403-
409+ getunimacrouserdirectory = getUnimacroUserDirectory
404410
405411 def getUnimacroDirectory (self ):
406412 """return the path to the UnimacroDirectory
@@ -419,6 +425,9 @@ def getUnimacroDirectory(self):
419425 self .UnimacroDirectory = unimacro .__path__ [- 1 ]
420426 return self .UnimacroDirectory
421427
428+ getunimacrodirectory = getUnimacroDirectory
429+
430+
422431 def getUnimacroGrammarsDirectory (self ):
423432 """return the path to the UnimacroGrammarDirectory
424433
@@ -442,6 +451,8 @@ def getUnimacroGrammarsDirectory(self):
442451 self .UnimacroGrammarsDirectory = um_grammars_dir
443452 return um_grammars_dir
444453
454+ getunimacrogrammarsdirectory = getUnimacroGrammarsDirectory
455+
445456 def getUnimacroDataDirectory (self ):
446457 """return the path to the directory where grammars can store data.
447458
@@ -451,6 +462,8 @@ def getUnimacroDataDirectory(self):
451462 """
452463 if self .UnimacroDataDirectory is not None :
453464 return self .UnimacroDataDirectory
465+ if not self .unimacroIsEnabled ():
466+ return ''
454467
455468 natlink_settings_dir = self .getNatlink_Settingsdir ()
456469
@@ -461,16 +474,22 @@ def getUnimacroDataDirectory(self):
461474 self .UnimacroDataDirectory = um_data_dir
462475
463476 return um_data_dir
477+
478+ getunimacrodatadirectory = getUnimacroDataDirectory
464479
465480 def getNatlinkDirectory (self ):
466481 """return the path of the NatlinkDirectory, where the _natlink_core.pyd package (C++ code) is
467482 """
468483 return self .NatlinkDirectory
469484
485+ getnatlinkdirectory = getNatlinkDirectory
486+
470487 def getNatlinkcoreDirectory (self ):
471488 """return the path of the natlinkcore package directory, same as thisDir!
472489 """
473490 return self .NatlinkcoreDirectory
491+ getnatlinkcoredirectory = getNatlinkcoreDirectory
492+
474493
475494 def getUserDirectory (self ):
476495 """return the path to the Natlink User directory
@@ -500,7 +519,8 @@ def getUserDirectory(self):
500519 print ('invalid path for UserDirectory: "{value}"' )
501520 self .UserDirectory = ''
502521 return ''
503-
522+ getuserdirectory = getUserDirectory
523+
504524 def getDragonflyDirectory (self ):
505525 """return the path to the DragonflyDirectory
506526
@@ -519,7 +539,7 @@ def getDragonflyDirectory(self):
519539
520540 self .DragonflyDirectory = str (Path (dragonfly2 .__file__ ).parent )
521541 return self .DragonflyDirectory
522-
542+ getdragonflydirectory = getDragonflyDirectory
523543
524544
525545 def getDragonflyUserDirectory (self ):
@@ -550,7 +570,7 @@ def getDragonflyUserDirectory(self):
550570 print ('invalid path for DragonflyUserDirectory: "{value}"' )
551571 self .DragonflyUserDirectory = ''
552572 return ''
553-
573+ getdragonflyuserdirectory = getDragonflyUserDirectory
554574
555575 def getVocolaUserDirectory (self ):
556576
@@ -576,6 +596,8 @@ def getVocolaUserDirectory(self):
576596 print (f'invalid path for VocolaUserDirectory: "{ value } " (expanded: "{ expanded } ")' )
577597 self .VocolaUserDirectory = ''
578598 return ''
599+ getvocolauserdirectory = getVocolaUserDirectory
600+
579601
580602 def getVocolaDirectory (self ):
581603 if self .VocolaDirectory is not None :
@@ -588,7 +610,7 @@ def getVocolaDirectory(self):
588610 return ''
589611 self .VocolaDirectory = vocola2 .__path__ [- 1 ]
590612 return self .VocolaDirectory
591-
613+ getvocoladirectory = getVocolaDirectory
592614
593615 def getVocolaGrammarsDirectory (self ):
594616 """return the VocolaGrammarsDirectory, but only if Vocola is enabled
@@ -611,6 +633,7 @@ def getVocolaGrammarsDirectory(self):
611633 voc_grammars_dir = natlinkcore .config .expand_path (value )
612634 self .VocolaGrammarsDirectory = voc_grammars_dir
613635 return voc_grammars_dir
636+ getvocolagrammarsdirectory = getVocolaGrammarsDirectory
614637
615638 def getDtactionsDirectory (self ):
616639 """dtactions directory should be found with an import (like getUnimacroDirectory)
@@ -625,10 +648,12 @@ def getDtactionsDirectory(self):
625648 return ""
626649 self .DtactionsDirectory = dtactions .__path__ [- 1 ]
627650 return self .DtactionsDirectory
651+ getdtactionsdirectory = getDtactionsDirectory
652+
628653
629654 def getAhkUserDir (self ):
630655 return self .getAhkUserDirFromIni ()
631-
656+ getahkuserdir = getAhkUserDir
632657
633658 def getAhkUserDirFromIni (self ):
634659 isdir , abspath = os .path .isdir , os .path .abspath
@@ -655,7 +680,7 @@ def getAhkExeDir(self):
655680 if not self .AhkExeDir is None :
656681 return self .AhkExeDir
657682 return self .getAhkExeDirFromIni ()
658-
683+ getahkexedir = getAhkExeDir
659684
660685 def getAhkExeDirFromIni (self ):
661686 isdir , abspath = os .path .isdir , os .path .abspath
0 commit comments