コード例 #1
0
 def run(self):
     # PUT YOUR POST-INSTALL SCRIPT HERE or CALL A FUNCTION
     install.run(self)
     from rogue.commands import init
     from rogue.utilities import console
     console.info("Prepare rogue environnement")
     init.init(".")
コード例 #2
0
def init(glob, local):
    """Add rogue configuration"""
    console.info("Read rogue environment")
    if glob:
        path = DEFAULT_CONFIG_FILE
    elif local:
        path = '.'
    else:
        path = '.'
    path = os.path.join(path, ".rogue.cfg")
    api_config.controler.initialize(path)
コード例 #3
0
def show(glob, local):
    """Add rogue configuration"""
    console.info("Read rogue environment")
    if glob:
        path = DEFAULT_CONFIG_FILE
    elif local:
        path = '.'
    else:
        path = '.'
    path = os.path.join(path, ".rogue.cfg")
    cfg = api_config.controler.read(path)
    console.show_config(cfg)
コード例 #4
0
def add(options, glob, local):
    """Add rogue configuration"""
    console.info("Add rogue environment")
    if glob:
        path = DEFAULT_CONFIG_FILE
    elif local:
        path = '.'
    else:
        path = '.'
    path = os.path.join(path, ".rogue.cfg")
    api_config.add.add(path, options)
    print("ici")
コード例 #5
0
ファイル: project.py プロジェクト: 4383/rogue
def remove(project, config):
    console.info("Your projects:")
    context = api_config.read(config.name)
    default = dict(context['default_project'])
    basedir = default['basedir']
    if not os.path.isdir(basedir):
        console.error("Configuration basedir not defined")
        console.error(
            "rogue-config add default_project.basedir <yourdir> --global")
        return
    choice = os.path.join(basedir, project)
    console.info("remove {}".format(choice))
    shutil.rmtree(choice)
コード例 #6
0
ファイル: project.py プロジェクト: 4383/rogue
def open(project, config):
    console.info("Your projects:")
    context = api_config.read(config.name)
    default = dict(context['default_project'])
    basedir = default['basedir']
    if not os.path.isdir(basedir):
        console.error("Configuration basedir not defined")
        console.error(
            "rogue-config add default_project.basedir <yourdir> --global")
        return
    choice = os.path.join(basedir, project)
    console.info("open {}".format(choice))
    os.chdir(choice)
    print(os.getcwd())
コード例 #7
0
ファイル: project.py プロジェクト: 4383/rogue
def list(config, realtime, timer):
    console.info("Your projects:")
    context = api_config.read(config.name)
    default = dict(context['default_project'])
    basedir = default['basedir']
    if not os.path.isdir(basedir):
        console.error("Configuration basedir not defined")
        console.error(
            "rogue-config add default_project.basedir <yourdir> --global")
        return
    if realtime:
        while True:
            click.clear()
            display_list(basedir)
            console.info("refresh every {}s".format(timer))
            time.sleep(timer)
    display_list(basedir)
コード例 #8
0
def init(path):
    """Initialize rogue environment"""
    console.info("Initialize rogue environment")
    path = os.path.join(path, '.rogue.cfg')
    config.initialize(path)