From a0ab6376c91b7a63a4fd92257908dbbcca6cf882 Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Tue, 20 Aug 2024 15:28:42 +0200 Subject: [PATCH 01/28] bump version to 4.1.7, unimacroutils.py set_mouse_position (beginning of independent of playString) --- .gitignore | 1 + pyproject.toml | 4 ++-- src/unimacro/UnimacroGrammars/rememberdialog.py | 14 ++++++++------ src/unimacro/__init__.py | 4 ---- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 5302b09..555616f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ __pycache__/ README.html /src/unimacro/UnimacroGrammars/rememberdialog.py /tests/rememberdialog.py +/src/unimacro/UnimacroGrammars/rememberdialog.py diff --git a/pyproject.toml b/pyproject.toml index 42b5ea1..58e3978 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,10 +10,10 @@ requires-python = ">=3.10" readme = "README.md" -dependencies = ["dtactions >= 1.6.1", +dependencies = ["dtactions >= 1.6.2", "debugpy >= 1.2.0", "pywin32 >= 304", - "natlinkcore >= 5.4.0", + "natlinkcore >= 5.4.1", "FreeSimpleGUI>=5.1.0"] classifiers=[ "Development Status :: 4 - Beta", diff --git a/src/unimacro/UnimacroGrammars/rememberdialog.py b/src/unimacro/UnimacroGrammars/rememberdialog.py index 2f7c7b6..201338c 100644 --- a/src/unimacro/UnimacroGrammars/rememberdialog.py +++ b/src/unimacro/UnimacroGrammars/rememberdialog.py @@ -8,14 +8,16 @@ from dtactions.unimacro import inivars prompt = """Remember in Unimacro _folders grammar""" # readable text -text = """Remember folder "C:/Users/Gebruiker/Music" for future calling? +text = """Remember website for future calling? -Please give a spoken form for this folder and choose OK; or Cancel...""" # input text, the key of the -inifile = "C:/Users/Gebruiker/Documents/unimacro_clean_start/enx_inifiles/_folders.ini" -section = "folders" -value = "C:/Users/Gebruiker/Music" +- https://pypi.org - + +Please give a spoken form for this website and choose OK; or Cancel...""" # input text, the key of the +inifile = "C:/Users/Gebruiker/Documents/unimacro_qh/enx_inifiles/_folders.ini" +section = "websites" +value = "https://pypi.org" title = "test" -default = "Music" +default = "pypi" pausetime = 3 # should be replaced by 0 or a positive int value diff --git a/src/unimacro/__init__.py b/src/unimacro/__init__.py index d61c19f..19183e3 100644 --- a/src/unimacro/__init__.py +++ b/src/unimacro/__init__.py @@ -8,10 +8,6 @@ import os import sys -__version__ = '4.1.6' # requires the dtactions 1.5.5, with new sendkeys (from send_input, vocola) -#they could be in a seperate .py file in unimacro to achieve the same (ie not in the control grammar). -#these will possilby be removed since we may not need them to enumerate the grammars and ask for log names. - def folders_logger_name() -> str: return "natlink.unimacro.folders" From 6c28f66da451719b08590d0ca01e8ad3862d6111 Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Thu, 22 Aug 2024 17:46:43 +0200 Subject: [PATCH 02/28] bump to 4.1.6 --- src/unimacro/UnimacroGrammars/_folders.py | 2 +- src/unimacro/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unimacro/UnimacroGrammars/_folders.py b/src/unimacro/UnimacroGrammars/_folders.py index 0c6acb8..bf0fdbb 100644 --- a/src/unimacro/UnimacroGrammars/_folders.py +++ b/src/unimacro/UnimacroGrammars/_folders.py @@ -72,7 +72,7 @@ from dtactions.unimacro import unimacroutils # from dtactions.unimacro.unimacroactions import Message # from dtactions.unimacro import unimacroactions as actions -import unimacro.natlinkutilsbj as natbj +from unimacro import natlinkutilsbj as natbj # from unimacro.unimacro_wxpythondialogs import InputBox # import natlinkcore.natlinkutils as natut diff --git a/src/unimacro/__init__.py b/src/unimacro/__init__.py index 19183e3..bba47d4 100644 --- a/src/unimacro/__init__.py +++ b/src/unimacro/__init__.py @@ -18,4 +18,4 @@ def logname() -> str: """ Returns the name of the unimacro logger.""" return "natlink.unimacro" -__version__ = '4.1.7' +__version__ = '4.1.6' From 49084ee4a3e4ad44a6aa18cdef46770a7caa1d1e Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Sun, 25 Aug 2024 16:09:47 +0200 Subject: [PATCH 03/28] removed most komodo mentions in sample ini files, also cleaned up actions.ini --- src/unimacro/_control.py | 4 +- src/unimacro/sample_ini/actions.ini | 306 ------------------ .../sample_ini/enx_inifiles/_folders.ini | 1 - .../sample_ini/nld_inifiles/_folders.ini | 2 - 4 files changed, 2 insertions(+), 311 deletions(-) diff --git a/src/unimacro/_control.py b/src/unimacro/_control.py index 482205c..a63204b 100644 --- a/src/unimacro/_control.py +++ b/src/unimacro/_control.py @@ -51,8 +51,7 @@ status = natlinkstatus.NatlinkStatus() natlinkmain = loader.NatlinkMain() ##control_logger=l.getLogger(unimacro_l.control_logger_name()) - - +thisDir = str(Path(__file__).parent) @@ -757,4 +756,5 @@ def checkOriginalFileWithActualTxtPy(name, org_path, txt_path, py_path): utilGrammar.initialize() # set special function as a callback... natlinkmain.set_post_load_callback(utilGrammar.UnimacroControlPostLoad) + print(f'unimacro _ctrl grammar started, directory: "{thisDir}"') # utilGrammar.checkUnimacroGrammars() diff --git a/src/unimacro/sample_ini/actions.ini b/src/unimacro/sample_ini/actions.ini index 5878c6e..ea35ae2 100644 --- a/src/unimacro/sample_ini/actions.ini +++ b/src/unimacro/sample_ini/actions.ini @@ -1,39 +1,8 @@ -[acrord32 child] -pagefinish = -pagestart = {alt+i}{tab} -pagethrough = - - - -[acrord32 top] -filesaveas = {shift+ctrl+s} -pagefinish = -pagestart = {alt+d}ng; VW -pagethrough = -printfinish = {tab 2}{enter 2} -printpreview = -printproperties = {alt+p} -togglefullscreen = {ctrl+l} - - -[bringup chrome] -name = chrome - [bringup dragonpad] name = natspeak -[bringup edit] -ini = komodo -py = komodo -pyw = pythonwin -txt = komodo - - -[bringup emacs] -name = emacs -path = C:\emacs-22.3\bin\runemacs.exe - [bringup email] name = outlook @@ -47,23 +16,6 @@ name = excel name = iexplore -[bringup ibmrad] -args = -product com.ibm.rational.rad.product.v75.ide -name = javaw -path = C:\Program Files\IBM\SDP\eclipse.exe -title = Java - Rational - - -[bringup idle] -args = C:\Python25\Lib\idlelib\idle.pyw -name = pythonw -path = C:\Python25\pythonw.exe - - -[bringup internet] -name = firefox - - [bringup komodo] name = komodo @@ -90,20 +42,6 @@ path = %PROGRAMFILES%\Win32Pad\win32pad.exe name = winword -[bringup xplorer2] -name = xplorer2_uc -path = C:\Program Files\zabkat\xplorer2\xplorer2_UC.exe - - -[cmd] -taskrefresh = {extup}{enter} -killletter = e -keystrokes with systemkeys = all - -[code] -gotoline n = {Ctrl+g}; n{enter} -realhome = {end}{home}{home} - [default] addressfield = {alt+d}; W addressfieldclose = @@ -288,59 +226,6 @@ zoomin = AHK send ^{wheelup};AHK send ^{wheelup} zoomout = AHK send ^{wheeldown};AHK send ^{wheeldown} -[firefox] -keystrokes with systemkeys = none -printdialogselection = {alt+t} -refresh = q{f5} -searchalwayscontinue = T -searchback = {alt+p} -searchfailed = ALERT -searchforward = {alt+n} -searchgo = {alt+n} -startbacksearch = -startsearch = {ctrl+f} -taskrefresh = q{f5} - - -[firefox foutconsole] -taskrefresh = {alt+s} - - -[frescobaldi] -fileopenrecent = {alt+b}r; VW(); {down}; VW() -keystrokes with systemkeys = none - - -[general] -child behaves like top = natspeak: dragon-balk, dragonbar -top behaves like child = winzip64: uitpakken - - -[iexplore] -leftafterbacksearch n = -leftafterforwardsearch n = {extleft n} - -print1peepee = {f5}; <><><><> - - -print2peepee = {f5}; <><><><> - -printproperties = {alt+v} -searchback = {ctrl+f};W;{alt+u}{enter} -searchfailed = ALERT; {esc} -searchgo = {enter};{esc} -startsearch = RW; {ctrl+f}; WTC;{alt+d}{alt+n} - - -[kodakimg] -filesaveas = {alt+b}a - - -[pycharm64] -gotoline n = {Ctrl+g}; W; n;{enter} -lineback = {alt+left} -realhome = {home 2} - [komodo] documentclose = {ctrl+w} @@ -358,9 +243,6 @@ selectioncomment = {ctrl+3} selectionuncomment = {ctrl+shift+3} taskrefresh = {ctrl+w} LW() {shift+ctrl+t} -[minesweeper] -cmdes with systemkeys = all - [natspeak dragonpad] fileopenrecent = {alt+b}{extdown 6} @@ -375,30 +257,10 @@ selectdown n = {shift+extdown n}{shift+extend} selectline = {exthome}{shift+extend} -[natspeak find] -searchgo = {enter}; W; {esc} - - [natspeak messages] taskrefresh = <>; PRINT new messages window -[natspeak opdrachtbewerker] -searchalwayscontinue = T -searchback = -searchfailed = ALERT; {esc} -searchforward = {f3} -searchgo = {enter};{esc} -selectdown n = {shift+extdown n}{shift+extend} -selectline = {exthome}{shift+extend} -startsearch = RW; {ctrl+f}; WTC - - -[natspeak zoeken] -searchgo = {enter}; W; {esc} -windowclose = MSG(switched off for komodo); - - [notepad] duplicate = {ctrl+c}{ctrl+v 2} filesaveas = {alt+b}l @@ -414,160 +276,6 @@ searchfailed = ALERT; {esc} searchforward = {f3} searchgo = {enter};{esc} - -[opera] -addressfield = {f2} -addressfieldclose = {esc} - - -[outlook] -filenameenter = {alt+b} -filenameexit = {tab 2}{alt+b} -keystrokes with systemkeys = none -printdialogselection = {alt+t} -printfinish = {shift+tab 3} -printproperties = {alt+c} -printstart = {ctrl+p}; VW -refresh = {f9} -searchforward = {shift+f4} -startsearch = {f4} -taskrefresh = {f9} - - -[outlook html] -printproperties = {alt+v} - - -[outlook microsoft outlook] -startsearch = {esc}{ctrl+e} - - -[outlook microsoft visual basic for applications] -realhome = {extend}{exthome}{exthome} - - -[pdf24-creator] -filesaveas = {alt}{down 5}{enter} -pagefinish = -pagestart = MP(5, 318, 493); MP(5, 400, 489); {end}{shift+home}{del}; -pagethrough = MP(5, 463, 490); {end}{shift+home}{del}; - - -[positions] -clockx = -40 -clocky = 998 -mousex1 = 21 -mousexdiff = 49 -mousey1 = 1029 -mouseydiff = 0 - - -[positions chrome] -mousex1 = 75 -mousexdiff = 146 -mousey1 = 47 -mouseydiff = 0 - - -[positions komodo] -mousex1 = 97 -mousexdiff = -1 -mousey1 = 168 -mouseydiff = 27 - - -[positions outlook] -mousex1 = 66 -mousexdiff = 21 -mousey1 = 162 -mouseydiff = 25 - - -[psp] -fileopenrecent = {alt+f}{extdown 8} -filesave = SSK {ctrl+s} - - -[python gamera] -fileopen = {alt+f}o - - -[pythonw] -fileopenrecent = {alt+f}r__imp -heardwordemacs = HW Edit that python code - - -[pythonw ---] -taskrefresh = VW; RMP 5, 0.5, 0.5; VW; {alt+s}u - - -[pythonw sitegen] -taskrefresh = VW; {alt+s}u - - -[pythonwin] -fileopenrecent = {alt+f}{down 14} -filesaveas = {alt+f}a -gotoline n = {ctrl+g}; n{enter}; {home} -heardwordemacs = HW Edit that python code -homeafterselection = <>{extup} -printfinish = {tab 2}{enter}; {enter} -printproperties = {alt+g} - -printselection = - {ctrl+c}{ctrl+n}; W; {enter}; {ctrl+v} - {ctrl+p}; {enter}; W 2; {ctrl+f4}; n - -realhome = {alt+exthome} -searchforward = {f3} -selectioncomment = {alt+3} -selectionuncomment = {alt+4} -shiftrealhome = {shift+alt+exthome} -upafterpaste = {up}{home} - - -[soffice] -fileopenrecent = {alt+b}g - - -[sud] -keystrokes with systemkeys = all - - -[textpad] -gotoline n = {ctrl+g}; n{enter} -startsearch = {f5} - - -[tortoiseproc] -ok = {alt+o} - - -[uedit32] -fileopenrecent = {alt+f}ii{extright} -filesaveas = {alt+f}a -gotoline n = {ctrl+g}; n{enter} -lineinsert = <>{extup}{enter}{extup} -printproperties = {alt+g} -realhome = {extend}{exthome 2} -searchalwayscontinue = T -searchback = {ctrl+f3} -searchfailed = ALERT; {esc} -searchforward = {f3} -searchgo = {esc} -searchgoback = {alt+s}bb{enter} -startsearch = {shift+ctrl+i} - - -[uedit32 find in files] -filenameenter = {alt+d} -filenameexit = {enter} - - -[vcledit] -fileopenrecent = {alt+h} - - [win32pad] filesaveas = {shift+ctrl+s} gotoline n = {ctrl+g}; n{enter} @@ -605,20 +313,6 @@ searchalwayscontinue = T searchfailed = ALERT; {esc} searchgo = {enter}{esc} - - -[winzip32 extract] -filenameenter = {alt+x} -filenameexit = {tab}{space}{tab} - - [wordpad] searchgo = {enter}{esc} - -[wxdesigner] -fileopenrecent = {alt+f}{extdown 17} - - -[zshp1020] -taskrefresh = {space} diff --git a/src/unimacro/sample_ini/enx_inifiles/_folders.ini b/src/unimacro/sample_ini/enx_inifiles/_folders.ini index e09b75a..62f9a43 100644 --- a/src/unimacro/sample_ini/enx_inifiles/_folders.ini +++ b/src/unimacro/sample_ini/enx_inifiles/_folders.ini @@ -154,7 +154,6 @@ dictation toolbox = dt [websiteopenprograms] chrome = chrome -edit = komodo firefox = firefox edge = edge komodo = komodo diff --git a/src/unimacro/sample_ini/nld_inifiles/_folders.ini b/src/unimacro/sample_ini/nld_inifiles/_folders.ini index d5f7e62..25b671a 100644 --- a/src/unimacro/sample_ini/nld_inifiles/_folders.ini +++ b/src/unimacro/sample_ini/nld_inifiles/_folders.ini @@ -103,10 +103,8 @@ pf = %PROGRAMFILES% [websiteopenprograms] groom = chrome -eddit = komodo faaierfox = firefox internet explorer = iexplore -komodo = komodo explorer = iexplore [websites] From 47598fccb7b95cf4e88bcc1d4cb9864a2cef6d60 Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Sun, 25 Aug 2024 16:23:53 +0200 Subject: [PATCH 04/28] print line _control.py added, giving version and path of unimacro --- src/unimacro/_control.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/unimacro/_control.py b/src/unimacro/_control.py index a63204b..2a65a69 100644 --- a/src/unimacro/_control.py +++ b/src/unimacro/_control.py @@ -10,7 +10,7 @@ # Author: Bart Jan van Os, Version: 1.0, nov 1999 # starting new version Quintijn Hoogenboom, August 2003, for python3 2023 #pylint:disable=C0115, C0116, W0702, R0904, R0911, R0912, R0914, R0915, W0201, W0613, W0107, C0209, E0601, W0602, C0112 -#pylint:disable=R1735, W0703 +#pylint:disable=R1735, W0703, W1203 #pylint:disable=E1101 import os @@ -32,7 +32,7 @@ from unimacro import natlinkutilsbj as natbj from unimacro import spokenforms - +from unimacro import __version__ as unimacro_version #from unimacro.logger import ulogger @@ -78,8 +78,6 @@ def natlink_loggers() ->dict: The entry point must be a function that returns a logger name. Is the Python 'logging' module. """ - - discovered_eps=meta.entry_points(group='dt.loggers') ulogger.debug('Entry Points for natlink.loggers: %s', discovered_eps) loggers = dict() @@ -752,9 +750,9 @@ def checkOriginalFileWithActualTxtPy(name, org_path, txt_path, py_path): utilGrammar.gotResults_edit(Words, FR) elif __name__.find('.') == -1: # standard startup when Dragon starts: + print(f'Unimacro {unimacro_version} in directory: {thisDir}') utilGrammar = UtilGrammar() utilGrammar.initialize() # set special function as a callback... natlinkmain.set_post_load_callback(utilGrammar.UnimacroControlPostLoad) - print(f'unimacro _ctrl grammar started, directory: "{thisDir}"') # utilGrammar.checkUnimacroGrammars() From 58f7edda69666baad3c4bb930c80aa91cbb338ea Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Sun, 25 Aug 2024 18:21:03 +0200 Subject: [PATCH 05/28] tidy up unimacro directory a bit... --- src/unimacro/__init__.py.orig | 29 --- src/unimacro/nld_spokenforms.ini | 169 ------------------ src/unimacro/testDialogForDictationGrammar.py | 61 ------- 3 files changed, 259 deletions(-) delete mode 100644 src/unimacro/__init__.py.orig delete mode 100644 src/unimacro/nld_spokenforms.ini delete mode 100644 src/unimacro/testDialogForDictationGrammar.py diff --git a/src/unimacro/__init__.py.orig b/src/unimacro/__init__.py.orig deleted file mode 100644 index 54a825c..0000000 --- a/src/unimacro/__init__.py.orig +++ /dev/null @@ -1,29 +0,0 @@ -"""Unimacro __init__ - - -Note there will be a global variable created in the unimacro module 'ulogger' which is Logging.Logger object named 'natlink.unimacro' -You can always access it by name. It is created in _control.py. - -""" -import os -import sys - -<<<<<<< HEAD -__version__ = '4.1.2' # requires the dtactions 1.5.5, with new sendkeys (from send_input, vocola) -======= -#these functions are in this module so that they can be loaded without loading a lot of unimacro code. -#they could be in a seperate .py file in unimacro to achieve the same (ie not in the control grammar). -#these will possilby be removed since we may not need them to enumerate the grammars and ask for log names. - -def folders_logger_name() -> str: - return "natlink.unimacro.folders" - -def control_logger_name() -> str : - return "natlink.unimacro.control" - -def logname() -> str: - """ Returns the name of the unimacro logger.""" - return "natlink.unimacro" -__version__ = '4.1.5' ->>>>>>> a1a5c814781da86d8d969a35b822123c35dce778 - diff --git a/src/unimacro/nld_spokenforms.ini b/src/unimacro/nld_spokenforms.ini deleted file mode 100644 index 00f49ca..0000000 --- a/src/unimacro/nld_spokenforms.ini +++ /dev/null @@ -1,169 +0,0 @@ -[alphabet] -a = Alpha -b = Bravo -c = Charlie -d = Delta -e = Echo -f = Foxtrot -g = Golf -h = Hotel -i = India -j = Juliet -k = Kilo -l = Lima -m = Mike -n = November -o = Oscar -p = papa -q = Quebec -r = Romeo -s = Sierra -t = Tango -u = Uniform -v = Victor -w = Whiskey -x = X-ray -y = Yankee -z = Zulu - -[abbrevs] -qh = kuhaaa -nld = N L D -enx = E. N. X.; enx - -[extensions] -doc = weurd; doc -docx = weurd; doc X -xls = excel; X L S -xlsx = excel; X L S X -py = pieton; paaiton; P ei -pyw = python; paaiton; pee eiwee -ini = ini; I N I -txt = text; T X T -html = html; H T M L -php = P H P; peehapee -js = javascript; J S -dat = dat -xml = iksemmel - - -[punctuationreverse] -punt = . -uitroepteken = ! -apostrof = "'" -kwoot = '"' -streepje = - -komma = , -vraagteken = ? - -[numbers] -0 = nul -1 = één -10 = tien -100 = honderd -1000 = duizend -10000 = tienduizend -100000 = honderdduizend -1000000 = miljoen -11 = elf -12 = twaalf -13 = dertien -14 = veertien -15 = vijftien -16 = zestien -17 = zeventien -18 = achttien -19 = negentien -2 = twee -20 = twintig -21 = eenentwintig -22 = tweeëntwintig -23 = drieëntwintig -24 = vierentwintig -25 = vijfentwintig -26 = zesentwintig -27 = zevenentwintig -28 = achtentwintig -29 = negenentwintig -3 = drie -30 = dertig -31 = eenendertig -32 = tweeëndertig -33 = drieëndertig -34 = vierendertig -35 = vijfendertig -36 = zesendertig -37 = zevenendertig -38 = achtendertig -39 = negenendertig -4 = vier -40 = veertig -41 = eenenveertig -42 = tweeënveertig -43 = drieënveertig -44 = vierenveertig -45 = vijfenveertig -46 = zesenveertig -47 = zevenenveertig -48 = achtenveertig -49 = negenenveertig -5 = vijf -50 = vijftig -51 = eenenvijftig -52 = tweeënvijftig -53 = drieënvijftig -54 = vierenvijftig -55 = vijfenvijftig -56 = zesenvijftig -57 = zevenenvijftig -58 = achtenvijftig -59 = negenenvijftig -6 = zes -60 = zestig -61 = eenenzestig -62 = tweeënzestig -63 = drieënzestig -64 = vierenzestig -65 = vijfenzestig -66 = zesenzestig -67 = zevenenzestig -68 = achtenzestig -69 = negenenzestig -7 = zeven -70 = zeventig -71 = eenenzeventig -72 = tweeënzeventig -73 = drieënzeventig -74 = vierenzeventig -75 = vijfenzeventig -76 = zesenzeventig -77 = zevenenzeventig -78 = achtenzeventig -79 = negenenzeventig -8 = acht -80 = tachtig -81 = eenentachtig -82 = tweeëntachtig -83 = drieëntachtig -84 = vierentachtig -85 = vijfentachtig -86 = zesentachtig -87 = zevenentachtig -88 = achtentachtig -89 = negenentachtig -9 = negen -90 = negentig -91 = eenennegentig -92 = tweeënnegentig -93 = drieënnegentig -94 = vierennegentig -95 = vijfennegentig -96 = zesennegentig -97 = zevenennegentig -98 = achtennegentig -99 = negenennegentig - - -[prefixes] -hundred = honderd -thousand = duizend diff --git a/src/unimacro/testDialogForDictationGrammar.py b/src/unimacro/testDialogForDictationGrammar.py deleted file mode 100644 index d828c46..0000000 --- a/src/unimacro/testDialogForDictationGrammar.py +++ /dev/null @@ -1,61 +0,0 @@ - -import win32ui -from pywin.mfc.dialog import Dialog - - -def setDialog(): - """setting a dialog which is tested in pythonwin_dict.py, for dictation control - - first example from "Python, programming on win32", O'Reilly, by Mark Hammond and Andy Rhetobinson - chapter 20, page 402 - - second example comes with IDD_LARGE_EDIT, which gives a multiline control. - (No idea how to collect the results, only for testing inside now) - - """ -## d = Dialog(win32ui.IDD_SIMPLE_INPUT) -## IDD_SIMPLE_INPUT (15044) has controls: -## IDC_PROMPT1: 15014 -## IDC_EDIT1: 15008 - -## also to be called with: win32ui.IDC_PROMPT1, giving 15014 -## in the grammar: -## Cwnd = win32ui.GetForegroundWindow() -## self.txt=Cwnd.GetDlgItem(15008) # edit box -##i: 15008, it: object 'PyCEdit' - assoc is 01089070, vi=, notify=0,ch/u=0/0, mh=0, kh=0 -##i: 15014, it: object 'PyCWnd' - assoc is 010DF420, vi=, notify=0,ch/u=0/0, mh=0, kh=0 - - - d = Dialog(win32ui.IDD_LARGE_EDIT) -##i: 1, not working it: object 'PyCButton' - assoc is 01077A70, vi=, notify=0,ch/u=0/0, mh=0, kh=0 -##i: 2, not working it: object 'PyCButton' - assoc is 00BCEC60, vi=, notify=0,ch/u=0/0, mh=0, kh=0 -##i: 15008, it: object 'PyCEdit' - assoc is 00BCECA8, vi=, notify=0,ch/u=0/0, mh=0, kh=0 - -## print 'dir of Dialog: %s'% dir(d) -##dir of Dialog: ['AddDDX', 'CreateWindow', 'DoModal', 'EndDialog', 'GotoDlgCtrl', -## 'HookCommands', 'MapDialogRect', 'OnAttachedObjectDeath', 'OnCancel', -## 'OnDestroy', 'OnInitDialog', 'OnOK', '__del__', '__doc__', '__getattr__', -## '__getitem__', '__init__', '__len__', '__module__', '__nonzero__', -## '__setitem__', '_obj_', 'bHaveInit', 'close', 'dll', 'has_key', -## 'items', 'keys', 'values'] - d.CreateWindow() - print('keys: %s'% list(d.keys())) - print('values: %s'% list(d.values())) - print('items: %s'% list(d.items())) - - # search for dialog items in this window: - for i in range(100000): - try: - it = d.GetDlgItem(i) - print('i: %s, it: %s'% (i, it)) - except: - pass -## print 'IDC_PROMPT2: %s'% win32ui.IDC_PROMPT2 -## print 'IDC_EDIT 2: %s'% win32ui.IDC_EDIT2 -## button = d.GetDlgItem(win32ui.IDC_PROMPT1) -## button.SetWindowText('Hello natpython test dictation grammar') - - -if __name__ == '__main__': - setDialog() - From d1cbfb0d9559b9ba656a1d1bb1579f1c2b2562ae Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Sun, 25 Aug 2024 18:32:29 +0200 Subject: [PATCH 06/28] add rememberdialog.py to .gitignore --- .gitignore | 1 + src/unimacro/UnimacroGrammars/rememberdialog.py | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 555616f..7788b18 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ README.html /src/unimacro/UnimacroGrammars/rememberdialog.py /tests/rememberdialog.py /src/unimacro/UnimacroGrammars/rememberdialog.py +/src/unimacro/UnimacroGrammars/rememberdialog.py diff --git a/src/unimacro/UnimacroGrammars/rememberdialog.py b/src/unimacro/UnimacroGrammars/rememberdialog.py index 201338c..f37d374 100644 --- a/src/unimacro/UnimacroGrammars/rememberdialog.py +++ b/src/unimacro/UnimacroGrammars/rememberdialog.py @@ -8,16 +8,14 @@ from dtactions.unimacro import inivars prompt = """Remember in Unimacro _folders grammar""" # readable text -text = """Remember website for future calling? +text = """Remember folder "C:/DT/NatlinkcoreDoug/src/natlinkcore/SampleMacros" for future calling? -- https://pypi.org - - -Please give a spoken form for this website and choose OK; or Cancel...""" # input text, the key of the +Please give a spoken form for this folder and choose OK; or Cancel...""" # input text, the key of the inifile = "C:/Users/Gebruiker/Documents/unimacro_qh/enx_inifiles/_folders.ini" -section = "websites" -value = "https://pypi.org" +section = "folders" +value = "C:/DT/NatlinkcoreDoug/src/natlinkcore/SampleMacros" title = "test" -default = "pypi" +default = "SampleMacros" pausetime = 3 # should be replaced by 0 or a positive int value From 3643a1f89ceca46260097190601fb3dde1d537d2 Mon Sep 17 00:00:00 2001 From: Doug Ransom Date: Wed, 28 Aug 2024 09:31:06 -0700 Subject: [PATCH 07/28] Update README.md Added instructions on how to install from github instead of pypi. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 4b48ed4..60ac61e 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,13 @@ with the following. But... when you install Natlink via the natlink installer, and proceed with "Configure Natlink via GUI" or "Configure Natlink via CLI", and choose to activate Unimacro, this "pip" action is automatically performed. +If you want to install directly from github (say to install something between releases a developer is working on). + +``` +pip uninstall unimacro +pip install unimacro@git+https://github.com/dougransom/unimacro@d1cbfb0d9559b9ba656a1d1bb1579f1c2b2562ae +``` +replacing "https://github.com/dougransom/unimacro" with the repository in github you wish to install from and "d1cbfb0d9559b9ba656a1d1bb1579f1c2b2562ae" with the version commit you wish to install. # Location of Grammars From 06cc7604d4fd5723a45f62483d315601667a998d Mon Sep 17 00:00:00 2001 From: Doug Ransom Date: Wed, 28 Aug 2024 15:22:52 -0700 Subject: [PATCH 08/28] deleted .orig file, it should not have been checked in. --- pyproject.toml.orig | 71 --------------------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 pyproject.toml.orig diff --git a/pyproject.toml.orig b/pyproject.toml.orig deleted file mode 100644 index f282a2e..0000000 --- a/pyproject.toml.orig +++ /dev/null @@ -1,71 +0,0 @@ -[build-system] -requires = ["flit_core >=2,<4"] -build-backend = "flit_core.buildapi" - -[project] -name = "unimacro" -authors = [{name = "Quintijn Hoogenboom (maintainer)", email = "q.hoogenboom@antenna.nl"}] -dynamic = ["version", "description"] -requires-python = ">=3.10" -readme = "README.md" - - -dependencies = ["dtactions >= 1.5.7", - "debugpy >= 1.2.0", - "pywin32 >= 304", - "natlinkcore >= 5.3.7", - "pysimplegui"] - -classifiers=[ "Development Status :: 4 - Beta", - "Topic :: Multimedia :: Sound/Audio :: Speech", - "Topic :: Scientific/Engineering :: Human Machine Interfaces", - "Environment :: Win32 (MS Windows)", - "Intended Audience :: Developers", - "Operating System :: Microsoft :: Windows", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: Implementation :: CPython", - "Topic :: Multimedia :: Sound/Audio :: Speech", - "Topic :: Software Development :: Libraries :: Python Modules", - ] - -[project.optional-dependencies] -test = [ - "pytest >=7.1.2","flake8" -] -dev = [ - "pyenvutils","entry-point-inspector","build" -] -[project.entry-points."natlink.grammars"] -unimacro_builtins = "unimacro.UnimacroGrammars:locateme" - -[project.entry-points."dt.loggers"] - unimacro ="unimacro:logname" - control="unimacro:control_logger_name" - folders="unimacro:folders_logger_name" - -[tool.pytest.ini_options] -minversion = "7.1.2" -addopts = "--capture=tee-sys " -# very important -#the pythonpath lets pytest load code in your source area -#in addition to that in site-packages etc. -#you may want to run your tests without install natlinkcore with flit or pip -pythonpath = [ -] -testpaths= [ - "tests", - "src/unimacro/unimacro_test" -] -python_files = [ - "unittest*.py", - "test_*.py", - ] - -[project.scripts] - -[project.urls] -homepage = "https://qh.antenna.nl/unimacro/" -repository="https://github.com/dictation-toolbox/unimacro" -source="https://github.com/dictation-toolbox/unimacro" From 94e77398afa35eab96b9052e981e77bc22bd60b5 Mon Sep 17 00:00:00 2001 From: Doug Ransom Date: Thu, 12 Sep 2024 10:49:46 -0700 Subject: [PATCH 09/28] Moved version number spec to pyroject.toml updated version number according to https://peps.python.org/pep-0440/#summary-of-permitted-suffixes-and-relative-ordering --- pyproject.toml | 3 ++- src/unimacro/__init__.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 58e3978..14c8e2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,8 @@ build-backend = "flit_core.buildapi" [project] name = "unimacro" authors = [{name = "Quintijn Hoogenboom (maintainer)", email = "q.hoogenboom@antenna.nl"}] -dynamic = ["version", "description"] +dynamic = ["description"] +version = "4.1.7.dev1" requires-python = ">=3.10" readme = "README.md" diff --git a/src/unimacro/__init__.py b/src/unimacro/__init__.py index bba47d4..5089ac4 100644 --- a/src/unimacro/__init__.py +++ b/src/unimacro/__init__.py @@ -8,6 +8,9 @@ import os import sys +import importlib.metadata +__version__ = importlib.metadata.version('unimacro') #version set in pyproject.toml now. + def folders_logger_name() -> str: return "natlink.unimacro.folders" @@ -18,4 +21,3 @@ def logname() -> str: """ Returns the name of the unimacro logger.""" return "natlink.unimacro" -__version__ = '4.1.6' From 92731066bdcd227e67ef6ba55da9cdc7d45ae951 Mon Sep 17 00:00:00 2001 From: Doug Ransom Date: Thu, 12 Sep 2024 10:55:30 -0700 Subject: [PATCH 10/28] updated pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 14c8e2a..b5ab247 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ dependencies = ["dtactions >= 1.6.2", "natlinkcore >= 5.4.1", "FreeSimpleGUI>=5.1.0"] -classifiers=[ "Development Status :: 4 - Beta", +classifiers=[ "Development Status :: 2 - Pre-Alpha", "Topic :: Multimedia :: Sound/Audio :: Speech", "Topic :: Scientific/Engineering :: Human Machine Interfaces", "Environment :: Win32 (MS Windows)", From 9dab52dc5d0d7bf01a9e9df5d6f99710e6783da0 Mon Sep 17 00:00:00 2001 From: Doug Ransom Date: Mon, 23 Sep 2024 09:46:07 -0700 Subject: [PATCH 11/28] better way of specifying package name --- src/unimacro/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unimacro/__init__.py b/src/unimacro/__init__.py index 5089ac4..b3bd50d 100644 --- a/src/unimacro/__init__.py +++ b/src/unimacro/__init__.py @@ -9,7 +9,7 @@ import sys import importlib.metadata -__version__ = importlib.metadata.version('unimacro') #version set in pyproject.toml now. +__version__ = importlib.metadata.version(__package__) #version set in pyproject.toml now. def folders_logger_name() -> str: return "natlink.unimacro.folders" From 3fc909526aad8495f400adf5ac1e42d851703b85 Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Wed, 9 Oct 2024 16:33:27 +0200 Subject: [PATCH 12/28] extended import changes from dtactions/unimacro to dtactions directly. Most done, not all... --- .../OtherUnimacroGrammars/_calculator.py | 6 +++--- .../OtherUnimacroGrammars/_keystrokes.py | 8 ++++---- src/unimacro/OtherUnimacroGrammars/_latex.py | 4 ++-- .../OtherUnimacroGrammars/_number extended.py | 8 ++++---- src/unimacro/OtherUnimacroGrammars/_oops.py | 2 +- src/unimacro/OtherUnimacroGrammars/_repeat.py | 4 ++-- .../OtherUnimacroGrammars/_unimacrotest.py | 6 +++--- src/unimacro/OtherUnimacroGrammars/excel.py | 10 +++++----- .../OtherUnimacroGrammars/frescobaldi.py | 10 +++++----- .../OtherUnimacroGrammars/solitaire.py | 2 +- .../xxxxnatspeak_dialog.py | 2 +- src/unimacro/UnimacroGrammars/_brackets.py | 6 +++--- src/unimacro/UnimacroGrammars/_clickbyvoice.py | 6 +++--- .../UnimacroGrammars/_debug_natlink.py.txt | 4 ++-- src/unimacro/UnimacroGrammars/_folders.py | 18 +++++++++--------- src/unimacro/UnimacroGrammars/_general.py | 8 ++++---- src/unimacro/UnimacroGrammars/_lines.py | 8 ++++---- .../UnimacroGrammars/_number simple.py | 2 +- src/unimacro/UnimacroGrammars/_tags.py | 6 +++--- src/unimacro/UnimacroGrammars/_tasks.py | 12 ++++++------ .../UnimacroGrammars/rememberdialog.py | 2 +- src/unimacro/_control.py | 4 ++-- .../enabledictation/_enabledictation.py | 8 ++++---- src/unimacro/listdialogs.py | 2 +- src/unimacro/lynote.py | 2 +- src/unimacro/natlinkutilsbj.py | 16 ++++++++-------- .../sample_global_dictation/_control.py | 4 ++-- .../_dictationproject.py | 8 ++++---- .../_global_dictation.py | 8 ++++---- src/unimacro/spokenforms.py | 4 ++-- src/unimacro/unimacro_test/ActionsTest.py | 4 ++-- src/unimacro/unimacro_test/BasicTest.py | 4 ++-- src/unimacro/unimacro_test/BringupTest.py | 4 ++-- src/unimacro/unimacro_test/ClipboardTest.py | 4 ++-- src/unimacro/unimacro_test/MessageTest.py | 2 +- src/unimacro/unimacro_test/SearchTest.py | 4 ++-- .../unimacro_test/UnimacroTestHelpers.py | 4 ++-- src/unimacro/unimacro_test/UtilsTest.py | 4 ++-- src/unimacro/unimacro_test/unittestActions.py | 6 +++--- .../unimacro_test/unittestClipboard.py | 6 +++--- .../unimacro_test/unittestDocstringGrammar.py | 8 ++++---- .../unimacro_test/unittestIniGrammar.py | 10 +++++----- .../unimacro_test/unittestMessagefunctions.py | 2 +- src/unimacro/unimacro_test/unittestMouse.py | 6 +++--- .../unimacro_test/unittestNatlinkutilsqh.py | 2 +- .../unimacro_test/unittestNumbersConversion.py | 8 ++++---- .../unittestProfileKaiserDictation.py | 8 ++++---- .../unimacrofoldersremembertemplate.py | 2 +- tests/test_grammar_general.py | 4 ++-- tests/test_spokenforms.py | 2 +- 50 files changed, 142 insertions(+), 142 deletions(-) diff --git a/src/unimacro/OtherUnimacroGrammars/_calculator.py b/src/unimacro/OtherUnimacroGrammars/_calculator.py index 46146f9..a6b5fbc 100644 --- a/src/unimacro/OtherUnimacroGrammars/_calculator.py +++ b/src/unimacro/OtherUnimacroGrammars/_calculator.py @@ -35,11 +35,11 @@ the grammars _number simple and _number extended. """ import copy -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action from natlinkcore import natlinkutils as natut -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj ancestor = natbj.IniGrammar diff --git a/src/unimacro/OtherUnimacroGrammars/_keystrokes.py b/src/unimacro/OtherUnimacroGrammars/_keystrokes.py index f413fbc..63e66cc 100644 --- a/src/unimacro/OtherUnimacroGrammars/_keystrokes.py +++ b/src/unimacro/OtherUnimacroGrammars/_keystrokes.py @@ -20,10 +20,10 @@ import sys import copy -from dtactions.unimacro import inivars -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro import unimacroutils +from dtactions import inivars +from dtactions.unimacroactions import doKeystroke as keystroke +from dtactions.unimacroactions import doAction as action +from dtactions import unimacroutils from unimacro import natlinkutilsbj as natbj from natlinkcore import nsformat from natlinkcore import loader diff --git a/src/unimacro/OtherUnimacroGrammars/_latex.py b/src/unimacro/OtherUnimacroGrammars/_latex.py index c231d19..0175afd 100644 --- a/src/unimacro/OtherUnimacroGrammars/_latex.py +++ b/src/unimacro/OtherUnimacroGrammars/_latex.py @@ -15,8 +15,8 @@ import natlink from natlinkcore import nsformat from natlinkcore import natlinkstatus -from dtactions.unimacro import unimacroutils -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions import unimacroutils +from dtactions.unimacroactions import doAction as action from dtactions.sendkeys import sendkeys as keystroke import unimacro.natlinkutilsbj as natbj diff --git a/src/unimacro/OtherUnimacroGrammars/_number extended.py b/src/unimacro/OtherUnimacroGrammars/_number extended.py index 9099ea4..69dd682 100644 --- a/src/unimacro/OtherUnimacroGrammars/_number extended.py +++ b/src/unimacro/OtherUnimacroGrammars/_number extended.py @@ -47,10 +47,10 @@ """ #pylint:disable=C0209, R0904, R0912, R0915 import natlink -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -from dtactions.unimacro.unimacroactions import getMetaAction -from dtactions.unimacro import unimacroutils +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke +from dtactions.unimacroactions import getMetaAction +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj diff --git a/src/unimacro/OtherUnimacroGrammars/_oops.py b/src/unimacro/OtherUnimacroGrammars/_oops.py index 08a799a..1b1c8b9 100644 --- a/src/unimacro/OtherUnimacroGrammars/_oops.py +++ b/src/unimacro/OtherUnimacroGrammars/_oops.py @@ -61,7 +61,7 @@ import natlink from natlinkcore import natlinkstatus from natlinkcore import loader -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj logHour = -1 diff --git a/src/unimacro/OtherUnimacroGrammars/_repeat.py b/src/unimacro/OtherUnimacroGrammars/_repeat.py index 9a56bba..979bdc6 100644 --- a/src/unimacro/OtherUnimacroGrammars/_repeat.py +++ b/src/unimacro/OtherUnimacroGrammars/_repeat.py @@ -41,8 +41,8 @@ import os import os.path from dtactions.sendkeys import sendkeys -from dtactions.unimacro import unimacroutils -# from dtactions.unimacro.unimacroactions import doAction as action +from dtactions import unimacroutils +# from dtactions.unimacroactions import doAction as action import unimacro.natlinkutilsbj as natbj from natlinkcore import natlinkutils from natlinkcore import natlinktimer diff --git a/src/unimacro/OtherUnimacroGrammars/_unimacrotest.py b/src/unimacro/OtherUnimacroGrammars/_unimacrotest.py index c2ad4dc..20ab9bf 100644 --- a/src/unimacro/OtherUnimacroGrammars/_unimacrotest.py +++ b/src/unimacro/OtherUnimacroGrammars/_unimacrotest.py @@ -20,9 +20,9 @@ import natlink from natlinkcore import natlinkstatus import unimacro.natlinkutilsbj as natbj -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import utilsqh -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroutils +from dtactions import utilsqh +from dtactions import unimacroactions as actions status = natlinkstatus.NatlinkStatus() diff --git a/src/unimacro/OtherUnimacroGrammars/excel.py b/src/unimacro/OtherUnimacroGrammars/excel.py index e46ace5..3ebf633 100644 --- a/src/unimacro/OtherUnimacroGrammars/excel.py +++ b/src/unimacro/OtherUnimacroGrammars/excel.py @@ -10,15 +10,15 @@ import natlink -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj import pprint import types -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro import unimacroactions as actions +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions import unimacroactions as actions import win32com # diff --git a/src/unimacro/OtherUnimacroGrammars/frescobaldi.py b/src/unimacro/OtherUnimacroGrammars/frescobaldi.py index 17b8e78..a7e5ffe 100644 --- a/src/unimacro/OtherUnimacroGrammars/frescobaldi.py +++ b/src/unimacro/OtherUnimacroGrammars/frescobaldi.py @@ -47,16 +47,16 @@ """ -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj import natlink -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action from itertools import cycle -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions import re import copy import time diff --git a/src/unimacro/OtherUnimacroGrammars/solitaire.py b/src/unimacro/OtherUnimacroGrammars/solitaire.py index 5b8d7c9..59beb95 100644 --- a/src/unimacro/OtherUnimacroGrammars/solitaire.py +++ b/src/unimacro/OtherUnimacroGrammars/solitaire.py @@ -35,7 +35,7 @@ import win32gui from natlinkcore import natlinktimer -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj #aantal carden en aantal stapelplaatsen: diff --git a/src/unimacro/OtherUnimacroGrammars/xxxxnatspeak_dialog.py b/src/unimacro/OtherUnimacroGrammars/xxxxnatspeak_dialog.py index 45930d8..30150a6 100644 --- a/src/unimacro/OtherUnimacroGrammars/xxxxnatspeak_dialog.py +++ b/src/unimacro/OtherUnimacroGrammars/xxxxnatspeak_dialog.py @@ -9,7 +9,7 @@ # interaction with grammar _folders. # #pylint:disable= -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from dtactions.sendkeys import sendkeys as keystroke import unimacro.natlinkutilsbj as natbj diff --git a/src/unimacro/UnimacroGrammars/_brackets.py b/src/unimacro/UnimacroGrammars/_brackets.py index 71a57b3..128b646 100644 --- a/src/unimacro/UnimacroGrammars/_brackets.py +++ b/src/unimacro/UnimacroGrammars/_brackets.py @@ -32,9 +32,9 @@ """ #pylint:disable=C0115, C0116, W0201, W0613 from natlinkcore import nsformat -from dtactions.unimacro import unimacroutils -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke +from dtactions import unimacroutils +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke # from dtactions.natlinkclipboard import Clipboard import unimacro.natlinkutilsbj as natbj import natlink diff --git a/src/unimacro/UnimacroGrammars/_clickbyvoice.py b/src/unimacro/UnimacroGrammars/_clickbyvoice.py index 26bd705..d07470f 100644 --- a/src/unimacro/UnimacroGrammars/_clickbyvoice.py +++ b/src/unimacro/UnimacroGrammars/_clickbyvoice.py @@ -29,9 +29,9 @@ """ import natlink from unimacro import natlinkutilsbj as natbj -from dtactions.unimacro import unimacroutils -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke +from dtactions import unimacroutils +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke # use extension Click by Voice visiblePause = 0.4 diff --git a/src/unimacro/UnimacroGrammars/_debug_natlink.py.txt b/src/unimacro/UnimacroGrammars/_debug_natlink.py.txt index 95b3a63..b08b6c9 100644 --- a/src/unimacro/UnimacroGrammars/_debug_natlink.py.txt +++ b/src/unimacro/UnimacroGrammars/_debug_natlink.py.txt @@ -11,8 +11,8 @@ from natlinkcore import nsformat # import unimacro.natlinkutilsbj as natbj -# from dtactions.unimacro import unimacroutils -# from dtactions.unimacro.unimacroactions import doAction as action +# from dtactions import unimacroutils +# from dtactions.unimacroactions import doAction as action # ancestor = natbj.IniGrammar #QH1 class DebugGrammar(natlinkutils.GrammarBase): diff --git a/src/unimacro/UnimacroGrammars/_folders.py b/src/unimacro/UnimacroGrammars/_folders.py index bf0fdbb..92e6119 100644 --- a/src/unimacro/UnimacroGrammars/_folders.py +++ b/src/unimacro/UnimacroGrammars/_folders.py @@ -61,17 +61,17 @@ from natlinkcore import readwritefile from natlinkcore import natlinktimer from natlinkcore import natlinkstatus -from dtactions.unimacro import extenvvars +from dtactions import extenvvars from dtactions import messagefunctions as mess from dtactions import natlinkclipboard -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -# from dtactions.unimacro.unimacroactions import do_YESNO as YesNo -from dtactions.unimacro.unimacroactions import UnimacroBringUp -from dtactions.unimacro.unimacroactions import Message -from dtactions.unimacro import unimacroutils -# from dtactions.unimacro.unimacroactions import Message -# from dtactions.unimacro import unimacroactions as actions +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke +# from dtactions.unimacroactions import do_YESNO as YesNo +from dtactions.unimacroactions import UnimacroBringUp +from dtactions.unimacroactions import Message +from dtactions import unimacroutils +# from dtactions.unimacroactions import Message +# from dtactions import unimacroactions as actions from unimacro import natlinkutilsbj as natbj # from unimacro.unimacro_wxpythondialogs import InputBox # import natlinkcore.natlinkutils as natut diff --git a/src/unimacro/UnimacroGrammars/_general.py b/src/unimacro/UnimacroGrammars/_general.py index 735c6af..2ba1b57 100644 --- a/src/unimacro/UnimacroGrammars/_general.py +++ b/src/unimacro/UnimacroGrammars/_general.py @@ -32,10 +32,10 @@ from unimacro import natlinkutilsbj as natbj from unimacro import namelist # for name phrases -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -from dtactions.unimacro import unimacroactions as actions -from dtactions.unimacro import unimacroutils +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke +from dtactions import unimacroactions as actions +from dtactions import unimacroutils # taskswitching moved to _tasks.py (july 2006) diff --git a/src/unimacro/UnimacroGrammars/_lines.py b/src/unimacro/UnimacroGrammars/_lines.py index 8cc066b..33fafaf 100644 --- a/src/unimacro/UnimacroGrammars/_lines.py +++ b/src/unimacro/UnimacroGrammars/_lines.py @@ -46,11 +46,11 @@ import natlink from natlinkcore import natlinkutils import unimacro.natlinkutilsbj as natbj -from dtactions.unimacro import inivars -from dtactions.unimacro import unimacroutils -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions import inivars +from dtactions import unimacroutils +from dtactions.unimacroactions import doAction as action from dtactions.sendkeys import sendkeys as keystroke -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions class LinesError(Exception): pass diff --git a/src/unimacro/UnimacroGrammars/_number simple.py b/src/unimacro/UnimacroGrammars/_number simple.py index bce602a..16fc9a8 100644 --- a/src/unimacro/UnimacroGrammars/_number simple.py +++ b/src/unimacro/UnimacroGrammars/_number simple.py @@ -23,7 +23,7 @@ further comments in _number extended.py. Also see the page "number grammar" on the Unimacro we """ #pylint:disable=C0115, C0116, W0613 -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from dtactions.sendkeys import sendkeys as keystroke import unimacro.natlinkutilsbj as natbj import natlink diff --git a/src/unimacro/UnimacroGrammars/_tags.py b/src/unimacro/UnimacroGrammars/_tags.py index 42a2ce4..9ea77ae 100644 --- a/src/unimacro/UnimacroGrammars/_tags.py +++ b/src/unimacro/UnimacroGrammars/_tags.py @@ -15,9 +15,9 @@ #pylint:disable=C0116, W0603, W0613, W0201, R0912 import natlink import unimacro.natlinkutilsbj as natbj -from dtactions.unimacro import unimacroutils -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions import unimacroutils +from dtactions.unimacroactions import doKeystroke as keystroke +from dtactions.unimacroactions import doAction as action # from dtactions.natlinkclipboard import Clipboard # natlinkclipboard is not safe at the moment. diff --git a/src/unimacro/UnimacroGrammars/_tasks.py b/src/unimacro/UnimacroGrammars/_tasks.py index 4b74a43..aeda21a 100644 --- a/src/unimacro/UnimacroGrammars/_tasks.py +++ b/src/unimacro/UnimacroGrammars/_tasks.py @@ -31,13 +31,13 @@ from natlinkcore import nsformat from natlinkcore import natlinkstatus from unimacro import natlinkutilsbj as natbj -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from dtactions import monitorfunctions -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -from dtactions.unimacro.unimacroactions import setPosition -from dtactions.unimacro.unimacroactions import getPosition -from dtactions.unimacro import unimacroactions as actions +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke +from dtactions.unimacroactions import setPosition +from dtactions.unimacroactions import getPosition +from dtactions import unimacroactions as actions import win32con import win32api diff --git a/src/unimacro/UnimacroGrammars/rememberdialog.py b/src/unimacro/UnimacroGrammars/rememberdialog.py index f37d374..0dbc327 100644 --- a/src/unimacro/UnimacroGrammars/rememberdialog.py +++ b/src/unimacro/UnimacroGrammars/rememberdialog.py @@ -5,7 +5,7 @@ #pylint:disable=W0621 import time import PySimpleGUI as sg -from dtactions.unimacro import inivars +from dtactions import inivars prompt = """Remember in Unimacro _folders grammar""" # readable text text = """Remember folder "C:/DT/NatlinkcoreDoug/src/natlinkcore/SampleMacros" for future calling? diff --git a/src/unimacro/_control.py b/src/unimacro/_control.py index 2a65a69..2f592e1 100644 --- a/src/unimacro/_control.py +++ b/src/unimacro/_control.py @@ -27,8 +27,8 @@ from natlinkcore import loader from natlinkcore import natlinkstatus -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroutils +from dtactions import unimacroactions as actions from unimacro import natlinkutilsbj as natbj from unimacro import spokenforms diff --git a/src/unimacro/enabledictation/_enabledictation.py b/src/unimacro/enabledictation/_enabledictation.py index 0d4d449..8357b22 100644 --- a/src/unimacro/enabledictation/_enabledictation.py +++ b/src/unimacro/enabledictation/_enabledictation.py @@ -59,12 +59,12 @@ defaultWaitTime = 0.2 # change to slow down or speed up actions. import natlink -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj from time import sleep diff --git a/src/unimacro/listdialogs.py b/src/unimacro/listdialogs.py index 5ac2ced..3635e25 100644 --- a/src/unimacro/listdialogs.py +++ b/src/unimacro/listdialogs.py @@ -9,7 +9,7 @@ import win32con import commctrl import win32api -from dtactions.unimacro.unimacroutils import AppBringUp +from dtactions.unimacroutils import AppBringUp from natlinkutilsbj import * status = natlinkstatus.NatlinkStatus() diff --git a/src/unimacro/lynote.py b/src/unimacro/lynote.py index 65c12c7..adee979 100644 --- a/src/unimacro/lynote.py +++ b/src/unimacro/lynote.py @@ -2,7 +2,7 @@ import re import sys import copy -from dtactions.unimacro import utilsqh +from dtactions import utilsqh reNote = re.compile(r"""([a-g](?:as|es|is|s|f)?) # the notename also with flat (bf == b flat, english) ([,']*) # elevation (octave up/down diff --git a/src/unimacro/natlinkutilsbj.py b/src/unimacro/natlinkutilsbj.py index 3eeca94..0e5a31e 100644 --- a/src/unimacro/natlinkutilsbj.py +++ b/src/unimacro/natlinkutilsbj.py @@ -56,14 +56,14 @@ # for IniGrammar: # was natlinkutilsqh: -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroactions as actions -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -from dtactions.unimacro.unimacroactions import UnimacroBringUp -from dtactions.unimacro import utilsqh -from dtactions.unimacro.utilsqh import formatListColumns -from dtactions.unimacro import inivars +from dtactions import unimacroutils +from dtactions import unimacroactions as actions +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke +from dtactions.unimacroactions import UnimacroBringUp +from dtactions import utilsqh +from dtactions.utilsqh import formatListColumns +from dtactions import inivars from dtactions.sendkeys import sendsystemkeys from unimacro import BrowseGrammar diff --git a/src/unimacro/sample_global_dictation/_control.py b/src/unimacro/sample_global_dictation/_control.py index a105fac..933dc9a 100644 --- a/src/unimacro/sample_global_dictation/_control.py +++ b/src/unimacro/sample_global_dictation/_control.py @@ -34,10 +34,10 @@ import natlink from natlinkcore.natlinkutils import * -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import D_ # extra commands for controlling actions module: diff --git a/src/unimacro/sample_global_dictation/_dictationproject.py b/src/unimacro/sample_global_dictation/_dictationproject.py index e5e5c1c..243f942 100644 --- a/src/unimacro/sample_global_dictation/_dictationproject.py +++ b/src/unimacro/sample_global_dictation/_dictationproject.py @@ -56,12 +56,12 @@ defaultWaitTime = 0.2 # change to slow down or speed up actions. import natlink -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj from time import sleep diff --git a/src/unimacro/sample_global_dictation/_global_dictation.py b/src/unimacro/sample_global_dictation/_global_dictation.py index f676528..cc75348 100644 --- a/src/unimacro/sample_global_dictation/_global_dictation.py +++ b/src/unimacro/sample_global_dictation/_global_dictation.py @@ -83,12 +83,12 @@ defaultWaitTime = 0.2 # change to slow down or speed up actions. import natlink -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj from time import sleep diff --git a/src/unimacro/spokenforms.py b/src/unimacro/spokenforms.py index e763e8c..bdc94b6 100644 --- a/src/unimacro/spokenforms.py +++ b/src/unimacro/spokenforms.py @@ -21,8 +21,8 @@ from natlinkcore import natlinkstatus -from dtactions.unimacro import inivars -from dtactions.unimacro import utilsqh +from dtactions import inivars +from dtactions import utilsqh class NumbersError(Exception): pass diff --git a/src/unimacro/unimacro_test/ActionsTest.py b/src/unimacro/unimacro_test/ActionsTest.py index 8b13960..e87c3ee 100644 --- a/src/unimacro/unimacro_test/ActionsTest.py +++ b/src/unimacro/unimacro_test/ActionsTest.py @@ -10,10 +10,10 @@ unimacrodir = Path('./..').normPath() if unimacrodir not in sys.path: sys.path.append(unimacrodir) -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from natlinkcore import natlinkutils import natlink -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions # reload(actions) action = actions.doAction diff --git a/src/unimacro/unimacro_test/BasicTest.py b/src/unimacro/unimacro_test/BasicTest.py index 215ccde..e04974d 100644 --- a/src/unimacro/unimacro_test/BasicTest.py +++ b/src/unimacro/unimacro_test/BasicTest.py @@ -9,8 +9,8 @@ # performed. # from pathlib import Path import unittest -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroutils +from dtactions import unimacroactions as actions from natlinkcore import natlinkutils import TestCaseWithHelpers diff --git a/src/unimacro/unimacro_test/BringupTest.py b/src/unimacro/unimacro_test/BringupTest.py index 14fa70e..d8b42f4 100644 --- a/src/unimacro/unimacro_test/BringupTest.py +++ b/src/unimacro/unimacro_test/BringupTest.py @@ -6,9 +6,9 @@ """ -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions import natlink import unittest import time diff --git a/src/unimacro/unimacro_test/ClipboardTest.py b/src/unimacro/unimacro_test/ClipboardTest.py index 036b5be..5549b39 100644 --- a/src/unimacro/unimacro_test/ClipboardTest.py +++ b/src/unimacro/unimacro_test/ClipboardTest.py @@ -14,11 +14,11 @@ if unimacroDir not in sys.path: print("add unimacroDir to sys.path: %s"% unimacroDir) sys.path.append(unimacroDir) -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from natlinkcore import natlinkutils import time -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions import unittest import UnimacroTestHelpers diff --git a/src/unimacro/unimacro_test/MessageTest.py b/src/unimacro/unimacro_test/MessageTest.py index 8d2fd2f..b50747f 100644 --- a/src/unimacro/unimacro_test/MessageTest.py +++ b/src/unimacro/unimacro_test/MessageTest.py @@ -8,7 +8,7 @@ """ #pylint:disable=C0209 import unittest -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions import natlink import UnimacroTestHelpers diff --git a/src/unimacro/unimacro_test/SearchTest.py b/src/unimacro/unimacro_test/SearchTest.py index eea5fb4..86f1171 100644 --- a/src/unimacro/unimacro_test/SearchTest.py +++ b/src/unimacro/unimacro_test/SearchTest.py @@ -3,9 +3,9 @@ # (c) Copyright 1999 by Joel Gould # Portions (c) Copyright 1999 by Dragon Systems, Inc. # -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions actions.debugActions(1) import unittest diff --git a/src/unimacro/unimacro_test/UnimacroTestHelpers.py b/src/unimacro/unimacro_test/UnimacroTestHelpers.py index 4331718..09054af 100644 --- a/src/unimacro/unimacro_test/UnimacroTestHelpers.py +++ b/src/unimacro/unimacro_test/UnimacroTestHelpers.py @@ -11,13 +11,13 @@ from pprint import pprint import sys -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions import unittest import TestCaseWithHelpers import re import types import natlink -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from natlinkcore import natlinkutils from natlinkcore import natlinkutils diff --git a/src/unimacro/unimacro_test/UtilsTest.py b/src/unimacro/unimacro_test/UtilsTest.py index b67ddf3..b34b7e8 100644 --- a/src/unimacro/unimacro_test/UtilsTest.py +++ b/src/unimacro/unimacro_test/UtilsTest.py @@ -9,9 +9,9 @@ # NaturallySpeaking should be running with nothing in the DragonPad window # (that you want to preserve) before these tests are run. # -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions action = actions.doAction import unittest diff --git a/src/unimacro/unimacro_test/unittestActions.py b/src/unimacro/unimacro_test/unittestActions.py index e4ce84e..0bfaabf 100644 --- a/src/unimacro/unimacro_test/unittestActions.py +++ b/src/unimacro/unimacro_test/unittestActions.py @@ -18,9 +18,9 @@ from pathlib import Path import natlink from natlinkcore import natlinkstatus -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -from dtactions.unimacro import unimacroactions as actions +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke +from dtactions import unimacroactions as actions import TestCaseWithHelpers status = natlinkstatus.NatlinkStatus() diff --git a/src/unimacro/unimacro_test/unittestClipboard.py b/src/unimacro/unimacro_test/unittestClipboard.py index 2c3e9a6..94f3a36 100644 --- a/src/unimacro/unimacro_test/unittestClipboard.py +++ b/src/unimacro/unimacro_test/unittestClipboard.py @@ -24,9 +24,9 @@ import TestCaseWithHelpers import natlink from dtactions import natlinkclipboard -from dtactions.unimacro import unimacroactions as actions -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro import unimacroutils +from dtactions import unimacroactions as actions +from dtactions.unimacroactions import doAction as action +from dtactions import unimacroutils from natlinkcore import natlinkutils class TestError(Exception): diff --git a/src/unimacro/unimacro_test/unittestDocstringGrammar.py b/src/unimacro/unimacro_test/unittestDocstringGrammar.py index 21e99d9..03e143e 100644 --- a/src/unimacro/unimacro_test/unittestDocstringGrammar.py +++ b/src/unimacro/unimacro_test/unittestDocstringGrammar.py @@ -28,11 +28,11 @@ status = natlinkstatus.NatlinkStatus() from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action class TestError(Exception): pass diff --git a/src/unimacro/unimacro_test/unittestIniGrammar.py b/src/unimacro/unimacro_test/unittestIniGrammar.py index 6295b8c..875050f 100644 --- a/src/unimacro/unimacro_test/unittestIniGrammar.py +++ b/src/unimacro/unimacro_test/unittestIniGrammar.py @@ -24,17 +24,17 @@ import natlink from natlinkcore import loader from natlinkcore import natlinkstatus -from dtactions.unimacro import inivars +from dtactions import inivars from natlinkcore.gramparser import GrammarError, GrammarSyntaxError status = natlinkstatus.NatlinkStatus() from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action class TestError(Exception): pass diff --git a/src/unimacro/unimacro_test/unittestMessagefunctions.py b/src/unimacro/unimacro_test/unittestMessagefunctions.py index f2d6bee..db48201 100644 --- a/src/unimacro/unimacro_test/unittestMessagefunctions.py +++ b/src/unimacro/unimacro_test/unittestMessagefunctions.py @@ -34,7 +34,7 @@ import win32gui from dtactions.messagefunctions import * import dtactions.messagefunctions as mess -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from unimacro import windowparameters import TestCaseWithHelpers diff --git a/src/unimacro/unimacro_test/unittestMouse.py b/src/unimacro/unimacro_test/unittestMouse.py index cea70b4..545563f 100644 --- a/src/unimacro/unimacro_test/unittestMouse.py +++ b/src/unimacro/unimacro_test/unittestMouse.py @@ -17,8 +17,8 @@ import os.path import natlink import math -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro import unimacroutils as natqh +from dtactions.unimacroactions import doAction as action +from dtactions import unimacroutils as natqh print('file: %s'% __file__) #need this here (hard coded, sorry) for it can be run without NatSpeak being on extraPaths = r"C:\natlink\unimacro", r"D:\natlink\unimacro" @@ -26,7 +26,7 @@ if os.path.isdir(extraPath): if extraPath not in sys.path: sys.path.append(extraPath) -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import sys import unittest import unittest diff --git a/src/unimacro/unimacro_test/unittestNatlinkutilsqh.py b/src/unimacro/unimacro_test/unittestNatlinkutilsqh.py index 39aff5b..94435f5 100644 --- a/src/unimacro/unimacro_test/unittestNatlinkutilsqh.py +++ b/src/unimacro/unimacro_test/unittestNatlinkutilsqh.py @@ -14,7 +14,7 @@ import os import os.path import natlink -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import TestCaseWithHelpers def getBaseFolder(globalsDict=None): diff --git a/src/unimacro/unimacro_test/unittestNumbersConversion.py b/src/unimacro/unimacro_test/unittestNumbersConversion.py index 65d5277..c7fbf68 100644 --- a/src/unimacro/unimacro_test/unittestNumbersConversion.py +++ b/src/unimacro/unimacro_test/unittestNumbersConversion.py @@ -27,11 +27,11 @@ status = natlinkstatus.NatlinkStatus() from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action class TestError(Exception): pass diff --git a/src/unimacro/unimacro_test/unittestProfileKaiserDictation.py b/src/unimacro/unimacro_test/unittestProfileKaiserDictation.py index cab2b14..8036541 100644 --- a/src/unimacro/unimacro_test/unittestProfileKaiserDictation.py +++ b/src/unimacro/unimacro_test/unittestProfileKaiserDictation.py @@ -28,11 +28,11 @@ status = natlinkstatus.NatlinkStatus() from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action class TestError(Exception): pass diff --git a/src/unimacro/unimacrofoldersremembertemplate.py b/src/unimacro/unimacrofoldersremembertemplate.py index 173b067..28461df 100644 --- a/src/unimacro/unimacrofoldersremembertemplate.py +++ b/src/unimacro/unimacrofoldersremembertemplate.py @@ -5,7 +5,7 @@ #pylint:disable=W0621 import time import PySimpleGUI as sg -from dtactions.unimacro import inivars +from dtactions import inivars prompt = """$prompt$""" # readable text text = """$text$""" # input text, the key of the diff --git a/tests/test_grammar_general.py b/tests/test_grammar_general.py index 70cac8b..62eb32a 100644 --- a/tests/test_grammar_general.py +++ b/tests/test_grammar_general.py @@ -2,8 +2,8 @@ from pathlib import Path import pytest from unimacro.UnimacroGrammars._general import ThisGrammar -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroactions +from dtactions import unimacroutils +from dtactions import unimacroactions thisDir = Path(__file__).parent diff --git a/tests/test_spokenforms.py b/tests/test_spokenforms.py index 0e4e38b..3ec63ad 100644 --- a/tests/test_spokenforms.py +++ b/tests/test_spokenforms.py @@ -9,7 +9,7 @@ import pytest from unimacro import spokenforms -from dtactions.unimacro import inivars +from dtactions import inivars expected_n2s = {0: ['oh', 'zero'], 1: ['on\xe9'], From 4e05bdc2e1978e1b0e045a76eda66cbb817437e8 Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Wed, 9 Oct 2024 17:03:27 +0200 Subject: [PATCH 13/28] rememberdialog.py to .gitignore (is generated) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7788b18..dc0115e 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ README.html /tests/rememberdialog.py /src/unimacro/UnimacroGrammars/rememberdialog.py /src/unimacro/UnimacroGrammars/rememberdialog.py +/src/unimacro/UnimacroGrammars/rememberdialog.py From fe9ebf2aa69053380749a75f150f46ee77d724b1 Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Wed, 9 Oct 2024 17:05:44 +0200 Subject: [PATCH 14/28] and remove the generated file rememberdialog.py --- .../UnimacroGrammars/rememberdialog.py | 51 ------------------- 1 file changed, 51 deletions(-) delete mode 100644 src/unimacro/UnimacroGrammars/rememberdialog.py diff --git a/src/unimacro/UnimacroGrammars/rememberdialog.py b/src/unimacro/UnimacroGrammars/rememberdialog.py deleted file mode 100644 index 0dbc327..0000000 --- a/src/unimacro/UnimacroGrammars/rememberdialog.py +++ /dev/null @@ -1,51 +0,0 @@ -"""template for _folders grammar, remember function. -This template is filled with the actual values and fired. It asks for a spoken form to "remember a given file", this value -is put in the _folders.ini config file. -""" -#pylint:disable=W0621 -import time -import PySimpleGUI as sg -from dtactions import inivars - -prompt = """Remember in Unimacro _folders grammar""" # readable text -text = """Remember folder "C:/DT/NatlinkcoreDoug/src/natlinkcore/SampleMacros" for future calling? - -Please give a spoken form for this folder and choose OK; or Cancel...""" # input text, the key of the -inifile = "C:/Users/Gebruiker/Documents/unimacro_qh/enx_inifiles/_folders.ini" -section = "folders" -value = "C:/DT/NatlinkcoreDoug/src/natlinkcore/SampleMacros" -title = "test" -default = "SampleMacros" -pausetime = 3 # should be replaced by 0 or a positive int value - - - -def InputBox(text, prompt, title, default): - """the dialog, which returns the wanted spoken form""" - layout = [[sg.Text(prompt)], - [sg.InputText(default)], - [sg.OK(), sg.Cancel()]] - - window = sg.Window(title, layout) - - _event, values = window.read() - window.close() - - return values[0] - -if __name__ == "__main__": - result = InputBox(text, prompt, title, default) - if result: - key = result - ini = inivars.IniVars(inifile) - ini.set(section, key, value) - ini.write() - print(f'Wrote "{key} = {value}" to inifile') - print('Call "edit folders" to edit or delete') - else: - print("Action canceled, no change of ini file") - # if pausetime is given, launch as .py, otherwise launch as .pyw: - if pausetime: - # print "sleep: %s"% pausetime - time.sleep(pausetime) - \ No newline at end of file From 776c518b9ef7bc1f8a008ab8ef6f1fccd82fcf87 Mon Sep 17 00:00:00 2001 From: Doug Ransom Date: Thu, 21 Nov 2024 11:35:02 -0800 Subject: [PATCH 15/28] version specifier includes dev releases --- pyproject.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b5ab247..c8c17ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,8 +10,13 @@ version = "4.1.7.dev1" requires-python = ">=3.10" readme = "README.md" +#"dtactions = ^1.6.4" means anything >= 1.6.4.dev1 and less than 1.7. A breaking change in dtactions +#will mean an update the version specifier below. +#https://packaging.python.org/en/latest/specifications/version-specifiers/#id5 +#note you have to put in .dev1 to take the earliest dev release. -dependencies = ["dtactions >= 1.6.2", + +dependencies = ["dtactions ~= 1.6.4.dev1", "debugpy >= 1.2.0", "pywin32 >= 304", "natlinkcore >= 5.4.1", From 93473567b01084acfae5bf46e465c5313e93fe65 Mon Sep 17 00:00:00 2001 From: Doug Ransom Date: Thu, 21 Nov 2024 12:04:12 -0800 Subject: [PATCH 16/28] bump dev version dtactions --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c8c17ad..8c0753c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ readme = "README.md" #note you have to put in .dev1 to take the earliest dev release. -dependencies = ["dtactions ~= 1.6.4.dev1", +dependencies = ["dtactions ~= 1.6.4.dev3", "debugpy >= 1.2.0", "pywin32 >= 304", "natlinkcore >= 5.4.1", From 6df0498c6fd793e134653de1b221fadeead188ad Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Sun, 25 Aug 2024 16:09:47 +0200 Subject: [PATCH 17/28] removed most komodo mentions in sample ini files, also cleaned up actions.ini --- src/unimacro/_control.py | 4 +- src/unimacro/sample_ini/actions.ini | 306 ------------------ .../sample_ini/enx_inifiles/_folders.ini | 1 - .../sample_ini/nld_inifiles/_folders.ini | 2 - 4 files changed, 2 insertions(+), 311 deletions(-) diff --git a/src/unimacro/_control.py b/src/unimacro/_control.py index 482205c..a63204b 100644 --- a/src/unimacro/_control.py +++ b/src/unimacro/_control.py @@ -51,8 +51,7 @@ status = natlinkstatus.NatlinkStatus() natlinkmain = loader.NatlinkMain() ##control_logger=l.getLogger(unimacro_l.control_logger_name()) - - +thisDir = str(Path(__file__).parent) @@ -757,4 +756,5 @@ def checkOriginalFileWithActualTxtPy(name, org_path, txt_path, py_path): utilGrammar.initialize() # set special function as a callback... natlinkmain.set_post_load_callback(utilGrammar.UnimacroControlPostLoad) + print(f'unimacro _ctrl grammar started, directory: "{thisDir}"') # utilGrammar.checkUnimacroGrammars() diff --git a/src/unimacro/sample_ini/actions.ini b/src/unimacro/sample_ini/actions.ini index 5878c6e..ea35ae2 100644 --- a/src/unimacro/sample_ini/actions.ini +++ b/src/unimacro/sample_ini/actions.ini @@ -1,39 +1,8 @@ -[acrord32 child] -pagefinish = -pagestart = {alt+i}{tab} -pagethrough = - - - -[acrord32 top] -filesaveas = {shift+ctrl+s} -pagefinish = -pagestart = {alt+d}ng; VW -pagethrough = -printfinish = {tab 2}{enter 2} -printpreview = -printproperties = {alt+p} -togglefullscreen = {ctrl+l} - - -[bringup chrome] -name = chrome - [bringup dragonpad] name = natspeak -[bringup edit] -ini = komodo -py = komodo -pyw = pythonwin -txt = komodo - - -[bringup emacs] -name = emacs -path = C:\emacs-22.3\bin\runemacs.exe - [bringup email] name = outlook @@ -47,23 +16,6 @@ name = excel name = iexplore -[bringup ibmrad] -args = -product com.ibm.rational.rad.product.v75.ide -name = javaw -path = C:\Program Files\IBM\SDP\eclipse.exe -title = Java - Rational - - -[bringup idle] -args = C:\Python25\Lib\idlelib\idle.pyw -name = pythonw -path = C:\Python25\pythonw.exe - - -[bringup internet] -name = firefox - - [bringup komodo] name = komodo @@ -90,20 +42,6 @@ path = %PROGRAMFILES%\Win32Pad\win32pad.exe name = winword -[bringup xplorer2] -name = xplorer2_uc -path = C:\Program Files\zabkat\xplorer2\xplorer2_UC.exe - - -[cmd] -taskrefresh = {extup}{enter} -killletter = e -keystrokes with systemkeys = all - -[code] -gotoline n = {Ctrl+g}; n{enter} -realhome = {end}{home}{home} - [default] addressfield = {alt+d}; W addressfieldclose = @@ -288,59 +226,6 @@ zoomin = AHK send ^{wheelup};AHK send ^{wheelup} zoomout = AHK send ^{wheeldown};AHK send ^{wheeldown} -[firefox] -keystrokes with systemkeys = none -printdialogselection = {alt+t} -refresh = q{f5} -searchalwayscontinue = T -searchback = {alt+p} -searchfailed = ALERT -searchforward = {alt+n} -searchgo = {alt+n} -startbacksearch = -startsearch = {ctrl+f} -taskrefresh = q{f5} - - -[firefox foutconsole] -taskrefresh = {alt+s} - - -[frescobaldi] -fileopenrecent = {alt+b}r; VW(); {down}; VW() -keystrokes with systemkeys = none - - -[general] -child behaves like top = natspeak: dragon-balk, dragonbar -top behaves like child = winzip64: uitpakken - - -[iexplore] -leftafterbacksearch n = -leftafterforwardsearch n = {extleft n} - -print1peepee = {f5}; <><><><> - - -print2peepee = {f5}; <><><><> - -printproperties = {alt+v} -searchback = {ctrl+f};W;{alt+u}{enter} -searchfailed = ALERT; {esc} -searchgo = {enter};{esc} -startsearch = RW; {ctrl+f}; WTC;{alt+d}{alt+n} - - -[kodakimg] -filesaveas = {alt+b}a - - -[pycharm64] -gotoline n = {Ctrl+g}; W; n;{enter} -lineback = {alt+left} -realhome = {home 2} - [komodo] documentclose = {ctrl+w} @@ -358,9 +243,6 @@ selectioncomment = {ctrl+3} selectionuncomment = {ctrl+shift+3} taskrefresh = {ctrl+w} LW() {shift+ctrl+t} -[minesweeper] -cmdes with systemkeys = all - [natspeak dragonpad] fileopenrecent = {alt+b}{extdown 6} @@ -375,30 +257,10 @@ selectdown n = {shift+extdown n}{shift+extend} selectline = {exthome}{shift+extend} -[natspeak find] -searchgo = {enter}; W; {esc} - - [natspeak messages] taskrefresh = <>; PRINT new messages window -[natspeak opdrachtbewerker] -searchalwayscontinue = T -searchback = -searchfailed = ALERT; {esc} -searchforward = {f3} -searchgo = {enter};{esc} -selectdown n = {shift+extdown n}{shift+extend} -selectline = {exthome}{shift+extend} -startsearch = RW; {ctrl+f}; WTC - - -[natspeak zoeken] -searchgo = {enter}; W; {esc} -windowclose = MSG(switched off for komodo); - - [notepad] duplicate = {ctrl+c}{ctrl+v 2} filesaveas = {alt+b}l @@ -414,160 +276,6 @@ searchfailed = ALERT; {esc} searchforward = {f3} searchgo = {enter};{esc} - -[opera] -addressfield = {f2} -addressfieldclose = {esc} - - -[outlook] -filenameenter = {alt+b} -filenameexit = {tab 2}{alt+b} -keystrokes with systemkeys = none -printdialogselection = {alt+t} -printfinish = {shift+tab 3} -printproperties = {alt+c} -printstart = {ctrl+p}; VW -refresh = {f9} -searchforward = {shift+f4} -startsearch = {f4} -taskrefresh = {f9} - - -[outlook html] -printproperties = {alt+v} - - -[outlook microsoft outlook] -startsearch = {esc}{ctrl+e} - - -[outlook microsoft visual basic for applications] -realhome = {extend}{exthome}{exthome} - - -[pdf24-creator] -filesaveas = {alt}{down 5}{enter} -pagefinish = -pagestart = MP(5, 318, 493); MP(5, 400, 489); {end}{shift+home}{del}; -pagethrough = MP(5, 463, 490); {end}{shift+home}{del}; - - -[positions] -clockx = -40 -clocky = 998 -mousex1 = 21 -mousexdiff = 49 -mousey1 = 1029 -mouseydiff = 0 - - -[positions chrome] -mousex1 = 75 -mousexdiff = 146 -mousey1 = 47 -mouseydiff = 0 - - -[positions komodo] -mousex1 = 97 -mousexdiff = -1 -mousey1 = 168 -mouseydiff = 27 - - -[positions outlook] -mousex1 = 66 -mousexdiff = 21 -mousey1 = 162 -mouseydiff = 25 - - -[psp] -fileopenrecent = {alt+f}{extdown 8} -filesave = SSK {ctrl+s} - - -[python gamera] -fileopen = {alt+f}o - - -[pythonw] -fileopenrecent = {alt+f}r__imp -heardwordemacs = HW Edit that python code - - -[pythonw ---] -taskrefresh = VW; RMP 5, 0.5, 0.5; VW; {alt+s}u - - -[pythonw sitegen] -taskrefresh = VW; {alt+s}u - - -[pythonwin] -fileopenrecent = {alt+f}{down 14} -filesaveas = {alt+f}a -gotoline n = {ctrl+g}; n{enter}; {home} -heardwordemacs = HW Edit that python code -homeafterselection = <>{extup} -printfinish = {tab 2}{enter}; {enter} -printproperties = {alt+g} - -printselection = - {ctrl+c}{ctrl+n}; W; {enter}; {ctrl+v} - {ctrl+p}; {enter}; W 2; {ctrl+f4}; n - -realhome = {alt+exthome} -searchforward = {f3} -selectioncomment = {alt+3} -selectionuncomment = {alt+4} -shiftrealhome = {shift+alt+exthome} -upafterpaste = {up}{home} - - -[soffice] -fileopenrecent = {alt+b}g - - -[sud] -keystrokes with systemkeys = all - - -[textpad] -gotoline n = {ctrl+g}; n{enter} -startsearch = {f5} - - -[tortoiseproc] -ok = {alt+o} - - -[uedit32] -fileopenrecent = {alt+f}ii{extright} -filesaveas = {alt+f}a -gotoline n = {ctrl+g}; n{enter} -lineinsert = <>{extup}{enter}{extup} -printproperties = {alt+g} -realhome = {extend}{exthome 2} -searchalwayscontinue = T -searchback = {ctrl+f3} -searchfailed = ALERT; {esc} -searchforward = {f3} -searchgo = {esc} -searchgoback = {alt+s}bb{enter} -startsearch = {shift+ctrl+i} - - -[uedit32 find in files] -filenameenter = {alt+d} -filenameexit = {enter} - - -[vcledit] -fileopenrecent = {alt+h} - - [win32pad] filesaveas = {shift+ctrl+s} gotoline n = {ctrl+g}; n{enter} @@ -605,20 +313,6 @@ searchalwayscontinue = T searchfailed = ALERT; {esc} searchgo = {enter}{esc} - - -[winzip32 extract] -filenameenter = {alt+x} -filenameexit = {tab}{space}{tab} - - [wordpad] searchgo = {enter}{esc} - -[wxdesigner] -fileopenrecent = {alt+f}{extdown 17} - - -[zshp1020] -taskrefresh = {space} diff --git a/src/unimacro/sample_ini/enx_inifiles/_folders.ini b/src/unimacro/sample_ini/enx_inifiles/_folders.ini index e09b75a..62f9a43 100644 --- a/src/unimacro/sample_ini/enx_inifiles/_folders.ini +++ b/src/unimacro/sample_ini/enx_inifiles/_folders.ini @@ -154,7 +154,6 @@ dictation toolbox = dt [websiteopenprograms] chrome = chrome -edit = komodo firefox = firefox edge = edge komodo = komodo diff --git a/src/unimacro/sample_ini/nld_inifiles/_folders.ini b/src/unimacro/sample_ini/nld_inifiles/_folders.ini index d5f7e62..25b671a 100644 --- a/src/unimacro/sample_ini/nld_inifiles/_folders.ini +++ b/src/unimacro/sample_ini/nld_inifiles/_folders.ini @@ -103,10 +103,8 @@ pf = %PROGRAMFILES% [websiteopenprograms] groom = chrome -eddit = komodo faaierfox = firefox internet explorer = iexplore -komodo = komodo explorer = iexplore [websites] From 7c53e6fdfe461c876d290bbf98060ebe37d824c5 Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Sun, 25 Aug 2024 16:23:53 +0200 Subject: [PATCH 18/28] print line _control.py added, giving version and path of unimacro --- src/unimacro/_control.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/unimacro/_control.py b/src/unimacro/_control.py index a63204b..2a65a69 100644 --- a/src/unimacro/_control.py +++ b/src/unimacro/_control.py @@ -10,7 +10,7 @@ # Author: Bart Jan van Os, Version: 1.0, nov 1999 # starting new version Quintijn Hoogenboom, August 2003, for python3 2023 #pylint:disable=C0115, C0116, W0702, R0904, R0911, R0912, R0914, R0915, W0201, W0613, W0107, C0209, E0601, W0602, C0112 -#pylint:disable=R1735, W0703 +#pylint:disable=R1735, W0703, W1203 #pylint:disable=E1101 import os @@ -32,7 +32,7 @@ from unimacro import natlinkutilsbj as natbj from unimacro import spokenforms - +from unimacro import __version__ as unimacro_version #from unimacro.logger import ulogger @@ -78,8 +78,6 @@ def natlink_loggers() ->dict: The entry point must be a function that returns a logger name. Is the Python 'logging' module. """ - - discovered_eps=meta.entry_points(group='dt.loggers') ulogger.debug('Entry Points for natlink.loggers: %s', discovered_eps) loggers = dict() @@ -752,9 +750,9 @@ def checkOriginalFileWithActualTxtPy(name, org_path, txt_path, py_path): utilGrammar.gotResults_edit(Words, FR) elif __name__.find('.') == -1: # standard startup when Dragon starts: + print(f'Unimacro {unimacro_version} in directory: {thisDir}') utilGrammar = UtilGrammar() utilGrammar.initialize() # set special function as a callback... natlinkmain.set_post_load_callback(utilGrammar.UnimacroControlPostLoad) - print(f'unimacro _ctrl grammar started, directory: "{thisDir}"') # utilGrammar.checkUnimacroGrammars() From 6bfbd56d1bd61a79920026ccf934f11e09a1343a Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Sun, 25 Aug 2024 18:21:03 +0200 Subject: [PATCH 19/28] tidy up unimacro directory a bit... --- src/unimacro/__init__.py.orig | 29 --- src/unimacro/nld_spokenforms.ini | 169 ------------------ src/unimacro/testDialogForDictationGrammar.py | 61 ------- 3 files changed, 259 deletions(-) delete mode 100644 src/unimacro/__init__.py.orig delete mode 100644 src/unimacro/nld_spokenforms.ini delete mode 100644 src/unimacro/testDialogForDictationGrammar.py diff --git a/src/unimacro/__init__.py.orig b/src/unimacro/__init__.py.orig deleted file mode 100644 index 54a825c..0000000 --- a/src/unimacro/__init__.py.orig +++ /dev/null @@ -1,29 +0,0 @@ -"""Unimacro __init__ - - -Note there will be a global variable created in the unimacro module 'ulogger' which is Logging.Logger object named 'natlink.unimacro' -You can always access it by name. It is created in _control.py. - -""" -import os -import sys - -<<<<<<< HEAD -__version__ = '4.1.2' # requires the dtactions 1.5.5, with new sendkeys (from send_input, vocola) -======= -#these functions are in this module so that they can be loaded without loading a lot of unimacro code. -#they could be in a seperate .py file in unimacro to achieve the same (ie not in the control grammar). -#these will possilby be removed since we may not need them to enumerate the grammars and ask for log names. - -def folders_logger_name() -> str: - return "natlink.unimacro.folders" - -def control_logger_name() -> str : - return "natlink.unimacro.control" - -def logname() -> str: - """ Returns the name of the unimacro logger.""" - return "natlink.unimacro" -__version__ = '4.1.5' ->>>>>>> a1a5c814781da86d8d969a35b822123c35dce778 - diff --git a/src/unimacro/nld_spokenforms.ini b/src/unimacro/nld_spokenforms.ini deleted file mode 100644 index 00f49ca..0000000 --- a/src/unimacro/nld_spokenforms.ini +++ /dev/null @@ -1,169 +0,0 @@ -[alphabet] -a = Alpha -b = Bravo -c = Charlie -d = Delta -e = Echo -f = Foxtrot -g = Golf -h = Hotel -i = India -j = Juliet -k = Kilo -l = Lima -m = Mike -n = November -o = Oscar -p = papa -q = Quebec -r = Romeo -s = Sierra -t = Tango -u = Uniform -v = Victor -w = Whiskey -x = X-ray -y = Yankee -z = Zulu - -[abbrevs] -qh = kuhaaa -nld = N L D -enx = E. N. X.; enx - -[extensions] -doc = weurd; doc -docx = weurd; doc X -xls = excel; X L S -xlsx = excel; X L S X -py = pieton; paaiton; P ei -pyw = python; paaiton; pee eiwee -ini = ini; I N I -txt = text; T X T -html = html; H T M L -php = P H P; peehapee -js = javascript; J S -dat = dat -xml = iksemmel - - -[punctuationreverse] -punt = . -uitroepteken = ! -apostrof = "'" -kwoot = '"' -streepje = - -komma = , -vraagteken = ? - -[numbers] -0 = nul -1 = één -10 = tien -100 = honderd -1000 = duizend -10000 = tienduizend -100000 = honderdduizend -1000000 = miljoen -11 = elf -12 = twaalf -13 = dertien -14 = veertien -15 = vijftien -16 = zestien -17 = zeventien -18 = achttien -19 = negentien -2 = twee -20 = twintig -21 = eenentwintig -22 = tweeëntwintig -23 = drieëntwintig -24 = vierentwintig -25 = vijfentwintig -26 = zesentwintig -27 = zevenentwintig -28 = achtentwintig -29 = negenentwintig -3 = drie -30 = dertig -31 = eenendertig -32 = tweeëndertig -33 = drieëndertig -34 = vierendertig -35 = vijfendertig -36 = zesendertig -37 = zevenendertig -38 = achtendertig -39 = negenendertig -4 = vier -40 = veertig -41 = eenenveertig -42 = tweeënveertig -43 = drieënveertig -44 = vierenveertig -45 = vijfenveertig -46 = zesenveertig -47 = zevenenveertig -48 = achtenveertig -49 = negenenveertig -5 = vijf -50 = vijftig -51 = eenenvijftig -52 = tweeënvijftig -53 = drieënvijftig -54 = vierenvijftig -55 = vijfenvijftig -56 = zesenvijftig -57 = zevenenvijftig -58 = achtenvijftig -59 = negenenvijftig -6 = zes -60 = zestig -61 = eenenzestig -62 = tweeënzestig -63 = drieënzestig -64 = vierenzestig -65 = vijfenzestig -66 = zesenzestig -67 = zevenenzestig -68 = achtenzestig -69 = negenenzestig -7 = zeven -70 = zeventig -71 = eenenzeventig -72 = tweeënzeventig -73 = drieënzeventig -74 = vierenzeventig -75 = vijfenzeventig -76 = zesenzeventig -77 = zevenenzeventig -78 = achtenzeventig -79 = negenenzeventig -8 = acht -80 = tachtig -81 = eenentachtig -82 = tweeëntachtig -83 = drieëntachtig -84 = vierentachtig -85 = vijfentachtig -86 = zesentachtig -87 = zevenentachtig -88 = achtentachtig -89 = negenentachtig -9 = negen -90 = negentig -91 = eenennegentig -92 = tweeënnegentig -93 = drieënnegentig -94 = vierennegentig -95 = vijfennegentig -96 = zesennegentig -97 = zevenennegentig -98 = achtennegentig -99 = negenennegentig - - -[prefixes] -hundred = honderd -thousand = duizend diff --git a/src/unimacro/testDialogForDictationGrammar.py b/src/unimacro/testDialogForDictationGrammar.py deleted file mode 100644 index d828c46..0000000 --- a/src/unimacro/testDialogForDictationGrammar.py +++ /dev/null @@ -1,61 +0,0 @@ - -import win32ui -from pywin.mfc.dialog import Dialog - - -def setDialog(): - """setting a dialog which is tested in pythonwin_dict.py, for dictation control - - first example from "Python, programming on win32", O'Reilly, by Mark Hammond and Andy Rhetobinson - chapter 20, page 402 - - second example comes with IDD_LARGE_EDIT, which gives a multiline control. - (No idea how to collect the results, only for testing inside now) - - """ -## d = Dialog(win32ui.IDD_SIMPLE_INPUT) -## IDD_SIMPLE_INPUT (15044) has controls: -## IDC_PROMPT1: 15014 -## IDC_EDIT1: 15008 - -## also to be called with: win32ui.IDC_PROMPT1, giving 15014 -## in the grammar: -## Cwnd = win32ui.GetForegroundWindow() -## self.txt=Cwnd.GetDlgItem(15008) # edit box -##i: 15008, it: object 'PyCEdit' - assoc is 01089070, vi=, notify=0,ch/u=0/0, mh=0, kh=0 -##i: 15014, it: object 'PyCWnd' - assoc is 010DF420, vi=, notify=0,ch/u=0/0, mh=0, kh=0 - - - d = Dialog(win32ui.IDD_LARGE_EDIT) -##i: 1, not working it: object 'PyCButton' - assoc is 01077A70, vi=, notify=0,ch/u=0/0, mh=0, kh=0 -##i: 2, not working it: object 'PyCButton' - assoc is 00BCEC60, vi=, notify=0,ch/u=0/0, mh=0, kh=0 -##i: 15008, it: object 'PyCEdit' - assoc is 00BCECA8, vi=, notify=0,ch/u=0/0, mh=0, kh=0 - -## print 'dir of Dialog: %s'% dir(d) -##dir of Dialog: ['AddDDX', 'CreateWindow', 'DoModal', 'EndDialog', 'GotoDlgCtrl', -## 'HookCommands', 'MapDialogRect', 'OnAttachedObjectDeath', 'OnCancel', -## 'OnDestroy', 'OnInitDialog', 'OnOK', '__del__', '__doc__', '__getattr__', -## '__getitem__', '__init__', '__len__', '__module__', '__nonzero__', -## '__setitem__', '_obj_', 'bHaveInit', 'close', 'dll', 'has_key', -## 'items', 'keys', 'values'] - d.CreateWindow() - print('keys: %s'% list(d.keys())) - print('values: %s'% list(d.values())) - print('items: %s'% list(d.items())) - - # search for dialog items in this window: - for i in range(100000): - try: - it = d.GetDlgItem(i) - print('i: %s, it: %s'% (i, it)) - except: - pass -## print 'IDC_PROMPT2: %s'% win32ui.IDC_PROMPT2 -## print 'IDC_EDIT 2: %s'% win32ui.IDC_EDIT2 -## button = d.GetDlgItem(win32ui.IDC_PROMPT1) -## button.SetWindowText('Hello natpython test dictation grammar') - - -if __name__ == '__main__': - setDialog() - From d9f1a98b8da99817e9621774c9b73ff036aaf804 Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Sun, 25 Aug 2024 18:32:29 +0200 Subject: [PATCH 20/28] add rememberdialog.py to .gitignore --- .gitignore | 1 + src/unimacro/UnimacroGrammars/rememberdialog.py | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 811a9fe..0d6c590 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ __pycache__/ /src/unimacro/UnimacroGrammars/rememberdialog.py /tests/rememberdialog.py /src/unimacro/UnimacroGrammars/rememberdialog.py +/src/unimacro/UnimacroGrammars/rememberdialog.py diff --git a/src/unimacro/UnimacroGrammars/rememberdialog.py b/src/unimacro/UnimacroGrammars/rememberdialog.py index 201338c..f37d374 100644 --- a/src/unimacro/UnimacroGrammars/rememberdialog.py +++ b/src/unimacro/UnimacroGrammars/rememberdialog.py @@ -8,16 +8,14 @@ from dtactions.unimacro import inivars prompt = """Remember in Unimacro _folders grammar""" # readable text -text = """Remember website for future calling? +text = """Remember folder "C:/DT/NatlinkcoreDoug/src/natlinkcore/SampleMacros" for future calling? -- https://pypi.org - - -Please give a spoken form for this website and choose OK; or Cancel...""" # input text, the key of the +Please give a spoken form for this folder and choose OK; or Cancel...""" # input text, the key of the inifile = "C:/Users/Gebruiker/Documents/unimacro_qh/enx_inifiles/_folders.ini" -section = "websites" -value = "https://pypi.org" +section = "folders" +value = "C:/DT/NatlinkcoreDoug/src/natlinkcore/SampleMacros" title = "test" -default = "pypi" +default = "SampleMacros" pausetime = 3 # should be replaced by 0 or a positive int value From bc8ee6ec8c7783415ac1d7b075998f14ec58e7b5 Mon Sep 17 00:00:00 2001 From: Doug Ransom Date: Wed, 28 Aug 2024 09:31:06 -0700 Subject: [PATCH 21/28] Update README.md Added instructions on how to install from github instead of pypi. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 4b48ed4..60ac61e 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,13 @@ with the following. But... when you install Natlink via the natlink installer, and proceed with "Configure Natlink via GUI" or "Configure Natlink via CLI", and choose to activate Unimacro, this "pip" action is automatically performed. +If you want to install directly from github (say to install something between releases a developer is working on). + +``` +pip uninstall unimacro +pip install unimacro@git+https://github.com/dougransom/unimacro@d1cbfb0d9559b9ba656a1d1bb1579f1c2b2562ae +``` +replacing "https://github.com/dougransom/unimacro" with the repository in github you wish to install from and "d1cbfb0d9559b9ba656a1d1bb1579f1c2b2562ae" with the version commit you wish to install. # Location of Grammars From 3386ace6fdf4e92abab3d181ca9875fda45af9e3 Mon Sep 17 00:00:00 2001 From: Doug Ransom Date: Wed, 28 Aug 2024 15:22:52 -0700 Subject: [PATCH 22/28] deleted .orig file, it should not have been checked in. --- pyproject.toml.orig | 71 --------------------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 pyproject.toml.orig diff --git a/pyproject.toml.orig b/pyproject.toml.orig deleted file mode 100644 index f282a2e..0000000 --- a/pyproject.toml.orig +++ /dev/null @@ -1,71 +0,0 @@ -[build-system] -requires = ["flit_core >=2,<4"] -build-backend = "flit_core.buildapi" - -[project] -name = "unimacro" -authors = [{name = "Quintijn Hoogenboom (maintainer)", email = "q.hoogenboom@antenna.nl"}] -dynamic = ["version", "description"] -requires-python = ">=3.10" -readme = "README.md" - - -dependencies = ["dtactions >= 1.5.7", - "debugpy >= 1.2.0", - "pywin32 >= 304", - "natlinkcore >= 5.3.7", - "pysimplegui"] - -classifiers=[ "Development Status :: 4 - Beta", - "Topic :: Multimedia :: Sound/Audio :: Speech", - "Topic :: Scientific/Engineering :: Human Machine Interfaces", - "Environment :: Win32 (MS Windows)", - "Intended Audience :: Developers", - "Operating System :: Microsoft :: Windows", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: Implementation :: CPython", - "Topic :: Multimedia :: Sound/Audio :: Speech", - "Topic :: Software Development :: Libraries :: Python Modules", - ] - -[project.optional-dependencies] -test = [ - "pytest >=7.1.2","flake8" -] -dev = [ - "pyenvutils","entry-point-inspector","build" -] -[project.entry-points."natlink.grammars"] -unimacro_builtins = "unimacro.UnimacroGrammars:locateme" - -[project.entry-points."dt.loggers"] - unimacro ="unimacro:logname" - control="unimacro:control_logger_name" - folders="unimacro:folders_logger_name" - -[tool.pytest.ini_options] -minversion = "7.1.2" -addopts = "--capture=tee-sys " -# very important -#the pythonpath lets pytest load code in your source area -#in addition to that in site-packages etc. -#you may want to run your tests without install natlinkcore with flit or pip -pythonpath = [ -] -testpaths= [ - "tests", - "src/unimacro/unimacro_test" -] -python_files = [ - "unittest*.py", - "test_*.py", - ] - -[project.scripts] - -[project.urls] -homepage = "https://qh.antenna.nl/unimacro/" -repository="https://github.com/dictation-toolbox/unimacro" -source="https://github.com/dictation-toolbox/unimacro" From 040c8dae80e799023163bb1d749f003817153875 Mon Sep 17 00:00:00 2001 From: Doug Ransom Date: Thu, 12 Sep 2024 10:49:46 -0700 Subject: [PATCH 23/28] Moved version number spec to pyroject.toml updated version number according to https://peps.python.org/pep-0440/#summary-of-permitted-suffixes-and-relative-ordering --- pyproject.toml | 3 ++- src/unimacro/__init__.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 58e3978..14c8e2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,8 @@ build-backend = "flit_core.buildapi" [project] name = "unimacro" authors = [{name = "Quintijn Hoogenboom (maintainer)", email = "q.hoogenboom@antenna.nl"}] -dynamic = ["version", "description"] +dynamic = ["description"] +version = "4.1.7.dev1" requires-python = ">=3.10" readme = "README.md" diff --git a/src/unimacro/__init__.py b/src/unimacro/__init__.py index bba47d4..5089ac4 100644 --- a/src/unimacro/__init__.py +++ b/src/unimacro/__init__.py @@ -8,6 +8,9 @@ import os import sys +import importlib.metadata +__version__ = importlib.metadata.version('unimacro') #version set in pyproject.toml now. + def folders_logger_name() -> str: return "natlink.unimacro.folders" @@ -18,4 +21,3 @@ def logname() -> str: """ Returns the name of the unimacro logger.""" return "natlink.unimacro" -__version__ = '4.1.6' From f22e4b8a8b34499a7a524109ec2818814e088234 Mon Sep 17 00:00:00 2001 From: Doug Ransom Date: Thu, 12 Sep 2024 10:55:30 -0700 Subject: [PATCH 24/28] updated pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 14c8e2a..b5ab247 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ dependencies = ["dtactions >= 1.6.2", "natlinkcore >= 5.4.1", "FreeSimpleGUI>=5.1.0"] -classifiers=[ "Development Status :: 4 - Beta", +classifiers=[ "Development Status :: 2 - Pre-Alpha", "Topic :: Multimedia :: Sound/Audio :: Speech", "Topic :: Scientific/Engineering :: Human Machine Interfaces", "Environment :: Win32 (MS Windows)", From 295cded7c06c1bd5793260048a5eaf85674a3d0c Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Wed, 9 Oct 2024 16:33:27 +0200 Subject: [PATCH 25/28] extended import changes from dtactions/unimacro to dtactions directly. Most done, not all... --- .../OtherUnimacroGrammars/_calculator.py | 6 +++--- .../OtherUnimacroGrammars/_keystrokes.py | 8 ++++---- src/unimacro/OtherUnimacroGrammars/_latex.py | 4 ++-- .../OtherUnimacroGrammars/_number extended.py | 8 ++++---- src/unimacro/OtherUnimacroGrammars/_oops.py | 2 +- src/unimacro/OtherUnimacroGrammars/_repeat.py | 4 ++-- .../OtherUnimacroGrammars/_unimacrotest.py | 6 +++--- src/unimacro/OtherUnimacroGrammars/excel.py | 10 +++++----- .../OtherUnimacroGrammars/frescobaldi.py | 10 +++++----- .../OtherUnimacroGrammars/solitaire.py | 2 +- .../xxxxnatspeak_dialog.py | 2 +- src/unimacro/UnimacroGrammars/_brackets.py | 6 +++--- src/unimacro/UnimacroGrammars/_clickbyvoice.py | 6 +++--- .../UnimacroGrammars/_debug_natlink.py.txt | 4 ++-- src/unimacro/UnimacroGrammars/_folders.py | 18 +++++++++--------- src/unimacro/UnimacroGrammars/_general.py | 8 ++++---- src/unimacro/UnimacroGrammars/_lines.py | 8 ++++---- .../UnimacroGrammars/_number simple.py | 2 +- src/unimacro/UnimacroGrammars/_tags.py | 6 +++--- src/unimacro/UnimacroGrammars/_tasks.py | 12 ++++++------ .../UnimacroGrammars/rememberdialog.py | 2 +- src/unimacro/_control.py | 4 ++-- .../enabledictation/_enabledictation.py | 8 ++++---- src/unimacro/listdialogs.py | 2 +- src/unimacro/lynote.py | 2 +- src/unimacro/natlinkutilsbj.py | 16 ++++++++-------- .../sample_global_dictation/_control.py | 4 ++-- .../_dictationproject.py | 8 ++++---- .../_global_dictation.py | 8 ++++---- src/unimacro/spokenforms.py | 4 ++-- src/unimacro/unimacro_test/ActionsTest.py | 4 ++-- src/unimacro/unimacro_test/BasicTest.py | 4 ++-- src/unimacro/unimacro_test/BringupTest.py | 4 ++-- src/unimacro/unimacro_test/ClipboardTest.py | 4 ++-- src/unimacro/unimacro_test/MessageTest.py | 2 +- src/unimacro/unimacro_test/SearchTest.py | 4 ++-- .../unimacro_test/UnimacroTestHelpers.py | 4 ++-- src/unimacro/unimacro_test/UtilsTest.py | 4 ++-- src/unimacro/unimacro_test/unittestActions.py | 6 +++--- .../unimacro_test/unittestClipboard.py | 6 +++--- .../unimacro_test/unittestDocstringGrammar.py | 8 ++++---- .../unimacro_test/unittestIniGrammar.py | 10 +++++----- .../unimacro_test/unittestMessagefunctions.py | 2 +- src/unimacro/unimacro_test/unittestMouse.py | 6 +++--- .../unimacro_test/unittestNatlinkutilsqh.py | 2 +- .../unimacro_test/unittestNumbersConversion.py | 8 ++++---- .../unittestProfileKaiserDictation.py | 8 ++++---- .../unimacrofoldersremembertemplate.py | 2 +- tests/test_grammar_general.py | 4 ++-- tests/test_spokenforms.py | 2 +- 50 files changed, 142 insertions(+), 142 deletions(-) diff --git a/src/unimacro/OtherUnimacroGrammars/_calculator.py b/src/unimacro/OtherUnimacroGrammars/_calculator.py index 46146f9..a6b5fbc 100644 --- a/src/unimacro/OtherUnimacroGrammars/_calculator.py +++ b/src/unimacro/OtherUnimacroGrammars/_calculator.py @@ -35,11 +35,11 @@ the grammars _number simple and _number extended. """ import copy -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action from natlinkcore import natlinkutils as natut -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj ancestor = natbj.IniGrammar diff --git a/src/unimacro/OtherUnimacroGrammars/_keystrokes.py b/src/unimacro/OtherUnimacroGrammars/_keystrokes.py index f413fbc..63e66cc 100644 --- a/src/unimacro/OtherUnimacroGrammars/_keystrokes.py +++ b/src/unimacro/OtherUnimacroGrammars/_keystrokes.py @@ -20,10 +20,10 @@ import sys import copy -from dtactions.unimacro import inivars -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro import unimacroutils +from dtactions import inivars +from dtactions.unimacroactions import doKeystroke as keystroke +from dtactions.unimacroactions import doAction as action +from dtactions import unimacroutils from unimacro import natlinkutilsbj as natbj from natlinkcore import nsformat from natlinkcore import loader diff --git a/src/unimacro/OtherUnimacroGrammars/_latex.py b/src/unimacro/OtherUnimacroGrammars/_latex.py index c231d19..0175afd 100644 --- a/src/unimacro/OtherUnimacroGrammars/_latex.py +++ b/src/unimacro/OtherUnimacroGrammars/_latex.py @@ -15,8 +15,8 @@ import natlink from natlinkcore import nsformat from natlinkcore import natlinkstatus -from dtactions.unimacro import unimacroutils -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions import unimacroutils +from dtactions.unimacroactions import doAction as action from dtactions.sendkeys import sendkeys as keystroke import unimacro.natlinkutilsbj as natbj diff --git a/src/unimacro/OtherUnimacroGrammars/_number extended.py b/src/unimacro/OtherUnimacroGrammars/_number extended.py index 9099ea4..69dd682 100644 --- a/src/unimacro/OtherUnimacroGrammars/_number extended.py +++ b/src/unimacro/OtherUnimacroGrammars/_number extended.py @@ -47,10 +47,10 @@ """ #pylint:disable=C0209, R0904, R0912, R0915 import natlink -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -from dtactions.unimacro.unimacroactions import getMetaAction -from dtactions.unimacro import unimacroutils +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke +from dtactions.unimacroactions import getMetaAction +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj diff --git a/src/unimacro/OtherUnimacroGrammars/_oops.py b/src/unimacro/OtherUnimacroGrammars/_oops.py index 08a799a..1b1c8b9 100644 --- a/src/unimacro/OtherUnimacroGrammars/_oops.py +++ b/src/unimacro/OtherUnimacroGrammars/_oops.py @@ -61,7 +61,7 @@ import natlink from natlinkcore import natlinkstatus from natlinkcore import loader -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj logHour = -1 diff --git a/src/unimacro/OtherUnimacroGrammars/_repeat.py b/src/unimacro/OtherUnimacroGrammars/_repeat.py index 9a56bba..979bdc6 100644 --- a/src/unimacro/OtherUnimacroGrammars/_repeat.py +++ b/src/unimacro/OtherUnimacroGrammars/_repeat.py @@ -41,8 +41,8 @@ import os import os.path from dtactions.sendkeys import sendkeys -from dtactions.unimacro import unimacroutils -# from dtactions.unimacro.unimacroactions import doAction as action +from dtactions import unimacroutils +# from dtactions.unimacroactions import doAction as action import unimacro.natlinkutilsbj as natbj from natlinkcore import natlinkutils from natlinkcore import natlinktimer diff --git a/src/unimacro/OtherUnimacroGrammars/_unimacrotest.py b/src/unimacro/OtherUnimacroGrammars/_unimacrotest.py index c2ad4dc..20ab9bf 100644 --- a/src/unimacro/OtherUnimacroGrammars/_unimacrotest.py +++ b/src/unimacro/OtherUnimacroGrammars/_unimacrotest.py @@ -20,9 +20,9 @@ import natlink from natlinkcore import natlinkstatus import unimacro.natlinkutilsbj as natbj -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import utilsqh -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroutils +from dtactions import utilsqh +from dtactions import unimacroactions as actions status = natlinkstatus.NatlinkStatus() diff --git a/src/unimacro/OtherUnimacroGrammars/excel.py b/src/unimacro/OtherUnimacroGrammars/excel.py index e46ace5..3ebf633 100644 --- a/src/unimacro/OtherUnimacroGrammars/excel.py +++ b/src/unimacro/OtherUnimacroGrammars/excel.py @@ -10,15 +10,15 @@ import natlink -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj import pprint import types -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro import unimacroactions as actions +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions import unimacroactions as actions import win32com # diff --git a/src/unimacro/OtherUnimacroGrammars/frescobaldi.py b/src/unimacro/OtherUnimacroGrammars/frescobaldi.py index 17b8e78..a7e5ffe 100644 --- a/src/unimacro/OtherUnimacroGrammars/frescobaldi.py +++ b/src/unimacro/OtherUnimacroGrammars/frescobaldi.py @@ -47,16 +47,16 @@ """ -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj import natlink -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action from itertools import cycle -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions import re import copy import time diff --git a/src/unimacro/OtherUnimacroGrammars/solitaire.py b/src/unimacro/OtherUnimacroGrammars/solitaire.py index 5b8d7c9..59beb95 100644 --- a/src/unimacro/OtherUnimacroGrammars/solitaire.py +++ b/src/unimacro/OtherUnimacroGrammars/solitaire.py @@ -35,7 +35,7 @@ import win32gui from natlinkcore import natlinktimer -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj #aantal carden en aantal stapelplaatsen: diff --git a/src/unimacro/OtherUnimacroGrammars/xxxxnatspeak_dialog.py b/src/unimacro/OtherUnimacroGrammars/xxxxnatspeak_dialog.py index 45930d8..30150a6 100644 --- a/src/unimacro/OtherUnimacroGrammars/xxxxnatspeak_dialog.py +++ b/src/unimacro/OtherUnimacroGrammars/xxxxnatspeak_dialog.py @@ -9,7 +9,7 @@ # interaction with grammar _folders. # #pylint:disable= -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from dtactions.sendkeys import sendkeys as keystroke import unimacro.natlinkutilsbj as natbj diff --git a/src/unimacro/UnimacroGrammars/_brackets.py b/src/unimacro/UnimacroGrammars/_brackets.py index 71a57b3..128b646 100644 --- a/src/unimacro/UnimacroGrammars/_brackets.py +++ b/src/unimacro/UnimacroGrammars/_brackets.py @@ -32,9 +32,9 @@ """ #pylint:disable=C0115, C0116, W0201, W0613 from natlinkcore import nsformat -from dtactions.unimacro import unimacroutils -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke +from dtactions import unimacroutils +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke # from dtactions.natlinkclipboard import Clipboard import unimacro.natlinkutilsbj as natbj import natlink diff --git a/src/unimacro/UnimacroGrammars/_clickbyvoice.py b/src/unimacro/UnimacroGrammars/_clickbyvoice.py index 26bd705..d07470f 100644 --- a/src/unimacro/UnimacroGrammars/_clickbyvoice.py +++ b/src/unimacro/UnimacroGrammars/_clickbyvoice.py @@ -29,9 +29,9 @@ """ import natlink from unimacro import natlinkutilsbj as natbj -from dtactions.unimacro import unimacroutils -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke +from dtactions import unimacroutils +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke # use extension Click by Voice visiblePause = 0.4 diff --git a/src/unimacro/UnimacroGrammars/_debug_natlink.py.txt b/src/unimacro/UnimacroGrammars/_debug_natlink.py.txt index 95b3a63..b08b6c9 100644 --- a/src/unimacro/UnimacroGrammars/_debug_natlink.py.txt +++ b/src/unimacro/UnimacroGrammars/_debug_natlink.py.txt @@ -11,8 +11,8 @@ from natlinkcore import nsformat # import unimacro.natlinkutilsbj as natbj -# from dtactions.unimacro import unimacroutils -# from dtactions.unimacro.unimacroactions import doAction as action +# from dtactions import unimacroutils +# from dtactions.unimacroactions import doAction as action # ancestor = natbj.IniGrammar #QH1 class DebugGrammar(natlinkutils.GrammarBase): diff --git a/src/unimacro/UnimacroGrammars/_folders.py b/src/unimacro/UnimacroGrammars/_folders.py index bf0fdbb..92e6119 100644 --- a/src/unimacro/UnimacroGrammars/_folders.py +++ b/src/unimacro/UnimacroGrammars/_folders.py @@ -61,17 +61,17 @@ from natlinkcore import readwritefile from natlinkcore import natlinktimer from natlinkcore import natlinkstatus -from dtactions.unimacro import extenvvars +from dtactions import extenvvars from dtactions import messagefunctions as mess from dtactions import natlinkclipboard -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -# from dtactions.unimacro.unimacroactions import do_YESNO as YesNo -from dtactions.unimacro.unimacroactions import UnimacroBringUp -from dtactions.unimacro.unimacroactions import Message -from dtactions.unimacro import unimacroutils -# from dtactions.unimacro.unimacroactions import Message -# from dtactions.unimacro import unimacroactions as actions +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke +# from dtactions.unimacroactions import do_YESNO as YesNo +from dtactions.unimacroactions import UnimacroBringUp +from dtactions.unimacroactions import Message +from dtactions import unimacroutils +# from dtactions.unimacroactions import Message +# from dtactions import unimacroactions as actions from unimacro import natlinkutilsbj as natbj # from unimacro.unimacro_wxpythondialogs import InputBox # import natlinkcore.natlinkutils as natut diff --git a/src/unimacro/UnimacroGrammars/_general.py b/src/unimacro/UnimacroGrammars/_general.py index 735c6af..2ba1b57 100644 --- a/src/unimacro/UnimacroGrammars/_general.py +++ b/src/unimacro/UnimacroGrammars/_general.py @@ -32,10 +32,10 @@ from unimacro import natlinkutilsbj as natbj from unimacro import namelist # for name phrases -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -from dtactions.unimacro import unimacroactions as actions -from dtactions.unimacro import unimacroutils +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke +from dtactions import unimacroactions as actions +from dtactions import unimacroutils # taskswitching moved to _tasks.py (july 2006) diff --git a/src/unimacro/UnimacroGrammars/_lines.py b/src/unimacro/UnimacroGrammars/_lines.py index 8cc066b..33fafaf 100644 --- a/src/unimacro/UnimacroGrammars/_lines.py +++ b/src/unimacro/UnimacroGrammars/_lines.py @@ -46,11 +46,11 @@ import natlink from natlinkcore import natlinkutils import unimacro.natlinkutilsbj as natbj -from dtactions.unimacro import inivars -from dtactions.unimacro import unimacroutils -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions import inivars +from dtactions import unimacroutils +from dtactions.unimacroactions import doAction as action from dtactions.sendkeys import sendkeys as keystroke -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions class LinesError(Exception): pass diff --git a/src/unimacro/UnimacroGrammars/_number simple.py b/src/unimacro/UnimacroGrammars/_number simple.py index bce602a..16fc9a8 100644 --- a/src/unimacro/UnimacroGrammars/_number simple.py +++ b/src/unimacro/UnimacroGrammars/_number simple.py @@ -23,7 +23,7 @@ further comments in _number extended.py. Also see the page "number grammar" on the Unimacro we """ #pylint:disable=C0115, C0116, W0613 -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from dtactions.sendkeys import sendkeys as keystroke import unimacro.natlinkutilsbj as natbj import natlink diff --git a/src/unimacro/UnimacroGrammars/_tags.py b/src/unimacro/UnimacroGrammars/_tags.py index 42a2ce4..9ea77ae 100644 --- a/src/unimacro/UnimacroGrammars/_tags.py +++ b/src/unimacro/UnimacroGrammars/_tags.py @@ -15,9 +15,9 @@ #pylint:disable=C0116, W0603, W0613, W0201, R0912 import natlink import unimacro.natlinkutilsbj as natbj -from dtactions.unimacro import unimacroutils -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions import unimacroutils +from dtactions.unimacroactions import doKeystroke as keystroke +from dtactions.unimacroactions import doAction as action # from dtactions.natlinkclipboard import Clipboard # natlinkclipboard is not safe at the moment. diff --git a/src/unimacro/UnimacroGrammars/_tasks.py b/src/unimacro/UnimacroGrammars/_tasks.py index 4b74a43..aeda21a 100644 --- a/src/unimacro/UnimacroGrammars/_tasks.py +++ b/src/unimacro/UnimacroGrammars/_tasks.py @@ -31,13 +31,13 @@ from natlinkcore import nsformat from natlinkcore import natlinkstatus from unimacro import natlinkutilsbj as natbj -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from dtactions import monitorfunctions -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -from dtactions.unimacro.unimacroactions import setPosition -from dtactions.unimacro.unimacroactions import getPosition -from dtactions.unimacro import unimacroactions as actions +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke +from dtactions.unimacroactions import setPosition +from dtactions.unimacroactions import getPosition +from dtactions import unimacroactions as actions import win32con import win32api diff --git a/src/unimacro/UnimacroGrammars/rememberdialog.py b/src/unimacro/UnimacroGrammars/rememberdialog.py index f37d374..0dbc327 100644 --- a/src/unimacro/UnimacroGrammars/rememberdialog.py +++ b/src/unimacro/UnimacroGrammars/rememberdialog.py @@ -5,7 +5,7 @@ #pylint:disable=W0621 import time import PySimpleGUI as sg -from dtactions.unimacro import inivars +from dtactions import inivars prompt = """Remember in Unimacro _folders grammar""" # readable text text = """Remember folder "C:/DT/NatlinkcoreDoug/src/natlinkcore/SampleMacros" for future calling? diff --git a/src/unimacro/_control.py b/src/unimacro/_control.py index 2a65a69..2f592e1 100644 --- a/src/unimacro/_control.py +++ b/src/unimacro/_control.py @@ -27,8 +27,8 @@ from natlinkcore import loader from natlinkcore import natlinkstatus -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroutils +from dtactions import unimacroactions as actions from unimacro import natlinkutilsbj as natbj from unimacro import spokenforms diff --git a/src/unimacro/enabledictation/_enabledictation.py b/src/unimacro/enabledictation/_enabledictation.py index 0d4d449..8357b22 100644 --- a/src/unimacro/enabledictation/_enabledictation.py +++ b/src/unimacro/enabledictation/_enabledictation.py @@ -59,12 +59,12 @@ defaultWaitTime = 0.2 # change to slow down or speed up actions. import natlink -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj from time import sleep diff --git a/src/unimacro/listdialogs.py b/src/unimacro/listdialogs.py index 5ac2ced..3635e25 100644 --- a/src/unimacro/listdialogs.py +++ b/src/unimacro/listdialogs.py @@ -9,7 +9,7 @@ import win32con import commctrl import win32api -from dtactions.unimacro.unimacroutils import AppBringUp +from dtactions.unimacroutils import AppBringUp from natlinkutilsbj import * status = natlinkstatus.NatlinkStatus() diff --git a/src/unimacro/lynote.py b/src/unimacro/lynote.py index 65c12c7..adee979 100644 --- a/src/unimacro/lynote.py +++ b/src/unimacro/lynote.py @@ -2,7 +2,7 @@ import re import sys import copy -from dtactions.unimacro import utilsqh +from dtactions import utilsqh reNote = re.compile(r"""([a-g](?:as|es|is|s|f)?) # the notename also with flat (bf == b flat, english) ([,']*) # elevation (octave up/down diff --git a/src/unimacro/natlinkutilsbj.py b/src/unimacro/natlinkutilsbj.py index 3eeca94..0e5a31e 100644 --- a/src/unimacro/natlinkutilsbj.py +++ b/src/unimacro/natlinkutilsbj.py @@ -56,14 +56,14 @@ # for IniGrammar: # was natlinkutilsqh: -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroactions as actions -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -from dtactions.unimacro.unimacroactions import UnimacroBringUp -from dtactions.unimacro import utilsqh -from dtactions.unimacro.utilsqh import formatListColumns -from dtactions.unimacro import inivars +from dtactions import unimacroutils +from dtactions import unimacroactions as actions +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke +from dtactions.unimacroactions import UnimacroBringUp +from dtactions import utilsqh +from dtactions.utilsqh import formatListColumns +from dtactions import inivars from dtactions.sendkeys import sendsystemkeys from unimacro import BrowseGrammar diff --git a/src/unimacro/sample_global_dictation/_control.py b/src/unimacro/sample_global_dictation/_control.py index a105fac..933dc9a 100644 --- a/src/unimacro/sample_global_dictation/_control.py +++ b/src/unimacro/sample_global_dictation/_control.py @@ -34,10 +34,10 @@ import natlink from natlinkcore.natlinkutils import * -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import D_ # extra commands for controlling actions module: diff --git a/src/unimacro/sample_global_dictation/_dictationproject.py b/src/unimacro/sample_global_dictation/_dictationproject.py index e5e5c1c..243f942 100644 --- a/src/unimacro/sample_global_dictation/_dictationproject.py +++ b/src/unimacro/sample_global_dictation/_dictationproject.py @@ -56,12 +56,12 @@ defaultWaitTime = 0.2 # change to slow down or speed up actions. import natlink -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj from time import sleep diff --git a/src/unimacro/sample_global_dictation/_global_dictation.py b/src/unimacro/sample_global_dictation/_global_dictation.py index f676528..cc75348 100644 --- a/src/unimacro/sample_global_dictation/_global_dictation.py +++ b/src/unimacro/sample_global_dictation/_global_dictation.py @@ -83,12 +83,12 @@ defaultWaitTime = 0.2 # change to slow down or speed up actions. import natlink -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj from time import sleep diff --git a/src/unimacro/spokenforms.py b/src/unimacro/spokenforms.py index e763e8c..bdc94b6 100644 --- a/src/unimacro/spokenforms.py +++ b/src/unimacro/spokenforms.py @@ -21,8 +21,8 @@ from natlinkcore import natlinkstatus -from dtactions.unimacro import inivars -from dtactions.unimacro import utilsqh +from dtactions import inivars +from dtactions import utilsqh class NumbersError(Exception): pass diff --git a/src/unimacro/unimacro_test/ActionsTest.py b/src/unimacro/unimacro_test/ActionsTest.py index 8b13960..e87c3ee 100644 --- a/src/unimacro/unimacro_test/ActionsTest.py +++ b/src/unimacro/unimacro_test/ActionsTest.py @@ -10,10 +10,10 @@ unimacrodir = Path('./..').normPath() if unimacrodir not in sys.path: sys.path.append(unimacrodir) -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from natlinkcore import natlinkutils import natlink -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions # reload(actions) action = actions.doAction diff --git a/src/unimacro/unimacro_test/BasicTest.py b/src/unimacro/unimacro_test/BasicTest.py index 215ccde..e04974d 100644 --- a/src/unimacro/unimacro_test/BasicTest.py +++ b/src/unimacro/unimacro_test/BasicTest.py @@ -9,8 +9,8 @@ # performed. # from pathlib import Path import unittest -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroutils +from dtactions import unimacroactions as actions from natlinkcore import natlinkutils import TestCaseWithHelpers diff --git a/src/unimacro/unimacro_test/BringupTest.py b/src/unimacro/unimacro_test/BringupTest.py index 14fa70e..d8b42f4 100644 --- a/src/unimacro/unimacro_test/BringupTest.py +++ b/src/unimacro/unimacro_test/BringupTest.py @@ -6,9 +6,9 @@ """ -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions import natlink import unittest import time diff --git a/src/unimacro/unimacro_test/ClipboardTest.py b/src/unimacro/unimacro_test/ClipboardTest.py index 036b5be..5549b39 100644 --- a/src/unimacro/unimacro_test/ClipboardTest.py +++ b/src/unimacro/unimacro_test/ClipboardTest.py @@ -14,11 +14,11 @@ if unimacroDir not in sys.path: print("add unimacroDir to sys.path: %s"% unimacroDir) sys.path.append(unimacroDir) -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from natlinkcore import natlinkutils import time -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions import unittest import UnimacroTestHelpers diff --git a/src/unimacro/unimacro_test/MessageTest.py b/src/unimacro/unimacro_test/MessageTest.py index 8d2fd2f..b50747f 100644 --- a/src/unimacro/unimacro_test/MessageTest.py +++ b/src/unimacro/unimacro_test/MessageTest.py @@ -8,7 +8,7 @@ """ #pylint:disable=C0209 import unittest -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions import natlink import UnimacroTestHelpers diff --git a/src/unimacro/unimacro_test/SearchTest.py b/src/unimacro/unimacro_test/SearchTest.py index eea5fb4..86f1171 100644 --- a/src/unimacro/unimacro_test/SearchTest.py +++ b/src/unimacro/unimacro_test/SearchTest.py @@ -3,9 +3,9 @@ # (c) Copyright 1999 by Joel Gould # Portions (c) Copyright 1999 by Dragon Systems, Inc. # -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions actions.debugActions(1) import unittest diff --git a/src/unimacro/unimacro_test/UnimacroTestHelpers.py b/src/unimacro/unimacro_test/UnimacroTestHelpers.py index 4331718..09054af 100644 --- a/src/unimacro/unimacro_test/UnimacroTestHelpers.py +++ b/src/unimacro/unimacro_test/UnimacroTestHelpers.py @@ -11,13 +11,13 @@ from pprint import pprint import sys -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions import unittest import TestCaseWithHelpers import re import types import natlink -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from natlinkcore import natlinkutils from natlinkcore import natlinkutils diff --git a/src/unimacro/unimacro_test/UtilsTest.py b/src/unimacro/unimacro_test/UtilsTest.py index b67ddf3..b34b7e8 100644 --- a/src/unimacro/unimacro_test/UtilsTest.py +++ b/src/unimacro/unimacro_test/UtilsTest.py @@ -9,9 +9,9 @@ # NaturallySpeaking should be running with nothing in the DragonPad window # (that you want to preserve) before these tests are run. # -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroactions as actions +from dtactions import unimacroactions as actions action = actions.doAction import unittest diff --git a/src/unimacro/unimacro_test/unittestActions.py b/src/unimacro/unimacro_test/unittestActions.py index e4ce84e..0bfaabf 100644 --- a/src/unimacro/unimacro_test/unittestActions.py +++ b/src/unimacro/unimacro_test/unittestActions.py @@ -18,9 +18,9 @@ from pathlib import Path import natlink from natlinkcore import natlinkstatus -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doKeystroke as keystroke -from dtactions.unimacro import unimacroactions as actions +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doKeystroke as keystroke +from dtactions import unimacroactions as actions import TestCaseWithHelpers status = natlinkstatus.NatlinkStatus() diff --git a/src/unimacro/unimacro_test/unittestClipboard.py b/src/unimacro/unimacro_test/unittestClipboard.py index 2c3e9a6..94f3a36 100644 --- a/src/unimacro/unimacro_test/unittestClipboard.py +++ b/src/unimacro/unimacro_test/unittestClipboard.py @@ -24,9 +24,9 @@ import TestCaseWithHelpers import natlink from dtactions import natlinkclipboard -from dtactions.unimacro import unimacroactions as actions -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro import unimacroutils +from dtactions import unimacroactions as actions +from dtactions.unimacroactions import doAction as action +from dtactions import unimacroutils from natlinkcore import natlinkutils class TestError(Exception): diff --git a/src/unimacro/unimacro_test/unittestDocstringGrammar.py b/src/unimacro/unimacro_test/unittestDocstringGrammar.py index 21e99d9..03e143e 100644 --- a/src/unimacro/unimacro_test/unittestDocstringGrammar.py +++ b/src/unimacro/unimacro_test/unittestDocstringGrammar.py @@ -28,11 +28,11 @@ status = natlinkstatus.NatlinkStatus() from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action class TestError(Exception): pass diff --git a/src/unimacro/unimacro_test/unittestIniGrammar.py b/src/unimacro/unimacro_test/unittestIniGrammar.py index 6295b8c..875050f 100644 --- a/src/unimacro/unimacro_test/unittestIniGrammar.py +++ b/src/unimacro/unimacro_test/unittestIniGrammar.py @@ -24,17 +24,17 @@ import natlink from natlinkcore import loader from natlinkcore import natlinkstatus -from dtactions.unimacro import inivars +from dtactions import inivars from natlinkcore.gramparser import GrammarError, GrammarSyntaxError status = natlinkstatus.NatlinkStatus() from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action class TestError(Exception): pass diff --git a/src/unimacro/unimacro_test/unittestMessagefunctions.py b/src/unimacro/unimacro_test/unittestMessagefunctions.py index f2d6bee..db48201 100644 --- a/src/unimacro/unimacro_test/unittestMessagefunctions.py +++ b/src/unimacro/unimacro_test/unittestMessagefunctions.py @@ -34,7 +34,7 @@ import win32gui from dtactions.messagefunctions import * import dtactions.messagefunctions as mess -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils from unimacro import windowparameters import TestCaseWithHelpers diff --git a/src/unimacro/unimacro_test/unittestMouse.py b/src/unimacro/unimacro_test/unittestMouse.py index cea70b4..545563f 100644 --- a/src/unimacro/unimacro_test/unittestMouse.py +++ b/src/unimacro/unimacro_test/unittestMouse.py @@ -17,8 +17,8 @@ import os.path import natlink import math -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro import unimacroutils as natqh +from dtactions.unimacroactions import doAction as action +from dtactions import unimacroutils as natqh print('file: %s'% __file__) #need this here (hard coded, sorry) for it can be run without NatSpeak being on extraPaths = r"C:\natlink\unimacro", r"D:\natlink\unimacro" @@ -26,7 +26,7 @@ if os.path.isdir(extraPath): if extraPath not in sys.path: sys.path.append(extraPath) -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import sys import unittest import unittest diff --git a/src/unimacro/unimacro_test/unittestNatlinkutilsqh.py b/src/unimacro/unimacro_test/unittestNatlinkutilsqh.py index 39aff5b..94435f5 100644 --- a/src/unimacro/unimacro_test/unittestNatlinkutilsqh.py +++ b/src/unimacro/unimacro_test/unittestNatlinkutilsqh.py @@ -14,7 +14,7 @@ import os import os.path import natlink -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils import TestCaseWithHelpers def getBaseFolder(globalsDict=None): diff --git a/src/unimacro/unimacro_test/unittestNumbersConversion.py b/src/unimacro/unimacro_test/unittestNumbersConversion.py index 65d5277..c7fbf68 100644 --- a/src/unimacro/unimacro_test/unittestNumbersConversion.py +++ b/src/unimacro/unimacro_test/unittestNumbersConversion.py @@ -27,11 +27,11 @@ status = natlinkstatus.NatlinkStatus() from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action class TestError(Exception): pass diff --git a/src/unimacro/unimacro_test/unittestProfileKaiserDictation.py b/src/unimacro/unimacro_test/unittestProfileKaiserDictation.py index cab2b14..8036541 100644 --- a/src/unimacro/unimacro_test/unittestProfileKaiserDictation.py +++ b/src/unimacro/unimacro_test/unittestProfileKaiserDictation.py @@ -28,11 +28,11 @@ status = natlinkstatus.NatlinkStatus() from natlinkcore import natlinkutils -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroutils +from dtactions import unimacroutils +from dtactions import unimacroutils import unimacro.natlinkutilsbj as natbj -from dtactions.unimacro.unimacroactions import doAction as action -from dtactions.unimacro.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action +from dtactions.unimacroactions import doAction as action class TestError(Exception): pass diff --git a/src/unimacro/unimacrofoldersremembertemplate.py b/src/unimacro/unimacrofoldersremembertemplate.py index 173b067..28461df 100644 --- a/src/unimacro/unimacrofoldersremembertemplate.py +++ b/src/unimacro/unimacrofoldersremembertemplate.py @@ -5,7 +5,7 @@ #pylint:disable=W0621 import time import PySimpleGUI as sg -from dtactions.unimacro import inivars +from dtactions import inivars prompt = """$prompt$""" # readable text text = """$text$""" # input text, the key of the diff --git a/tests/test_grammar_general.py b/tests/test_grammar_general.py index 70cac8b..62eb32a 100644 --- a/tests/test_grammar_general.py +++ b/tests/test_grammar_general.py @@ -2,8 +2,8 @@ from pathlib import Path import pytest from unimacro.UnimacroGrammars._general import ThisGrammar -from dtactions.unimacro import unimacroutils -from dtactions.unimacro import unimacroactions +from dtactions import unimacroutils +from dtactions import unimacroactions thisDir = Path(__file__).parent diff --git a/tests/test_spokenforms.py b/tests/test_spokenforms.py index 0e4e38b..3ec63ad 100644 --- a/tests/test_spokenforms.py +++ b/tests/test_spokenforms.py @@ -9,7 +9,7 @@ import pytest from unimacro import spokenforms -from dtactions.unimacro import inivars +from dtactions import inivars expected_n2s = {0: ['oh', 'zero'], 1: ['on\xe9'], From 75b9ace3b487f4bc737058ec347897905642f19a Mon Sep 17 00:00:00 2001 From: Doug Ransom Date: Mon, 23 Sep 2024 09:46:07 -0700 Subject: [PATCH 26/28] better way of specifying package name --- src/unimacro/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unimacro/__init__.py b/src/unimacro/__init__.py index 5089ac4..b3bd50d 100644 --- a/src/unimacro/__init__.py +++ b/src/unimacro/__init__.py @@ -9,7 +9,7 @@ import sys import importlib.metadata -__version__ = importlib.metadata.version('unimacro') #version set in pyproject.toml now. +__version__ = importlib.metadata.version(__package__) #version set in pyproject.toml now. def folders_logger_name() -> str: return "natlink.unimacro.folders" From dd2ec1fae035ac3ebdfa4fd079983166d4a30816 Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Wed, 9 Oct 2024 17:03:27 +0200 Subject: [PATCH 27/28] rememberdialog.py to .gitignore (is generated) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0d6c590..81b101e 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ __pycache__/ /tests/rememberdialog.py /src/unimacro/UnimacroGrammars/rememberdialog.py /src/unimacro/UnimacroGrammars/rememberdialog.py +/src/unimacro/UnimacroGrammars/rememberdialog.py From 3aecef6b0d30d585327ffd228673fadb1f21754a Mon Sep 17 00:00:00 2001 From: Quintijn Hoogenboom Date: Wed, 9 Oct 2024 17:05:44 +0200 Subject: [PATCH 28/28] and remove the generated file rememberdialog.py --- .../UnimacroGrammars/rememberdialog.py | 51 ------------------- 1 file changed, 51 deletions(-) delete mode 100644 src/unimacro/UnimacroGrammars/rememberdialog.py diff --git a/src/unimacro/UnimacroGrammars/rememberdialog.py b/src/unimacro/UnimacroGrammars/rememberdialog.py deleted file mode 100644 index 0dbc327..0000000 --- a/src/unimacro/UnimacroGrammars/rememberdialog.py +++ /dev/null @@ -1,51 +0,0 @@ -"""template for _folders grammar, remember function. -This template is filled with the actual values and fired. It asks for a spoken form to "remember a given file", this value -is put in the _folders.ini config file. -""" -#pylint:disable=W0621 -import time -import PySimpleGUI as sg -from dtactions import inivars - -prompt = """Remember in Unimacro _folders grammar""" # readable text -text = """Remember folder "C:/DT/NatlinkcoreDoug/src/natlinkcore/SampleMacros" for future calling? - -Please give a spoken form for this folder and choose OK; or Cancel...""" # input text, the key of the -inifile = "C:/Users/Gebruiker/Documents/unimacro_qh/enx_inifiles/_folders.ini" -section = "folders" -value = "C:/DT/NatlinkcoreDoug/src/natlinkcore/SampleMacros" -title = "test" -default = "SampleMacros" -pausetime = 3 # should be replaced by 0 or a positive int value - - - -def InputBox(text, prompt, title, default): - """the dialog, which returns the wanted spoken form""" - layout = [[sg.Text(prompt)], - [sg.InputText(default)], - [sg.OK(), sg.Cancel()]] - - window = sg.Window(title, layout) - - _event, values = window.read() - window.close() - - return values[0] - -if __name__ == "__main__": - result = InputBox(text, prompt, title, default) - if result: - key = result - ini = inivars.IniVars(inifile) - ini.set(section, key, value) - ini.write() - print(f'Wrote "{key} = {value}" to inifile') - print('Call "edit folders" to edit or delete') - else: - print("Action canceled, no change of ini file") - # if pausetime is given, launch as .py, otherwise launch as .pyw: - if pausetime: - # print "sleep: %s"% pausetime - time.sleep(pausetime) - \ No newline at end of file