Ejemplo n.º 1
0
import os

pathToPages = os.path.join(os.path.dirname(os.path.realpath('__file__')),
                           "../../docs/Pages")
pathToProjectsHtml = os.path.join(pathToPages,
                                  "../../docs/Pages/projects.html")
pathToIndexFile = os.path.join(pathToPages, "../../docs/index.html")

env = Environment(
    loader=FileSystemLoader(os.path.dirname(os.path.realpath('__file__'))))
template = env.get_template("ProjectTemplate.html")
commmitTemplate = env.get_template("CommitSummaryTemplate.html")
detailedCommmitTemplate = env.get_template("DetailCommitTemplate.html")
indexTemplate = env.get_template("IndexTemplate.html")

projects = RW.readProject('projects')
items = []

if os.path.isdir(pathToPages):
    shutil.rmtree(pathToPages)
try:
    os.mkdir(pathToPages)
except OSError:
    print("Could not make directory")

noOfProjects, noOfCommits, noOfRefactorings, noOfTypeChanges, noOfCommitsException = 0, 0, 0, 0, 0

for p in projects:
    noOfProjects += 1
    commits = RW.readCommit('commits_' + p.name)
    l = str(len(commits))