# Path: moa/sysConf.py
# USERCONFIGFILE = os.path.join(os.path.expanduser('~'),
#                               '.config', 'moa', 'config')
# SYSCONFIGFILE = os.path.join('etc', 'moa', 'config')
# def _interpret_var(v):
#     def __init__(self):
#     def getUser(self):
#     def saveUser(self, conf):
#     def getVersion(self):
# class SysConf(Yaco.Yaco):


import os
import moa.args
import moa.job
import moa.logger
import moa.ui
from moa.sysConf import sysConf
        job = moa.job.newJob(job, template=template, title=title,
                             provider=provider)
    except moa.exceptions.InvalidTemplate:
        moa.ui.exitError("Invalid template: %s" % template)

    if title is None or str(title).strip() == "":
         title = moa.ui.askUser('title:\n> ', "")

    job.conf['title'] = title

    for p in params:
        k, v = p.split('=', 1)
        job.conf[k] = v

    #if no title is set - see if there is one set in the template
    if not job.conf.title and job.template.parameters.title.default:
        job.conf.title = job.template.parameters.title.default

    if not job.conf.title:
        moa.ui.warn("Please define a title for this job")

    job.conf.save()

    moa.ui.message('Created a "%s" job' % originaltemplate)
    if title:
        moa.ui.message('with title "%s"' % title)


def hook_git_finish_new():
    l.debug('running git add for newjob')

# Path: moa/sysConf.py
# USERCONFIGFILE = os.path.join(os.path.expanduser('~'),
#                               '.config', 'moa', 'config')
# SYSCONFIGFILE = os.path.join('etc', 'moa', 'config')
# def _interpret_var(v):
#     def __init__(self):
#     def getUser(self):
#     def saveUser(self, conf):
#     def getVersion(self):
# class SysConf(Yaco.Yaco):


# Path: moa/plugin/system/newjob.py
import os
import moa.args
import moa.job
import moa.logger
import moa.ui
from moa.sysConf import sysConf

        job = moa.job.newJob(job, template=template, title=title,
                             provider=provider)
    except moa.exceptions.InvalidTemplate:
        moa.ui.exitError("Invalid template: %s" % template)

    if title is None or str(title).strip() == "":
         title = moa.ui.askUser('title:\n> ', "")

    job.conf['title'] = title

    for p in params:
        k, v = p.split('=', 1)
        job.conf[k] = v

    #if no title is set - see if there is one set in the template
    if not job.conf.title and job.template.parameters.title.default:
        job.conf.title = job.template.parameters.title.default

    if not job.conf.title:
        moa.ui.warn("Please define a title for this job")

    job.conf.save()

    moa.ui.message('Created a "%s" job' % originaltemplate)
    if title:
        moa.ui.message('with title "%s"' % title)


def hook_git_finish_new():
    l.debug('running git add for newjob')

    job = sysConf.job