#!/usr/bin/python import os, sys import prettyformat import fileinput command = "CP" module = "Unknown" description = "Please fix this somebody!" bCustom = True offset = 0 if(len(sys.argv) >= 2): if(sys.argv[1] == "--dbuild"): offset = 1 bCustom = False if(len(sys.argv) >= 2+offset): command = sys.argv[1+offset] if(len(sys.argv) >= 3+offset): module = sys.argv[2+offset] for line in sys.stdin: source = line.split("`")[1].split("'")[0] dest = line.split("`")[2].split("'")[0] prettyformat.pretty(command, module, source + " -> " + dest, bCustom)
import prettyformat import fileinput action = sys.argv[1] module = sys.argv[2] line = sys.stdin.readline() while(line): if("Compiling " in line): action = "CC" elif("Linking " in line): action = "LN" elif("checking " in line): action = "CHECK" elif("Building " in line): action = "BUILD" else: action = "CONF" newline = line.split("\n")[0] if(action == "CC"): newline = newline.split("Compiling ")[1] elif(action == "LN"): newline = newline.split("Linking ")[1] elif(action == "BUILD"): newline = newline.split("Building ")[1] prettyformat.pretty(action, module, newline, False) line = sys.stdin.readline()
action = "BUILD" elif ("Using FLAGS" in line): valid = False elif (line.startswith("rm")): line = line.split("rm")[1] while (line.strip().endswith("\\")): rm_splits = line.strip().split(" ") if (len(rm_splits) == 0): break if (rm_splits[0].startswith("-")): rm_splits = rm_splits[1:] for item in rm_splits: if (item.strip() != "" and item.strip() != "\\"): prettyformat.pretty("RM", module, item.strip(), False) line = sys.stdin.readline() rm_splits = line.strip().split(" ") if (len(rm_splits) != 0): if (rm_splits[0].startswith("-")): rm_splits = rm_splits[1:] for item in rm_splits: if (item.strip() != "" and item.strip() != "\\"): prettyformat.pretty("RM", module, item.strip(), False) valid = False else:
#!/usr/bin/python import os, sys import prettyformat import fileinput command = "CP" module = "Unknown" description = "Please fix this somebody!" bCustom = True offset = 0 if(len(sys.argv) >= 2): if(sys.argv[1] == "--rbuild"): offset = 1 bCustom = False if(len(sys.argv) >= 2+offset): command = sys.argv[1+offset] if(len(sys.argv) >= 3+offset): module = sys.argv[2+offset] for line in sys.stdin: source = line.split("`")[1].split("'")[0] dest = line.split("`")[2].split("'")[0] prettyformat.pretty(command, module, source + " -> " + dest, bCustom)
import os, sys import prettyformat import fileinput action = sys.argv[1] module = sys.argv[2] line = sys.stdin.readline() while (line): if ("Compiling " in line): action = "CC" elif ("Linking " in line): action = "LN" elif ("checking " in line): action = "CHECK" elif ("Building " in line): action = "BUILD" else: action = "CONF" newline = line.split("\n")[0] if (action == "CC"): newline = newline.split("Compiling ")[1] elif (action == "LN"): newline = newline.split("Linking ")[1] elif (action == "BUILD"): newline = newline.split("Building ")[1] prettyformat.pretty(action, module, newline, False) line = sys.stdin.readline()
if("--mode=compile"): action = "CC" description = line.split("-o")[1].split(" ")[1].strip() valid = True else: print "LIBTOOL HORROR" else: stripped = line.strip() if(stripped.startswith("rm")): rm_split = stripped.split("rm")[1].split(" ") if(rm_split[1].strip().startswith("-")): rm_split = rm_split[2:] for split in rm_split: if(split.strip() != ""): prettyformat.pretty("RM", module, split, False) elif(stripped.split(" ")[0].endswith("gcc")): action = "CC" description = stripped.split("-o")[1].split(" ")[1].strip() valid = True elif(stripped.split(" ")[0].endswith("c++")): action = "CXX" description = stripped.split("-o")[1].split(" ")[1].strip() valid = True elif(stripped.split(" ")[0].endswith("g++")): action = "CXX" description = stripped.split("-o")[1].split(" ")[1].strip() valid = True elif(stripped.split(" ")[0].endswith("ar")): action = "AR"
#!/usr/bin/env python import os, sys import prettyformat import fileinput bCustom = True opcode = "??" module = "Unknown" description = "Somebody please fix this!" offset = 0 if (sys.argv[1] == "--rbuild"): bCustom = False offset = 1 if (len(sys.argv) > 1 + offset): opcode = sys.argv[1 + offset] if (len(sys.argv) > 2 + offset): module = sys.argv[2 + offset] if (len(sys.argv) > 3 + offset): description = sys.argv[3 + offset] for line in sys.stdin: prettyformat.pretty(opcode, module, line.split("\n")[0], bCustom)
#!/usr/bin/python import sys import prettyformat if(len(sys.argv) != 3): sys.exit(0) myfile = open(sys.argv[1], "a") for line in sys.stdin: splits = line.split(":", 2) filename = splits[0] lineno = splits[1] description = splits[2].strip() info = "%-25s : %-5s : %-15s : %s" % (filename, lineno, sys.argv[2][:15], description) prettyformat.pretty("TODO", sys.argv[2], info); myfile.write(info + "\n") myfile.close()
#!/usr/bin/python import sys import prettyformat if (len(sys.argv) != 3): sys.exit(0) myfile = open(sys.argv[1], "a") for line in sys.stdin: splits = line.split(":", 2) filename = splits[0] lineno = splits[1] description = splits[2].strip() info = "%-25s : %-5s : %-15s : %s" % (filename, lineno, sys.argv[2][:15], description) prettyformat.pretty("TODO", sys.argv[2], info) myfile.write(info + "\n") myfile.close()
#!/usr/bin/env python import sys import prettyformat bCustom = True opcode = "??" module = "Unknown" description = "Please fix this somebody!" offset = 0 if(sys.argv[1] == "--dbuild"): bCustom = False offset = 1; if(len(sys.argv) > 1+offset): opcode = sys.argv[1+offset] if(len(sys.argv) > 2+offset): module = sys.argv[2+offset] if(len(sys.argv) > 3+offset): description = sys.argv[3+offset] prettyformat.pretty(opcode, module, description, bCustom)
#!/usr/bin/env python import sys import prettyformat bCustom = True opcode = "??" module = "Unknown" description = "Please fix this somebody!" offset = 0 if (sys.argv[1] == "--dbuild"): bCustom = False offset = 1 if (len(sys.argv) > 1 + offset): opcode = sys.argv[1 + offset] if (len(sys.argv) > 2 + offset): module = sys.argv[2 + offset] if (len(sys.argv) > 3 + offset): description = sys.argv[3 + offset] prettyformat.pretty(opcode, module, description, bCustom)
#!/usr/bin/python import os, sys import prettyformat import fileinput action = "MKDIR" module = sys.argv[1] for line in sys.stdin: description = line.split("\n")[0] prettyformat.pretty(action, module, description, False)
action = "BUILD" elif("Using FLAGS" in line): valid = False elif(line.startswith("rm")): line = line.split("rm")[1] while(line.strip().endswith("\\")): rm_splits = line.strip().split(" ") if(len(rm_splits) == 0): break if(rm_splits[0].startswith("-")): rm_splits = rm_splits[1:] for item in rm_splits: if(item.strip() != "" and item.strip() != "\\"): prettyformat.pretty("RM", module, item.strip(), False) line = sys.stdin.readline() rm_splits = line.strip().split(" ") if(len(rm_splits) != 0): if(rm_splits[0].startswith("-")): rm_splits = rm_splits[1:] for item in rm_splits: if(item.strip() != "" and item.strip() != "\\"): prettyformat.pretty("RM", module, item.strip(), False) valid = False
if("--mode=compile"): action = "CC" #description = line.split("-o")[1].split(" ")[1].strip() valid = True else: print "LIBTOOL HORROR" else: stripped = line.strip() if(stripped.startswith("rm")): rm_split = stripped.split("rm")[1].split(" ") if(rm_split[1].strip().startswith("-")): rm_split = rm_split[2:] for split in rm_split: if(split.strip() != ""): prettyformat.pretty("RM", module, split, False) elif(stripped.split(" ")[0].endswith("gcc")): action = "CC" splits = stripped.split("-o") if(len(splits) > 1): description = splits[1].split(" ")[1].strip() valid = True elif(stripped.split(" ")[0].endswith("c++")): action = "CXX" description = stripped.split("-o")[1].split(" ")[1].strip() valid = True elif(stripped.split(" ")[0].endswith("g++")): action = "CXX" description = stripped.split("-o")[1].split(" ")[1].strip() valid = True
#!/usr/bin/env python import os, sys import prettyformat import fileinput bCustom = True opcode = "??" module = "Unknown" description = "Somebody please fix this!" offset = 0 if(sys.argv[1] == "--rbuild"): bCustom = False offset = 1; if(len(sys.argv) > 1+offset): opcode = sys.argv[1+offset] if(len(sys.argv) > 2+offset): module = sys.argv[2+offset] if(len(sys.argv) > 3+offset): description = sys.argv[3+offset] for line in sys.stdin: prettyformat.pretty(opcode, module, line.split("\n")[0], bCustom)