def getCommandLineProfile(self): clParams = getCommandLineParameters() if IZAppCommandLineParameterKeys.ZCMD_KEY_PROFILE in clParams: path = clParams[IZAppCommandLineParameterKeys.ZCMD_KEY_PROFILE] if os.path.isdir(path): return ZSimpleProfileModel(path) return None
def checkCmdLineForBlogThis(): cmdLineParams = getCommandLineParameters() if u"blogthis" in cmdLineParams: #$NON-NLS-1$ title = cmdLineParams[u"title"] #$NON-NLS-1$ url = cmdLineParams[u"url"] #$NON-NLS-1$ text = cmdLineParams[u"text"] #$NON-NLS-1$ file = cmdLineParams[u"file"] #$NON-NLS-1$ author = cmdLineParams[u"author"] #$NON-NLS-1$ format = cmdLineParams[u"format"] #$NON-NLS-1$ isAutoDiscover = cmdLineParams[u"autodiscover"] #$NON-NLS-1$ isQuoted = cmdLineParams[u"quote"] #$NON-NLS-1$ return ZBlogThisInformation(title, url, text, file, author, format, isAutoDiscover, isQuoted) return None
def isPortableEnabled(): u"""Returns true if the --portable command line option is set to enabled.""" #$NON-NLS-1$ global PORTABLE_ENABLED if PORTABLE_ENABLED is None: PORTABLE_ENABLED = False # If the OS Util thinks we're installed as a portable app, then it is # probably true, unless overridden by the cmd line. osutil = getOSUtil() if osutil.isInstalledAsPortable(): PORTABLE_ENABLED = True # The command line parameter can always override the value. cmdLineParams = getCommandLineParameters() if cmdLineParams is not None and u"portable" in cmdLineParams: #$NON-NLS-1$ PORTABLE_ENABLED = cmdLineParams[u"portable"] == u"true" #$NON-NLS-1$ #$NON-NLS-2$ return PORTABLE_ENABLED
def isPortableEnabled(): u"""Returns true if the --portable command line option is set to enabled.""" #$NON-NLS-1$ global PORTABLE_ENABLED if PORTABLE_ENABLED is None: PORTABLE_ENABLED = False # If the OS Util thinks we're installed as a portable app, then it is # probably true, unless overridden by the cmd line. osutil = getOSUtil() if osutil.isInstalledAsPortable(): PORTABLE_ENABLED = True # The command line parameter can always override the value. cmdLineParams = getCommandLineParameters() if cmdLineParams is not None and u"portable" in cmdLineParams: #$NON-NLS-1$ PORTABLE_ENABLED = cmdLineParams[ u"portable"] == u"true" #$NON-NLS-1$ #$NON-NLS-2$ return PORTABLE_ENABLED
def _getCmdLineInstallDirectory(self): cmdLineParams = getCommandLineParameters() if u"installdir" in cmdLineParams: #$NON-NLS-1$ return cmdLineParams[u"installdir"] #$NON-NLS-1$ return None
def isCommandLineSpecified(self): return IZAppCommandLineParameterKeys.ZCMD_KEY_PROFILE in getCommandLineParameters()
def isCommandLineSpecified(self): return IZAppCommandLineParameterKeys.ZCMD_KEY_PROFILE in getCommandLineParameters( )