83 |
return priority[a['status'].capitalize().split()[0]] \ |
return priority[a['status'].capitalize().split()[0]] \ |
84 |
> priority[b['status'].capitalize().split()[0]] or -1 |
> priority[b['status'].capitalize().split()[0]] or -1 |
85 |
|
|
86 |
as = a['date'].split('-') |
as = a['last-modified'].split('-') |
87 |
bs = b['date'].split('-') |
bs = b['last-modified'].split('-') |
88 |
if not len(as) == 3 or not len(bs) == 3: |
if not len(as) == 3 or not len(bs) == 3: |
89 |
return len(as) < len(bs) or (len(bs) < len(as)) * -1 or 0 |
return len(as) < len(bs) or (len(bs) < len(as)) * -1 or 0 |
90 |
ac = int(as[0])*10000 + int(as[1])*100 + int(as[2]) |
ac = int(as[0])*10000 + int(as[1])*100 + int(as[2]) |
140 |
print 'Processing PEG %s' % (pegdir) |
print 'Processing PEG %s' % (pegdir) |
141 |
|
|
142 |
peg = {'authors': '', 'status': undefined, 'topic': pegdir, 'stakeholders': '', |
peg = {'authors': '', 'status': undefined, 'topic': pegdir, 'stakeholders': '', |
143 |
'date': '', 'dir': pegdir, 'files': '', 'html': '', 'rst': '', |
'last-modified': '', 'dir': pegdir, 'files': '', 'html': '', 'rst': '', |
144 |
'rstfiles': [], 'cvsignore': [] } |
'rstfiles': [], 'cvsignore': [] } |
145 |
|
|
146 |
pegfiles = [f for f in os.listdir(pegroot+'/'+pegdir+'/') \ |
pegfiles = [f for f in os.listdir(pegroot+'/'+pegdir+'/') \ |
189 |
peg['topic'] = peg['topic'].replace('``', '</tt>', 1) |
peg['topic'] = peg['topic'].replace('``', '</tt>', 1) |
190 |
else: |
else: |
191 |
peg['topic'] = peg['topic'].replace('`', '') |
peg['topic'] = peg['topic'].replace('`', '') |
192 |
peg['date'] = getTagValue(document, 'date') |
peg['last-modified'] = getTagValue(document, 'last-modified') |
193 |
#we may have got 'rawsource', which needs some tidying |
#we may have got 'rawsource', which needs some tidying |
194 |
if peg['date'].startswith('$Date'): |
if peg['last-modified'].startswith('$Date'): |
195 |
peg['date'] = peg['date'][7:len(peg['date'])-11].replace('/', '-') |
peg['last-modified'] = peg['last-modified'][7:len(peg['last-modified'])-11].replace('/', '-') |
196 |
peg['status'] = getTagValue(document, 'status') or undefined |
peg['status'] = getTagValue(document, 'status') or undefined |
197 |
peg['stakeholders'] = getFieldTagValue(document, 'stakeholder') |
peg['stakeholders'] = getFieldTagValue(document, 'stakeholder') |
198 |
if not peg['stakeholders']: |
if not peg['stakeholders']: |
236 |
pegtable.sort(pegcmp) |
pegtable.sort(pegcmp) |
237 |
|
|
238 |
replace_str = '<table class=\"pegboard\">\n<tr>\n' |
replace_str = '<table class=\"pegboard\">\n<tr>\n' |
239 |
# replace_str += '\t<th>Date</th>\n' |
# replace_str += '\t<th>Last-Modified</th>\n' |
240 |
replace_str += '\t<th>Status</th>\n\t<th>Name</th>\n\t<th>Topic</th>\n' |
replace_str += '\t<th>Status</th>\n\t<th>Name</th>\n\t<th>Topic</th>\n' |
241 |
replace_str += '\t<th>Authors</th>\n\t<th>Stakeholders</th>\n\t<th>Files</th>\n' |
replace_str += '\t<th>Authors</th>\n\t<th>Stakeholders</th>\n\t<th>Files</th>\n' |
242 |
replace_str += '</tr>\n' |
replace_str += '</tr>\n' |
247 |
replace_str += '<tr class=\"peg-'+status.lower()+'\">\n' |
replace_str += '<tr class=\"peg-'+status.lower()+'\">\n' |
248 |
else: |
else: |
249 |
replace_str += '<tr>\n' |
replace_str += '<tr>\n' |
250 |
# replace_str += '\t<td>' + peg['date'] + '</td>\n' |
# replace_str += '\t<td>' + peg['last-modified'] + '</td>\n' |
251 |
replace_str += '\t<td><small>' + status; |
replace_str += '\t<td><small>' + status; |
252 |
if len(status) > 1: |
if len(status) > 1: |
253 |
replace_str += '<br/><em>'+peg['status'][len(status)+1:len(peg['status'])]+'</em>' |
replace_str += '<br/><em>'+peg['status'][len(status)+1:len(peg['status'])]+'</em>' |