def gitcommit(comment,path="."): cmd = "git" uargs=["--git-dir",os.path.join(path,".git"),"commit","-a","-m",comment] return pyunix.docmd(cmd,uargs)
def encrypt(users,fname): cmd = "gpg"; uargs = ['-r ' + user for user in users ] uargs+=["--armor","--encrypt",fname] return pyunix.docmd(cmd,uargs)
def gitpull(path="."): cmd = "git" uargs=["--git-dir",os.path.join(path,".git"),"pull","origin","master"] return pyunix.docmd(cmd,uargs)
def gitdiff(path="."): cmd = "git" uargs=["--git-dir",os.path.join(path,".git"),"--no-pager","diff","master","origin/master"] return pyunix.docmd(cmd,uargs)
def decrypt(fname,target): cmd = "gpg" uargs=["--output",target,"--decrypt",fname] return pyunix.docmd(cmd,uargs)
def listTickets(datadir): args = ["--load-cookies",os.path.join(datadir, "cookies.txt"),"-S","-O","-"] args.append(magicstring2) htmldata = docmd("wget",args) extractedData = parseTicketHTML(htmldata) ticketPrint(extractedData)
def submitToTicket(datadir,msg,time,ticketnumber): args = ["--load-cookies",os.path.join(datadir,"cookies.txt"),"--post-data"] url = magicstring.format(msg,time,ticketnumber) args.append(url) docmd("wget",args)