示例#1
0
文件: manager.py 项目: mpm2050/Raven
 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
示例#2
0
 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
示例#3
0
文件: blogthis.py 项目: mpm2050/Raven
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
示例#4
0
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
示例#5
0
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
示例#6
0
 def _getCmdLineInstallDirectory(self):
     cmdLineParams = getCommandLineParameters()
     if u"installdir" in cmdLineParams: #$NON-NLS-1$
         return cmdLineParams[u"installdir"] #$NON-NLS-1$
     return None
示例#7
0
文件: osutil.py 项目: mpm2050/Raven
 def _getCmdLineInstallDirectory(self):
     cmdLineParams = getCommandLineParameters()
     if u"installdir" in cmdLineParams:  #$NON-NLS-1$
         return cmdLineParams[u"installdir"]  #$NON-NLS-1$
     return None
示例#8
0
 def isCommandLineSpecified(self):
     return IZAppCommandLineParameterKeys.ZCMD_KEY_PROFILE in getCommandLineParameters()
示例#9
0
文件: manager.py 项目: mpm2050/Raven
 def isCommandLineSpecified(self):
     return IZAppCommandLineParameterKeys.ZCMD_KEY_PROFILE in getCommandLineParameters(
     )