Пример #1
0
    def cmnd(
            self,
            interactive=False,  # Can also be called non-interactively
    ):
        cmndOutcome = self.getOpOutcome()
        if interactive:
            if not self.cmndLineValidate(outcome=cmndOutcome):
                return cmndOutcome

        callParamsDict = {}
        if not icm.cmndCallParamsValidate(
                callParamsDict, interactive, outcome=cmndOutcome):
            return cmndOutcome

####+END:

        def cpsInit():
            return collections.OrderedDict()

        def menuItem(verbosity):
            icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity)

        def execLineEx(cmndStr):
            icm.ex_gExecMenuItem(execLine=cmndStr)

        logControler = icm.LOG_Control()
        logControler.loggerSetLevel(20)

        icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName())

        icm.G_commonBriefExamples()

        bleep.examples_icmBasic()

        defaultMailDom = marmeAcctsLib.enabledInMailAcctObtain(
            bxoId=curGet_bxoId(),
            sr=curGet_sr(),
        )

        ####+BEGIN: bx:icm:python:cmnd:subSection :title "Dev And Testing"
        """
**  [[elisp:(beginning-of-buffer)][Top]] ================ [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] [[elisp:(delete-other-windows)][(1)]]          *Dev And Testing*  [[elisp:(org-cycle)][| ]]  [[elisp:(org-show-subtree)][|=]] 
"""
        ####+END:
        #icm.cmndExampleMenuChapter('*General Dev and Testing IIFs*')

        icm.cmndExampleMenuChapter('*Config File Creation Facilities*')

        icm.cmndExampleMenuSection(
            '*Automated Config File Creation Facilities*')

        cmndName = "notmuchConfigUpdate"
        cmndArgs = ""
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        menuItem(verbosity='none')
        menuItem(verbosity='full')

        cmndName = "notmuchConfigStdout"
        cmndArgs = ""
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        menuItem(verbosity='none')
        menuItem(verbosity='full')

        configFile = withInMailDomGetNotmuchConfigPath(
            defaultMailDom,
            bxoId=curGet_bxoId(),
            sr=curGet_sr(),
        )

        icm.ANN_write("""ls -l {}""".format(configFile))
        icm.ANN_write("""cat  {} """.format(configFile))

        icm.cmndExampleMenuSection(
            '*Interactive Config File Creation Facilities*')

        cmndName = "runNotmuch"
        cmndArgs = "setup"
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        icm.ex_gCmndMenuItem(cmndName,
                             cps,
                             cmndArgs,
                             verbosity='basic',
                             comment='# Creates/Edits notmuch-config',
                             icmWrapper=None,
                             icmName=None)

        icm.cmndExampleMenuSection('*Show/List Config Parameter Settings*')

        cmndName = "runNotmuch"
        cmndArgs = "config list"
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        icm.ex_gCmndMenuItem(cmndName,
                             cps,
                             cmndArgs,
                             verbosity='basic',
                             comment='# Shows Key aspects of notmuch-config',
                             icmWrapper=None,
                             icmName=None)

        icm.cmndExampleMenuChapter('*Run notmuch -- new, Search*')

        cmndName = "runNotmuch"
        cmndArgs = "new"
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        icm.ex_gCmndMenuItem(cmndName,
                             cps,
                             cmndArgs,
                             verbosity='basic',
                             comment='# Refresh the index',
                             icmWrapper=None,
                             icmName=None)

        cmndName = "runNotmuch"
        cmndArgs = '''-- search --format=text --output=files "from:"'''
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        icm.ex_gCmndMenuItem(cmndName,
                             cps,
                             cmndArgs,
                             verbosity='basic',
                             comment='# Search Based on from',
                             icmWrapper=None,
                             icmName=None)

        cmndName = "runNotmuch"
        cmndArgs = '''-- search --format=text --output=files "from:"'''
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        icm.ex_gCmndMenuItem(cmndName,
                             cps,
                             cmndArgs,
                             verbosity='none',
                             comment='# Search Based on from',
                             icmWrapper='echo',
                             icmName=None)

        cmndName = "runNotmuch"
        cmndArgs = '''-- search "from:"'''
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        icm.ex_gCmndMenuItem(cmndName,
                             cps,
                             cmndArgs,
                             verbosity='basic',
                             comment='# Search Based on from',
                             icmWrapper=None,
                             icmName=None)

        cmndName = "runNotmuch"
        cmndArgs = '''-- search "from:"'''
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        icm.ex_gCmndMenuItem(cmndName,
                             cps,
                             cmndArgs,
                             verbosity='none',
                             comment='# Search Based on from',
                             icmWrapper='echo',
                             icmName=None)

        cmndName = "runNotmuch"
        cmndArgs = '''-- search --format=text --output=files "from:" | grep Inbox | xargs egrep "^Subject:"'''
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        icm.ex_gCmndMenuItem(cmndName,
                             cps,
                             cmndArgs,
                             verbosity='basic',
                             comment='# Search Based on from',
                             icmWrapper=None,
                             icmName=None)

        cmndName = "runNotmuch"
        cmndArgs = '''-- search --format=text --output=files "from:" | grep Inbox | xargs egrep "^Subject:"'''
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        icm.ex_gCmndMenuItem(cmndName,
                             cps,
                             cmndArgs,
                             verbosity='none',
                             comment='# Search Based on from',
                             icmWrapper="echo",
                             icmName=None)

        cmndName = "runNotmuch"
        cmndArgs = '''-- search --output=files "to: example.com"'''
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        icm.ex_gCmndMenuItem(cmndName,
                             cps,
                             cmndArgs,
                             verbosity='none',
                             comment='# Search Based on from',
                             icmWrapper="echo",
                             icmName=None)

        marmeAcctsLib.examples_controlProfileManage()

        marmeAcctsLib.examples_enabledInMailAcctConfig()

        marmeAcctsLib.examples_inMailAcctAccessPars()
