From 333ac59cc6508343d4c493167d8789e06a40f2ab Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 25 Mar 2018 16:20:12 +0200 Subject: [PATCH] add -e flag --- src/fenrirscreenreader/core/fenrirManager.py | 1 + src/fenrirscreenreader/core/settingsManager.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/fenrirscreenreader/core/fenrirManager.py b/src/fenrirscreenreader/core/fenrirManager.py index c8c5ba66..bfeaa8cf 100644 --- a/src/fenrirscreenreader/core/fenrirManager.py +++ b/src/fenrirscreenreader/core/fenrirManager.py @@ -40,6 +40,7 @@ class fenrirManager(): parser.add_argument('-o', '--options', metavar='SECTION#SETTING=VALUE,..', default='', help='Overwrite options in given settings file') parser.add_argument('-d', '--debug', action='store_true', help='Turns on Debugmode') parser.add_argument('-p', '--print', action='store_true', help='Print debug messages on screen') + parser.add_argument('-e', '--emulation', action='store_true', help='Use PTY emulation') try: args = parser.parse_args() except Exception as e: diff --git a/src/fenrirscreenreader/core/settingsManager.py b/src/fenrirscreenreader/core/settingsManager.py index 70b3850e..33663094 100644 --- a/src/fenrirscreenreader/core/settingsManager.py +++ b/src/fenrirscreenreader/core/settingsManager.py @@ -292,7 +292,11 @@ class settingsManager(): self.setOptionArgDict('general', 'debugLevel', 3) if cliArgs.print: self.setOptionArgDict('general', 'debugLevel', 3) - self.setOptionArgDict('general', 'debugMode', 'PRINT') + self.setOptionArgDict('general', 'debugMode', 'PRINT') + if cliArgs.emulation: + self.setOptionArgDict('screen', 'driver', 'ptyDriver') + self.setOptionArgDict('keyboard', 'driver', 'dummyDriver') + self.setOptionArgDict('general', 'debugFile', '/tmp/fenrir-pty.log') self.setFenrirKeys(self.getSetting('general','fenrirKeys')) self.setScriptKeys(self.getSetting('general','scriptKeys'))