def getArgs(data): numArgs = data.count(' ') + 1 set("nargs", numArgs) data = data.rstrip('\n') # print numArgs s = data.split(' '); return s
def init(): set("continued",0) mkdir("blocks") # Storage of these projects mkdir("files") mkdir("projects") printClear() printHeader()
def insertBlock(args,flag, data): if(flag == 1): log("Creating Block \"" + get("key") + "\"") save("blocks/"+get("key"),data) set("continued",0) printBlue("Block Creation Complete.") else: set("continued",1) set("prevCmd", "create") set("key",args[1]) log("Enter Block Information and press Ctrl+D when done!")
def cont(state, cmd): set("continued", state) set("prev", cmd)
def useOnline(args,flag,data): # Use online code blocks set("online", "true") print "We will now search online repos as well"
def clearTag(args,flag,data): set("tag", "unset") log("Tag has been unset")
def setTag(args,flag,data): set("tag", args[1]) log("Tag has been set to " + args[1])