Example #1
0
 def __init__(self):
     self.settings = aliasmgr_settings.am_settings()
     self.user = None
     self.home = None
     self.bashrc = None
     self.helperfiles = os.path.join(sys.path[0], "integrated.lst")
     self.helperscript = os.path.join(sys.path[0], "aliasmgr_scripts.sh")
     
     self.headerlist = "# Alias Manager Integration Files\n" + \
                       "# A script is generated using these filenames,\n" + \
                       "# and that script is called from bashrc.\n" + \
                       "# Editing this file will do nothing, you must\n" + \
                       "# edit it using Alias Manager.\n"
     self.headerscript = "# Alias Manager Integration Script\n"+ \
                         "# This script is called from bashrc to allow\n" + \
                         "# one or many alias/function scripts to be\n" + \
                         "# called on BASH startup.\n" + \
                         "# Alias Manager will over-write any changes\n" + \
                         "# you make to this file.\n"
                         
     # load user info  
     self.get_userinfo()
Example #2
0
    def __init__(self):
        self.settings = aliasmgr_settings.am_settings()
        self.user = None
        self.home = None
        self.bashrc = None
        self.helperfiles = os.path.join(sys.path[0], "integrated.lst")
        self.helperscript = os.path.join(sys.path[0], "aliasmgr_scripts.sh")

        self.headerlist = "# Alias Manager Integration Files\n" + \
                          "# A script is generated using these filenames,\n" + \
                          "# and that script is called from bashrc.\n" + \
                          "# Editing this file will do nothing, you must\n" + \
                          "# edit it using Alias Manager.\n"
        self.headerscript = "# Alias Manager Integration Script\n"+ \
                            "# This script is called from bashrc to allow\n" + \
                            "# one or many alias/function scripts to be\n" + \
                            "# called on BASH startup.\n" + \
                            "# Alias Manager will over-write any changes\n" + \
                            "# you make to this file.\n"

        # load user info
        self.get_userinfo()
Created on Sep 24, 2013

@author: Christopher Welborn
'''
import re
import gtk
import os
import sys
import aliasmgr_integrator
import aliasmgr_settings
# For changing file mode when scripts are generated.
from stat import S_IREAD, S_IWRITE, S_IEXEC
# Shorthand for read, write, and exec.
S_RWX = S_IREAD | S_IWRITE | S_IEXEC

settings = aliasmgr_settings.am_settings()
integrator = aliasmgr_integrator.am_integrator()


# Command/Alias Object ------------------------------------
class Command():

    def __init__(self, name=None, cmd=None, comment=None, exported=None):
        # set defaults.
        self.name = name if name else ''
        self.cmd = cmd if cmd else []
        self.comment = comment if comment else ''
        self.exported = exported if exported else 'New'
        self.shebang = '#!/bin/bash'

    def __repr__(self):
Example #4
0
Created on Sep 24, 2013

@author: Christopher Welborn
'''
import re
import gtk
import os
import sys
import aliasmgr_integrator
import aliasmgr_settings
# For changing file mode when scripts are generated.
from stat import S_IREAD, S_IWRITE, S_IEXEC
# Shorthand for read, write, and exec.
S_RWX = S_IREAD | S_IWRITE | S_IEXEC

settings = aliasmgr_settings.am_settings()
integrator = aliasmgr_integrator.am_integrator()


# Command/Alias Object ------------------------------------
class Command():

    def __init__(self, name=None, cmd=None, comment=None, exported=None):
        # set defaults.
        self.name = name if name else ''
        self.cmd = cmd if cmd else []
        self.comment = comment if comment else ''
        self.exported = exported if exported else 'New'
        self.shebang = '#!/bin/bash'

    def __repr__(self):