Пример #2
0
    def cmnd(self,
        interactive=False,        # Can also be called non-interactively
    ):
        cmndOutcome = self.getOpOutcome()
        if interactive:
            if not self.cmndLineValidate(outcome=cmndOutcome):
                return cmndOutcome

        callParamsDict = {}
        if not icm.cmndCallParamsValidate(callParamsDict, interactive, outcome=cmndOutcome):
            return cmndOutcome
####+END:

        icm.ex_gCommon()

        bleep.examples_icmBasic()
        

        """
**  [[elisp:(org-cycle)][| ]]  [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] [[elisp:(beginning-of-buffer)][Top]] [[elisp:(delete-other-windows)][(1)]] || Examples   ::  General Dev and Testing IIFs [[elisp:(org-cycle)][| ]]
"""
        icm.cmndExampleMenuChapter('*General Dev and Testing IIFs*')   

        cmndName = "unitTest" ; cmndArgs = "" ; cps = collections.OrderedDict()        
        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='none')

        
        """
**  [[elisp:(org-cycle)][| ]]  [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] [[elisp:(beginning-of-buffer)][Top]] [[elisp:(delete-other-windows)][(1)]] || Examples   ::  Default Mail From Complete File [[elisp:(org-cycle)][| ]]
"""

        #enabledControlProfile = marmeAcctsLib.enabledControlProfileObtain()
        #enabledMailAcct = marmeAcctsLib.enabledInMailAcctObtain()
        
        icm.cmndExampleMenuChapter("""*CmndsRun*""")

        cmndName = "cmndsRun"

        icm.cmndExampleMenuSection("""*Full Marame Commands Run*""")

        cmndArgs = "inMailRetrieve inMailUaUpdate inMailDsnProc"
        cps = collections.OrderedDict() ; #cps['controlProfile'] = enabledControlProfile ; cps['inMailAcct'] = enabledMailAcct
        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper=None, verbosity='none')
        
        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper="echo", verbosity='none')

        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper=None, verbosity='little')

        icm.cmndExampleMenuSection("""*Test All  Marame Commands Run*""")

        cmndArgs = "inMailRetrieve inMailUaUpdate inMailDsnProcReport"
        cps = collections.OrderedDict() ; #cps['controlProfile'] = enabledControlProfile ; cps['inMailAcct'] = enabledMailAcct
        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper=None, verbosity='none')
        
        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper="echo", verbosity='none')

        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper=None, verbosity='little')
  
        cmndArgs = "inMailRetrieve inMailUaUpdate inMailDsnTestProc"
        cps = collections.OrderedDict() ; #cps['controlProfile'] = enabledControlProfile ; cps['inMailAcct'] = enabledMailAcct
        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper=None, verbosity='none')
        
        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper="echo", verbosity='none')

        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper=None, verbosity='little')
  
        

        icm.cmndExampleMenuChapter("""*CmndsRunPeriodically*""")

        cmndName = "cmndsRunPeriodically"

        icm.cmndExampleMenuSection("""*Full Marame Commands Run Periodically*""")

        cmndArgs = "inMailRetrieve inMailUaUpdate inMailDsnProc"        
        cps = collections.OrderedDict() ; cps['periodicity'] = "360"
        #cps['controlProfile'] = enabledControlProfile ; cps['inMailAcct'] = enabledMailAcct
        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper=None, verbosity='none')
        
        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper="echo", verbosity='none')
        
        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper=None, verbosity='little')

        cmndArgs = "inMailRetrieve inMailUaUpdate inMailDsnTestProc"        
        cps = collections.OrderedDict() ; cps['periodicity'] = "360"
        #cps['controlProfile'] = enabledControlProfile ; cps['inMailAcct'] = enabledMailAcct
        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper=None, verbosity='none')
        
        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper="echo", verbosity='none')
        
        icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmWrapper=None, verbosity='little')
        

        
        """
**  [[elisp:(org-cycle)][| ]]  [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] [[elisp:(beginning-of-buffer)][Top]] [[elisp:(delete-other-windows)][(1)]] || Examples   ::  From  marmeAcctsLib.py   [[elisp:(org-cycle)][| ]]
"""

        marmeAcctsLib.examples_controlProfileManage()

        marmeAcctsLib. examples_enabledInMailAcctConfig()

        marmeAcctsLib. examples_enabledOutMailAcctConfig()        

        marmeAcctsLib.examples_select_mailBox()        
   
        marmeAcctsLib.examples_inMailAcctAccessPars()

        marmeAcctsLib.examples_outMailAcctAccessPars()        
        
        return(cmndOutcome)
