GenerateScript

import yaml import string import argparse from ModuleGenerator import ModuleGenerator from datetime import date def getDate(): today = date.today() return today.strftime("%m/%d/%Y") if __name__ == '__main__': parser = argparse.ArgumentParser(description='Create a new C module from templates') #...

Read More >>>

WriteHeader

def WriteHeader(self): # Read in the .h template file with open("templates/header.htf") as inputFile: headerTemplate = string.Template(inputFile.read()) inputFile.close() # Substitute the new strings with the template tags headerFile = headerTemplate.substitute( module=self.moduleName, author=self.author, date=self.date, company=self.company, fileMacro=self.moduleName.upper()) #...

Read More >>>