| 1 |
nino.borges |
499 |
"""
|
| 2 |
|
|
IssueTrackerReporter
|
| 3 |
|
|
|
| 4 |
|
|
Created by
|
| 5 |
|
|
Emanuel Borges
|
| 6 |
|
|
01.06.2014
|
| 7 |
|
|
|
| 8 |
|
|
Creates an easy to read report from the issue tracker export of "all issues".
|
| 9 |
|
|
|
| 10 |
nino.borges |
521 |
export should contain the following fields:
|
| 11 |
|
|
'Artifact ID' 'Issue Type' 'Status KPMG or Manny' 'Status MWE Resolution'
|
| 12 |
|
|
|
| 13 |
|
|
'Time Entry Description Prefix' 'Time Entry Description' 'Reporter' 'Assignee Individual'
|
| 14 |
|
|
|
| 15 |
|
|
'System Created On' 'System Last Modified On' 'Time KPMG Billed' 'Time KPMG Estimated'
|
| 16 |
|
|
|
| 17 |
|
|
'KPMG or Manny Status Comments/Notes'
|
| 18 |
|
|
|
| 19 |
|
|
|
| 20 |
nino.borges |
499 |
"""
|
| 21 |
nino.borges |
514 |
import os
|
| 22 |
nino.borges |
499 |
|
| 23 |
nino.borges |
514 |
def CreateBaseReport(outputFile,cssLocation="main.css"):
|
| 24 |
nino.borges |
499 |
"""Creates the top of the HTML file"""
|
| 25 |
nino.borges |
502 |
outputFile.write("""
|
| 26 |
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.5 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| 27 |
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
| 28 |
|
|
<head>
|
| 29 |
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
| 30 |
|
|
<meta name="description" content="Your description goes here" />
|
| 31 |
|
|
<meta name="keywords" content="your,keywords,goes,here" />
|
| 32 |
nino.borges |
514 |
<meta name="author" content="Emanuel Borges">""")
|
| 33 |
|
|
outputFile.write(' <link rel="stylesheet" type="text/css" href="%s" title="ITO Report" media="all" />'%cssLocation)
|
| 34 |
|
|
outputFile.write("""
|
| 35 |
nino.borges |
502 |
<title>ITO Report</title>
|
| 36 |
|
|
</head>
|
| 37 |
|
|
|
| 38 |
|
|
<body>
|
| 39 |
|
|
<div id="containerfull"><!-- Use"containerfull" for 100% width. For fixed width, use "container980", "container760" or "container600" (the number is the layout width in pixels). -->
|
| 40 |
|
|
<div id="header">
|
| 41 |
|
|
<h1><a href="index.html">ITO Report</a></h1>
|
| 42 |
|
|
<h2>Report gathered from Issue Tracking Object.</h2>
|
| 43 |
|
|
</div>
|
| 44 |
nino.borges |
499 |
""")
|
| 45 |
nino.borges |
502 |
outputFile.close()
|
| 46 |
nino.borges |
499 |
def FinishReport(outputFile):
|
| 47 |
|
|
"""Creates the bottom of the HTML file"""
|
| 48 |
nino.borges |
502 |
outputFile.write("""
|
| 49 |
nino.borges |
499 |
|
| 50 |
nino.borges |
502 |
<div class="clear"> </div>
|
| 51 |
|
|
</div>
|
| 52 |
|
|
<div class="clear"> </div>
|
| 53 |
|
|
</div>
|
| 54 |
|
|
<div id="footer">
|
| 55 |
|
|
<div id="footersections">
|
| 56 |
|
|
<div class="half">
|
| 57 |
|
|
<h2>Footer area #1</h2>
|
| 58 |
|
|
<p>manny test.</p>
|
| 59 |
|
|
</div>
|
| 60 |
|
|
<div class="quarter">
|
| 61 |
|
|
<h2>Footer area #2</h2>
|
| 62 |
|
|
<p>manny test 2.</p>
|
| 63 |
|
|
<p>Paragraphs and <a href="#">links</a> work here too.</p>
|
| 64 |
|
|
</div>
|
| 65 |
|
|
<div class="lastquarter">
|
| 66 |
|
|
<h2>Footer menu</h2>
|
| 67 |
|
|
<ul>
|
| 68 |
|
|
<li><a href="#">Link #1</a></li>
|
| 69 |
|
|
<li><a href="#">Link #2</a></li>
|
| 70 |
|
|
</ul>
|
| 71 |
|
|
</div>
|
| 72 |
|
|
<div class="clear"> </div>
|
| 73 |
|
|
</div>
|
| 74 |
|
|
</div>
|
| 75 |
|
|
<div id="credits">
|
| 76 |
|
|
<p>© 2014 Emanuel Borges<br />
|
| 77 |
|
|
</div>
|
| 78 |
|
|
</div>
|
| 79 |
|
|
</body>
|
| 80 |
|
|
</html>
|
| 81 |
|
|
""")
|
| 82 |
|
|
outputFile.close()
|
| 83 |
|
|
|
| 84 |
nino.borges |
505 |
def GetProjectList(mwePlate,kpmgPlate,closedPlate,outputFile,headdingList):
|
| 85 |
nino.borges |
504 |
"""Combines the plates (not lists) into the project list, so that you can populate the project view"""
|
| 86 |
|
|
## cycle through the 2 open lists and only pull from the closed list, if the proj exists in the first two.
|
| 87 |
|
|
## Everything should already be in a matrix by catagory.
|
| 88 |
|
|
projectMatrix = {}
|
| 89 |
|
|
for i in mwePlate.keys():
|
| 90 |
nino.borges |
505 |
for p in mwePlate[i]:
|
| 91 |
|
|
project = p[3]
|
| 92 |
|
|
if project == '""':
|
| 93 |
|
|
project = "Tasks"
|
| 94 |
|
|
if project in projectMatrix.keys():
|
| 95 |
|
|
projectMatrix[project].append(["MWE",p])
|
| 96 |
|
|
else:
|
| 97 |
|
|
projectMatrix[project] = [["MWE",p],]
|
| 98 |
nino.borges |
504 |
for i in kpmgPlate.keys():
|
| 99 |
nino.borges |
505 |
for p in kpmgPlate[i]:
|
| 100 |
|
|
project = p[3]
|
| 101 |
|
|
if project=='""':
|
| 102 |
|
|
project = "Tasks"
|
| 103 |
|
|
if project in projectMatrix.keys():
|
| 104 |
|
|
projectMatrix[project].append(["KPMG",p])
|
| 105 |
|
|
else:
|
| 106 |
|
|
projectMatrix[project] = [["KPMG",p],]
|
| 107 |
|
|
for i in closedPlate.keys():
|
| 108 |
|
|
for p in closedPlate[i]:
|
| 109 |
|
|
project = p[3]
|
| 110 |
|
|
if project in projectMatrix.keys():
|
| 111 |
|
|
projectMatrix[project].append(["Closed",p])
|
| 112 |
|
|
outputFile.write("""
|
| 113 |
|
|
<div id="menu">
|
| 114 |
|
|
<ul>
|
| 115 |
|
|
""")
|
| 116 |
|
|
outputFile.write('<li><a href="index2.html">%s</a></li>\n'% headdingList[0])
|
| 117 |
|
|
outputFile.write('<li><a href="KPMGs_Plate.html">%s</a></li>\n'% headdingList[1])
|
| 118 |
|
|
outputFile.write('<li><a href="Closed_Items.html">%s</a></li>\n'% headdingList[2])
|
| 119 |
|
|
outputFile.write("""
|
| 120 |
|
|
<li><a class="current" href="Project_View.html">Project View</a></li>
|
| 121 |
|
|
</ul>
|
| 122 |
|
|
</div>
|
| 123 |
|
|
|
| 124 |
|
|
<div id="feature">
|
| 125 |
|
|
<div class="left">
|
| 126 |
|
|
<h2>About the Project View</h2>
|
| 127 |
|
|
<p>The project view takes the open items and formats them as a "project".</p>
|
| 128 |
|
|
</div>
|
| 129 |
|
|
<div class="clear"> </div>
|
| 130 |
|
|
</div>
|
| 131 |
|
|
<div id="main">
|
| 132 |
nino.borges |
506 |
<div id="sidebar">
|
| 133 |
|
|
<div class="sidebarbox">
|
| 134 |
nino.borges |
507 |
<h2>Project Menu</h2>
|
| 135 |
nino.borges |
506 |
<ul class="sidemenu">\n""")
|
| 136 |
nino.borges |
507 |
for p in projectMatrix.keys():
|
| 137 |
|
|
prj = p.replace('"','')
|
| 138 |
|
|
outputFile.write(' <li><a href="#%s">%s</a></li>\n'%(prj,prj))
|
| 139 |
nino.borges |
506 |
outputFile.write(""" </ul>
|
| 140 |
|
|
</div>
|
| 141 |
|
|
|
| 142 |
|
|
<div class="sidebarbox">
|
| 143 |
|
|
<h2>Text box</h2>
|
| 144 |
|
|
<p>Important links:</p>
|
| 145 |
|
|
<ul>
|
| 146 |
|
|
<li><a href="https://fts.shs.us.kpmg.com/vpn/index.html">KPMG Relativity</a></li>
|
| 147 |
|
|
<li><a href="#">Another</a></li>
|
| 148 |
|
|
</ul>
|
| 149 |
|
|
</div>
|
| 150 |
|
|
</div>
|
| 151 |
|
|
|
| 152 |
nino.borges |
505 |
<div id="content">""")
|
| 153 |
nino.borges |
504 |
for p in projectMatrix.keys():
|
| 154 |
nino.borges |
507 |
prj = p.replace('"','')
|
| 155 |
|
|
outputFile.write('<ul><li id="%s">%s<ul>'%(prj,prj))
|
| 156 |
nino.borges |
521 |
projTotal = 0.0
|
| 157 |
nino.borges |
505 |
for i in projectMatrix[p]:
|
| 158 |
nino.borges |
521 |
projInt = i[1][10]
|
| 159 |
|
|
projInt = projInt.split(" ")
|
| 160 |
|
|
if len(projInt) >1:
|
| 161 |
|
|
projTotal = projTotal + float(projInt[0])
|
| 162 |
nino.borges |
505 |
if i[0] == "Closed":
|
| 163 |
nino.borges |
521 |
outputFile.write('<li><table border="1"><tr><td><strike><a href="data/%s.html">%s</a></strike></td><td><strike>%s</strike></td><td><strike>%s</strike></td></tr></table> --- %s</li>'% (i[1][0].replace('"',""),i[1][0],i[1][4],i[1][10],i[0]))
|
| 164 |
nino.borges |
505 |
else:
|
| 165 |
nino.borges |
521 |
outputFile.write('<li> %s<table border="1"><tr><td><a href="data/%s.html">%s</a></td><td>%s</td><td>%s</td></tr></table></li>'% (i[0],i[1][0].replace('"',""),i[1][0],i[1][4],i[1][10]))
|
| 166 |
|
|
outputFile.write("</ul></li></ul><p>Total Project Time: %s hrs</p>"%str(projTotal))
|
| 167 |
|
|
outputFile.write("<hr 40%>")
|
| 168 |
nino.borges |
505 |
outputFile.write("""</div></div>""")
|
| 169 |
|
|
outputFile.close()
|
| 170 |
nino.borges |
504 |
|
| 171 |
|
|
|
| 172 |
nino.borges |
499 |
def SplitIntoPlates(exportFile):
|
| 173 |
|
|
openMWEList = []
|
| 174 |
|
|
openKPMGList = []
|
| 175 |
|
|
closedList = []
|
| 176 |
|
|
|
| 177 |
|
|
contents = open(exportFile).readlines()
|
| 178 |
|
|
contents = contents[1:]
|
| 179 |
|
|
|
| 180 |
|
|
for line in contents:
|
| 181 |
|
|
line = line.replace("\n","")
|
| 182 |
|
|
ID = line.split(",")[0]
|
| 183 |
|
|
ID = ID.replace('"',"")
|
| 184 |
|
|
if ID.isalpha():
|
| 185 |
|
|
pass
|
| 186 |
|
|
else:
|
| 187 |
|
|
KPMGStatus = line.split(",")[2]
|
| 188 |
|
|
MWEStatus = line.split(",")[3]
|
| 189 |
nino.borges |
501 |
if KPMGStatus in ['"Resolved"', '"Sent to MWE"','"Closed"','"Transmit to Counsel"'] :
|
| 190 |
|
|
if MWEStatus in ['"Resolved"','"Closed"']:
|
| 191 |
nino.borges |
499 |
closedList.append(line)
|
| 192 |
|
|
else:
|
| 193 |
|
|
openMWEList.append(line)
|
| 194 |
|
|
else:
|
| 195 |
|
|
openKPMGList.append(line)
|
| 196 |
|
|
return openMWEList,openKPMGList, closedList
|
| 197 |
|
|
|
| 198 |
|
|
def SplitIntoSections(currentList):
|
| 199 |
|
|
"""Splits into sections and returns matrix"""
|
| 200 |
|
|
matrix = {}
|
| 201 |
|
|
for i in currentList:
|
| 202 |
|
|
i = i.split(",")
|
| 203 |
nino.borges |
521 |
if i[10] == '""':
|
| 204 |
|
|
estimatedkpmg = "tbd"
|
| 205 |
|
|
else:
|
| 206 |
|
|
estimatedkpmg = i[10].replace('"','')+' hrs'
|
| 207 |
|
|
if i[11] == '""':
|
| 208 |
|
|
actualkpmg = 'tbd'
|
| 209 |
|
|
else:
|
| 210 |
|
|
actualkpmg = i[11].replace('"','')+' hrs'
|
| 211 |
|
|
|
| 212 |
|
|
writeList = [i[0],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],estimatedkpmg,actualkpmg]
|
| 213 |
nino.borges |
499 |
issueType = i[1]
|
| 214 |
|
|
issueType = issueType.replace('"',"")
|
| 215 |
|
|
if issueType in matrix.keys():
|
| 216 |
|
|
matrix[issueType].append(writeList)
|
| 217 |
|
|
else:
|
| 218 |
|
|
matrix[issueType] = [writeList,]
|
| 219 |
|
|
return matrix
|
| 220 |
nino.borges |
502 |
|
| 221 |
|
|
def ProcessToHTML(currentMatrix,outputFile,headdingList,part):
|
| 222 |
nino.borges |
499 |
"""Converts the lists into HTML tables"""
|
| 223 |
nino.borges |
502 |
outputFile.write("""
|
| 224 |
|
|
<div id="menu">
|
| 225 |
|
|
<ul>
|
| 226 |
|
|
""")
|
| 227 |
|
|
if part[:3] == "MWE":
|
| 228 |
|
|
outputFile.write('<li><a class="current" href="index2.html">%s</a></li>\n'% headdingList[0])
|
| 229 |
nino.borges |
503 |
outputFile.write('<li><a href="KPMGs_Plate.html">%s</a></li>\n'% headdingList[1])
|
| 230 |
|
|
outputFile.write('<li><a href="Closed_Items.html">%s</a></li>\n'% headdingList[2])
|
| 231 |
nino.borges |
502 |
outputFile.write("""
|
| 232 |
|
|
<li><a href="Project_View.html">Project View</a></li>
|
| 233 |
|
|
</ul>
|
| 234 |
|
|
</div>
|
| 235 |
nino.borges |
499 |
|
| 236 |
nino.borges |
502 |
<div id="feature">
|
| 237 |
|
|
<div class="left">
|
| 238 |
|
|
<h2>About the MWE Plate</h2>
|
| 239 |
|
|
<p>These are all of the tasks and projects, broken out by Issue type, that are currently assigned to the MWE team.</p>
|
| 240 |
|
|
</div>
|
| 241 |
|
|
<div class="clear"> </div>
|
| 242 |
|
|
</div>
|
| 243 |
|
|
<div id="main">
|
| 244 |
|
|
<div id="sidebar">
|
| 245 |
|
|
<div class="sidebarbox">
|
| 246 |
|
|
<h2>Issue menu</h2>
|
| 247 |
|
|
<ul class="sidemenu">\n""")
|
| 248 |
|
|
for section in currentMatrix.keys():
|
| 249 |
|
|
outputFile.write(' <li><a href="#%s">%s</a></li>\n'%(section,section))
|
| 250 |
|
|
outputFile.write(""" </ul>
|
| 251 |
|
|
</div>
|
| 252 |
|
|
|
| 253 |
nino.borges |
505 |
<div class="sidebarbox">
|
| 254 |
|
|
<h2>Text box</h2>
|
| 255 |
|
|
<p>Important links:</p>
|
| 256 |
|
|
<ul>
|
| 257 |
|
|
<li><a href="https://fts.shs.us.kpmg.com/vpn/index.html">KPMG Relativity</a></li>
|
| 258 |
|
|
<li><a href="#">Another</a></li>
|
| 259 |
|
|
</ul>
|
| 260 |
|
|
</div>
|
| 261 |
|
|
</div>
|
| 262 |
nino.borges |
502 |
|
| 263 |
|
|
<div id="content">
|
| 264 |
|
|
""")
|
| 265 |
|
|
for section in currentMatrix.keys():
|
| 266 |
|
|
outputFile.write('<h3 id="%s">%s</h3>\n'%(section,section))
|
| 267 |
|
|
outputFile.write("<center><table border=1 cellspacing=0 cellpadding=5 width=95%>\n")
|
| 268 |
|
|
outputFile.write("<tr><th>ID</th><th>KPMG Status</th><th>MWE Status</th><th>TE Prefix</th><th>TE Description</th><th>Reporter</th><th>Assignee</th><th>Created On</th><th>Modified On</th></tr>")
|
| 269 |
|
|
for x in currentMatrix[section]:
|
| 270 |
|
|
outputFile.write("<tr>\n")
|
| 271 |
nino.borges |
514 |
count = 0
|
| 272 |
nino.borges |
521 |
for y in x[:9]:
|
| 273 |
nino.borges |
514 |
if count == 0:
|
| 274 |
|
|
outputFile.write('<td><a href="data/%s.html">%s</a></td>'%(y.replace('"',""),y))
|
| 275 |
|
|
else:
|
| 276 |
|
|
outputFile.write("<td>%s</td>"%y)
|
| 277 |
|
|
count = count + 1
|
| 278 |
nino.borges |
502 |
outputFile.write("</tr>\n")
|
| 279 |
|
|
outputFile.write("</table></center><br><br>\n")
|
| 280 |
|
|
|
| 281 |
|
|
elif part[:3] == "KPM":
|
| 282 |
nino.borges |
503 |
outputFile.write('<li><a href="index2.html">%s</a></li>\n'% headdingList[0])
|
| 283 |
|
|
outputFile.write('<li><a class="current" href="KPMGs_Plate.html">%s</a></li>\n'% headdingList[1])
|
| 284 |
|
|
outputFile.write('<li><a href="Closed_Items.html">%s</a></li>\n'% headdingList[2])
|
| 285 |
|
|
outputFile.write("""
|
| 286 |
|
|
<li><a href="Project_View.html">Project View</a></li>
|
| 287 |
|
|
</ul>
|
| 288 |
|
|
</div>
|
| 289 |
|
|
|
| 290 |
|
|
<div id="feature">
|
| 291 |
|
|
<div class="left">
|
| 292 |
|
|
<h2>About the KPMG Plate</h2>
|
| 293 |
|
|
<p>These are all of the tasks and projects, broken out by Issue type, that are currently assigned to the KPMG team.</p>
|
| 294 |
|
|
</div>
|
| 295 |
|
|
<div class="clear"> </div>
|
| 296 |
|
|
</div>
|
| 297 |
|
|
<div id="main">
|
| 298 |
|
|
<div id="sidebar">
|
| 299 |
|
|
<div class="sidebarbox">
|
| 300 |
|
|
<h2>Issue menu</h2>
|
| 301 |
|
|
<ul class="sidemenu">\n""")
|
| 302 |
|
|
for section in currentMatrix.keys():
|
| 303 |
|
|
outputFile.write(' <li><a href="#%s">%s</a></li>\n'%(section,section))
|
| 304 |
|
|
outputFile.write(""" </ul>
|
| 305 |
|
|
</div>
|
| 306 |
|
|
|
| 307 |
nino.borges |
505 |
<div class="sidebarbox">
|
| 308 |
|
|
<h2>Text box</h2>
|
| 309 |
|
|
<p>Important links:</p>
|
| 310 |
|
|
<ul>
|
| 311 |
|
|
<li><a href="https://fts.shs.us.kpmg.com/vpn/index.html">KPMG Relativity</a></li>
|
| 312 |
|
|
<li><a href="#">Another</a></li>
|
| 313 |
|
|
</ul>
|
| 314 |
|
|
</div>
|
| 315 |
|
|
</div>
|
| 316 |
nino.borges |
503 |
|
| 317 |
|
|
<div id="content">
|
| 318 |
|
|
""")
|
| 319 |
|
|
for section in currentMatrix.keys():
|
| 320 |
|
|
outputFile.write('<h3 id="%s">%s</h3>\n'%(section,section))
|
| 321 |
|
|
outputFile.write("<center><table border=1 cellspacing=0 cellpadding=5 width=95%>\n")
|
| 322 |
|
|
outputFile.write("<tr><th>ID</th><th>KPMG Status</th><th>MWE Status</th><th>TE Prefix</th><th>TE Description</th><th>Reporter</th><th>Assignee</th><th>Created On</th><th>Modified On</th></tr>")
|
| 323 |
|
|
for x in currentMatrix[section]:
|
| 324 |
|
|
outputFile.write("<tr>\n")
|
| 325 |
nino.borges |
514 |
count = 0
|
| 326 |
nino.borges |
521 |
for y in x[:9]:
|
| 327 |
nino.borges |
514 |
if count == 0:
|
| 328 |
|
|
outputFile.write('<td><a href="data/%s.html">%s</a></td>'%(y.replace('"',""),y))
|
| 329 |
|
|
else:
|
| 330 |
|
|
outputFile.write("<td>%s</td>"%y)
|
| 331 |
|
|
count = count + 1
|
| 332 |
nino.borges |
503 |
outputFile.write("</tr>\n")
|
| 333 |
|
|
outputFile.write("</table></center><br><br>\n")
|
| 334 |
nino.borges |
502 |
elif part[:3] == "Clo":
|
| 335 |
nino.borges |
503 |
outputFile.write('<li><a href="index2.html">%s</a></li>\n'% headdingList[0])
|
| 336 |
|
|
outputFile.write('<li><a href="KPMGs_Plate.html">%s</a></li>\n'% headdingList[1])
|
| 337 |
|
|
outputFile.write('<li><a class="current" href="Closed_Items.html">%s</a></li>\n'% headdingList[2])
|
| 338 |
|
|
outputFile.write("""
|
| 339 |
|
|
<li><a href="Project_View.html">Project View</a></li>
|
| 340 |
|
|
</ul>
|
| 341 |
|
|
</div>
|
| 342 |
|
|
|
| 343 |
|
|
<div id="feature">
|
| 344 |
|
|
<div class="left">
|
| 345 |
|
|
<h2>About the Closed Items page</h2>
|
| 346 |
|
|
<p>These are all of the tasks and projects, broken out by Issue type, that are currently closed and marked complete.</p>
|
| 347 |
|
|
</div>
|
| 348 |
|
|
<div class="clear"> </div>
|
| 349 |
|
|
</div>
|
| 350 |
|
|
<div id="main">
|
| 351 |
|
|
<div id="sidebar">
|
| 352 |
|
|
<div class="sidebarbox">
|
| 353 |
|
|
<h2>Issue menu</h2>
|
| 354 |
|
|
<ul class="sidemenu">\n""")
|
| 355 |
|
|
for section in currentMatrix.keys():
|
| 356 |
|
|
outputFile.write(' <li><a href="#%s">%s</a></li>\n'%(section,section))
|
| 357 |
|
|
outputFile.write(""" </ul>
|
| 358 |
|
|
</div>
|
| 359 |
|
|
|
| 360 |
nino.borges |
505 |
<div class="sidebarbox">
|
| 361 |
|
|
<h2>Text box</h2>
|
| 362 |
|
|
<p>Important links:</p>
|
| 363 |
|
|
<ul>
|
| 364 |
|
|
<li><a href="https://fts.shs.us.kpmg.com/vpn/index.html">KPMG Relativity</a></li>
|
| 365 |
|
|
<li><a href="#">Another</a></li>
|
| 366 |
|
|
</ul>
|
| 367 |
|
|
</div>
|
| 368 |
|
|
</div>
|
| 369 |
nino.borges |
503 |
|
| 370 |
|
|
<div id="content">
|
| 371 |
|
|
""")
|
| 372 |
|
|
for section in currentMatrix.keys():
|
| 373 |
|
|
outputFile.write('<h3 id="%s">%s</h3>\n'%(section,section))
|
| 374 |
|
|
outputFile.write("<center><table border=1 cellspacing=0 cellpadding=5 width=95%>\n")
|
| 375 |
|
|
outputFile.write("<tr><th>ID</th><th>KPMG Status</th><th>MWE Status</th><th>TE Prefix</th><th>TE Description</th><th>Reporter</th><th>Assignee</th><th>Created On</th><th>Modified On</th></tr>")
|
| 376 |
|
|
for x in currentMatrix[section]:
|
| 377 |
|
|
outputFile.write("<tr>\n")
|
| 378 |
nino.borges |
514 |
count = 0
|
| 379 |
nino.borges |
521 |
for y in x[:9]:
|
| 380 |
nino.borges |
514 |
if count == 0:
|
| 381 |
|
|
outputFile.write('<td><a href="data/%s.html">%s</a></td>'%(y.replace('"',""),y))
|
| 382 |
|
|
else:
|
| 383 |
|
|
outputFile.write("<td>%s</td>"%y)
|
| 384 |
|
|
count = count + 1
|
| 385 |
nino.borges |
503 |
outputFile.write("</tr>\n")
|
| 386 |
|
|
outputFile.write("</table></center><br><br>\n")
|
| 387 |
nino.borges |
502 |
else:
|
| 388 |
|
|
pass
|
| 389 |
|
|
##
|
| 390 |
|
|
## outputFile.write('<h2>%s</h2>\n'% headdingList[0])
|
| 391 |
|
|
## outputFile.write('''<hr width="40%">''')
|
| 392 |
|
|
## for section in currentMatrix.keys():
|
| 393 |
|
|
## outputFile.write("<h3>%s</h3>\n"%section)
|
| 394 |
|
|
## outputFile.write("<center><table border=1 cellspacing=0 cellpadding=5 width=90%>\n")
|
| 395 |
|
|
## outputFile.write("<tr><th>ID</th><th>KPMG Status</th><th>MWE Status</th><th>TE Prefix</th><th>TE Description</th><th>Reporter</th><th>Assignee</th><th>Created On</th><th>Modified On</th></tr>")
|
| 396 |
|
|
## for x in currentMatrix[section]:
|
| 397 |
|
|
## outputFile.write("<tr>\n")
|
| 398 |
|
|
## for y in x:
|
| 399 |
|
|
## outputFile.write("<td>%s</td>"%y)
|
| 400 |
|
|
## outputFile.write("</tr>\n")
|
| 401 |
|
|
## outputFile.write("</table></center>\n")
|
| 402 |
|
|
outputFile.close()
|
| 403 |
|
|
|
| 404 |
nino.borges |
514 |
def CreateDetailPages(dataDir,matrix):
|
| 405 |
|
|
"""Creates all of the indv task detail pages"""
|
| 406 |
|
|
for i in matrix.keys():
|
| 407 |
|
|
for y in matrix[i]:
|
| 408 |
|
|
fileName = "%s.html"%y[0].replace('"','')
|
| 409 |
|
|
#fileName = "%s.html"%matrix[i][0][0].replace('"','')
|
| 410 |
|
|
outputFile = open(os.path.join(dataDir,fileName),'w')
|
| 411 |
|
|
CreateBaseReport(outputFile,"../main.css")
|
| 412 |
|
|
|
| 413 |
|
|
outputFile = open(os.path.join(dataDir,fileName),'a')
|
| 414 |
|
|
outputFile.write("""
|
| 415 |
|
|
<div id="main">
|
| 416 |
|
|
<div id="sidebar">
|
| 417 |
|
|
<div class="sidebarbox">
|
| 418 |
nino.borges |
521 |
<h2>Realization</h2>
|
| 419 |
|
|
<table>""")
|
| 420 |
|
|
outputFile.write(' <tr><td>Estimated:</td><td>%s</td>\n <tr></tr><tr><td>Actual:</td><td>%s</td>'%(y[10],y[9]))
|
| 421 |
|
|
outputFile.write("""
|
| 422 |
|
|
</table>
|
| 423 |
|
|
<center>
|
| 424 |
|
|
<hr "3%">
|
| 425 |
|
|
</center>
|
| 426 |
|
|
</div>
|
| 427 |
|
|
|
| 428 |
|
|
|
| 429 |
|
|
""")
|
| 430 |
|
|
outputFile.write("""
|
| 431 |
|
|
|
| 432 |
|
|
<div class="sidebarbox">
|
| 433 |
nino.borges |
514 |
<h2>Text box</h2>
|
| 434 |
|
|
<p>Important links:</p>
|
| 435 |
|
|
<ul>
|
| 436 |
|
|
<li><a href="https://fts.shs.us.kpmg.com/vpn/index.html">KPMG Relativity</a></li>
|
| 437 |
|
|
<li><a href="#">Another</a></li>
|
| 438 |
|
|
</ul>
|
| 439 |
|
|
</div>
|
| 440 |
|
|
</div>
|
| 441 |
|
|
|
| 442 |
|
|
<div id="content">
|
| 443 |
|
|
""")
|
| 444 |
nino.borges |
521 |
outputFile.write("<br><br><br><br><table>\n<form>")
|
| 445 |
|
|
outputFile.write('<tr><td><label for="id">Object ID:</label></td><td><input type="text" name="id" size="30" value=" %s" disabled="Disabled"></td></tr>\n'%y[0].replace('"',''))
|
| 446 |
|
|
outputFile.write('<tr><td><label for="kpmgStatus">KPMG Status:</label></td><td><input type="text" size="30" name="kpmgStatus" placeholder=" %s" disabled></td></tr>\n'%y[1].replace('"',''))
|
| 447 |
|
|
outputFile.write('<tr><td><label for="mweStatus">MWE Status:</label></td><td><input type="text" size="30" name="mweStatus" placeholder=" %s" disabled></td></tr>\n'%y[2].replace('"',''))
|
| 448 |
|
|
outputFile.write('<tr><td><label for="TE_Prefix">Time Entry Prefix:</label></td><td><input type="text" size="30" name="TE_Prefix" value=" %s" disabled></td></tr>\n'%y[3].replace('"',''))
|
| 449 |
nino.borges |
514 |
|
| 450 |
nino.borges |
521 |
outputFile.write('<tr><td><label for="Requestor">Requestor:</label></td><td><input type="text" size="30" name="Requestor" value=" %s" disabled></td></tr>\n'%y[5].replace('"',''))
|
| 451 |
|
|
outputFile.write('<tr><td><label for="assignedTo">Assigned to:</label></td><td><input type="text" size="30" name="assignedTo" value=" %s" disabled></td></tr>\n'%y[6].replace('"',''))
|
| 452 |
|
|
outputFile.write('<tr><td><label for="Created">Created:</label></td><td><input type="text" size="30" name="Created" value=" %s" disabled></td></tr>\n'%y[7].replace('"',''))
|
| 453 |
|
|
outputFile.write('<tr><td><label for="Modified">Last Modified:</label></td><td><input type="text" size="30" name="Modified" value=" %s" disabled></td></tr></table>\n<br><br>\n'%y[8].replace('"',''))
|
| 454 |
|
|
outputFile.write('<label for="TE_Descr">Time Entry Description:</label><br><textarea rows="4" cols="50" name="TE_Descr" disabled> %s</textarea><br>\n'%y[4].replace('"',''))
|
| 455 |
nino.borges |
519 |
outputFile.write("</form>\n")
|
| 456 |
nino.borges |
514 |
outputFile.close()
|
| 457 |
|
|
|
| 458 |
|
|
FinishReport(open(os.path.join(dataDir,fileName),'a'))
|
| 459 |
|
|
|
| 460 |
|
|
|
| 461 |
nino.borges |
499 |
if __name__ == '__main__':
|
| 462 |
nino.borges |
522 |
exportFile = "/Users/ninoborges/Dropbox/Misc/export.csv"
|
| 463 |
|
|
indexFile = "/Users/ninoborges/Documents/ITO_Report/index2.html"
|
| 464 |
|
|
kpmgFile = "/Users/ninoborges/Documents/ITO_Report/KPMGs_Plate.html"
|
| 465 |
|
|
closedFile = "/Users/ninoborges/Documents/ITO_Report/Closed_Items.html"
|
| 466 |
|
|
projectViewFile = "/Users/ninoborges/Documents/ITO_Report/Project_View.html"
|
| 467 |
|
|
dataDir = "/Users/ninoborges/Documents/ITO_Report/Data"
|
| 468 |
nino.borges |
514 |
#exportFile = "T:\honeywell\ITO_Report\Export\export.csv"
|
| 469 |
|
|
#indexFile= "T:\honeywell\ITO_Report\index2.html"
|
| 470 |
|
|
#kpmgFile = "T:\honeywell\ITO_Report\KPMGs_Plate.html"
|
| 471 |
|
|
#closedFile = "T:\honeywell\ITO_Report\Closed_Items.html"
|
| 472 |
|
|
#projectViewFile = "T:\honeywell\ITO_Report\Project_View.html"
|
| 473 |
nino.borges |
519 |
#dataDir =
|
| 474 |
nino.borges |
522 |
#exportFile = r"T:\honeywell\ITO_Report\Export\export.csv"
|
| 475 |
|
|
#indexFile= r"\\nykads01\data\CLI\_Manny_Borges_BOS\ITO_Report\index2.html"
|
| 476 |
|
|
#kpmgFile = r"\\nykads01\data\CLI\_Manny_Borges_BOS\ITO_Report\KPMGs_Plate.html"
|
| 477 |
|
|
#closedFile = r"\\nykads01\data\CLI\_Manny_Borges_BOS\ITO_Report\Closed_Items.html"
|
| 478 |
|
|
#projectViewFile = r"\\nykads01\data\CLI\_Manny_Borges_BOS\ITO_Report\Project_View.html"
|
| 479 |
|
|
#dataDir = r"\\nykads01\data\CLI\_Manny_Borges_BOS\ITO_Report\Data"
|
| 480 |
nino.borges |
499 |
openMWEList,openKPMGList, closedList = SplitIntoPlates(exportFile)
|
| 481 |
|
|
print "mwe list %s"%len(openMWEList)
|
| 482 |
|
|
print "kpmg list %s"%len(openKPMGList)
|
| 483 |
|
|
print "closed list %s"%len(closedList)
|
| 484 |
|
|
mwePlate = SplitIntoSections(openMWEList)
|
| 485 |
|
|
kpmgPlate = SplitIntoSections(openKPMGList)
|
| 486 |
|
|
closedPlate = SplitIntoSections(closedList)
|
| 487 |
|
|
|
| 488 |
nino.borges |
502 |
headdingList = ["MWE's Plate (%s items)"%len(openMWEList),"KPMG's Plate (%s items)"%len(openKPMGList),"Closed Requests (%s items)"%len(closedList)]
|
| 489 |
|
|
|
| 490 |
nino.borges |
514 |
CreateDetailPages(dataDir,mwePlate)
|
| 491 |
|
|
CreateDetailPages(dataDir,kpmgPlate)
|
| 492 |
|
|
CreateDetailPages(dataDir,closedPlate)
|
| 493 |
|
|
|
| 494 |
nino.borges |
502 |
CreateBaseReport(open(indexFile,'w'))
|
| 495 |
|
|
CreateBaseReport(open(kpmgFile,'w'))
|
| 496 |
|
|
CreateBaseReport(open(closedFile,'w'))
|
| 497 |
|
|
CreateBaseReport(open(projectViewFile,'w'))
|
| 498 |
|
|
|
| 499 |
|
|
ProcessToHTML(mwePlate,open(indexFile,'a'),headdingList,"MWE's List")
|
| 500 |
|
|
ProcessToHTML(kpmgPlate,open(kpmgFile,'a'),headdingList,"KPMG's List")
|
| 501 |
|
|
ProcessToHTML(closedPlate,open(closedFile,'a'),headdingList,"Closed List")
|
| 502 |
nino.borges |
505 |
GetProjectList(mwePlate,kpmgPlate,closedPlate,open(projectViewFile,'a'),headdingList)
|
| 503 |
nino.borges |
502 |
|
| 504 |
|
|
FinishReport(open(indexFile,'a'))
|
| 505 |
|
|
FinishReport(open(kpmgFile,'a'))
|
| 506 |
|
|
FinishReport(open(closedFile,'a'))
|
| 507 |
nino.borges |
504 |
FinishReport(open(projectViewFile,'a'))
|
| 508 |
nino.borges |
505 |
|