Пример #3
0
    def cmnd(
            self,
            interactive=False,  # Can also be called non-interactively
    ):
        cmndOutcome = self.getOpOutcome()
        if interactive:
            if not self.cmndLineValidate(outcome=cmndOutcome):
                return cmndOutcome

        callParamsDict = {}
        if not icm.cmndCallParamsValidate(
                callParamsDict, interactive, outcome=cmndOutcome):
            return cmndOutcome
####+END:

        def cpsInit():
            return collections.OrderedDict()

        def menuItem(verbosity):
            icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs,
                                 verbosity=verbosity)  # 'little' or 'none'

        def execLineEx(cmndStr):
            icm.ex_gExecMenuItem(execLine=cmndStr)

        logControler = icm.LOG_Control()
        logControler.loggerSetLevel(20)

        icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName())

        icm.G_commonBriefExamples()

        bleep.examples_icmBasic()

        controlProfile = marmeAcctsLib.enabledControlProfileObtain(
            curGet_bxoId(), curGet_sr())
        defaultMailDom = marmeAcctsLib.enabledInMailAcctObtain(
            curGet_bxoId(), curGet_sr())

        ####+BEGIN: bx:icm:python:cmnd:subSection :title "Dev And Testing"
        """
**  [[elisp:(beginning-of-buffer)][Top]] ================ [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] [[elisp:(delete-other-windows)][(1)]]          *Dev And Testing*  [[elisp:(org-cycle)][| ]]  [[elisp:(org-show-subtree)][|=]] 
"""
        ####+END:
        #icm.cmndExampleMenuChapter('*General Dev and Testing IIFs*')

        icm.cmndExampleMenuChapter('*Config File Creation Facility IIFs*')

        cmndName = "offlineimaprcUpdate"
        cmndArgs = ""
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        menuItem(verbosity='none')
        menuItem(verbosity='full')

        cmndName = "offlineimaprcStdout"
        cmndArgs = ""
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        menuItem(verbosity='none')
        menuItem(verbosity='full')

        configFile = withInMailDomGetOfflineimaprcPath(
            controlProfile,
            defaultMailDom,
            curGet_bxoId(),
            curGet_sr(),
        )

        icm.ANN_write("""ls -l {}""".format(configFile))
        icm.ANN_write("""cat  {} """.format(configFile))

        icm.cmndExampleMenuChapter(
            '*Operation Facility IIFs -- (offlineimapRun)*')

        cmndName = "offlineimapRun"
        cmndArgs = ""
        cps = cpsInit()
        cmndParsCurBxoSr(cps)
        menuItem(verbosity='none')
        menuItem(verbosity='full')

        marmeAcctsLib.examples_controlProfileManage()

        #marmeAcctsLib.examples_marmeAcctsLibControls()
        marmeAcctsLib.examples_enabledInMailAcctConfig()

        marmeAcctsLib.examples_inMailAcctAccessPars()