コード例 #1
0
def gitcommit(comment,path="."):
  cmd = "git"
  uargs=["--git-dir",os.path.join(path,".git"),"commit","-a","-m",comment]
  return pyunix.docmd(cmd,uargs)
コード例 #2
0
def encrypt(users,fname):
  cmd = "gpg";
  uargs = ['-r ' + user for user in users ]
  uargs+=["--armor","--encrypt",fname]
  return pyunix.docmd(cmd,uargs)
コード例 #3
0
def gitpull(path="."):
  cmd = "git"
  uargs=["--git-dir",os.path.join(path,".git"),"pull","origin","master"]
  return pyunix.docmd(cmd,uargs)
コード例 #4
0
def gitdiff(path="."):
  cmd = "git"
  uargs=["--git-dir",os.path.join(path,".git"),"--no-pager","diff","master","origin/master"]
  return pyunix.docmd(cmd,uargs) 
コード例 #5
0
def decrypt(fname,target):
  cmd = "gpg"
  uargs=["--output",target,"--decrypt",fname]
  return pyunix.docmd(cmd,uargs)
コード例 #6
0
ファイル: rt.py プロジェクト: jpdef/timetrack
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)
コード例 #7
0
ファイル: rt.py プロジェクト: jpdef/timetrack
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)