| | 46 | # Print the Read More link |
|---|
| | 47 | print ReadMore |
|---|
| | 48 | |
|---|
| | 49 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| | 50 | |
|---|
| | 51 | def Revision(): |
|---|
| | 52 | Headline = '<font face="arial" size="3" color="D5F6A8"><b>%s</b></font><br>' |
|---|
| | 53 | Description = '<font face="arial" size="2" color="CCCCCC"><i>%s</i></font><br>' |
|---|
| | 54 | SubHead = '<font face="arial" size="2" color="FFCC33"><b>%s</b></font><br>' |
|---|
| | 55 | SubItem = '<font face="arial" size="2" color="FFFFFF">- %s</font><br>' |
|---|
| | 56 | Divider = '<hr noshade size="0" width="100%" color="FFFFFF">' |
|---|
| | 57 | OutputList = [] |
|---|
| | 58 | |
|---|
| | 59 | # Open the file and create an Objectified Object |
|---|
| | 60 | AllChanges = XMLObjectify.ObjectifyFile(open('CHANGES', 'r')) |
|---|
| | 61 | |
|---|
| | 62 | # Create a list of all releases and traverse the list |
|---|
| | 63 | for Release in AllChanges.release: |
|---|
| | 64 | # Append the date, version, and description of the release |
|---|
| | 65 | OutputList.append(Headline % (Release.date + " - version " + Release.version)) |
|---|
| | 66 | OutputList.append(Description % (Release().strip())) |
|---|
| | 67 | OutputList.append(Divider) |
|---|
| | 68 | |
|---|
| | 69 | #Create a list of features within the release and traverse the list |
|---|
| | 70 | for Feature in Release.features: |
|---|
| | 71 | # Append the feature's title |
|---|
| | 72 | OutputList.append(SubHead % (Feature.title)) |
|---|
| | 73 | # Create a list of items within each feature and traverse the list |
|---|
| | 74 | for data in filter(None, map(str.strip, Feature(None))): |
|---|
| | 75 | # Append the feature's item |
|---|
| | 76 | OutputList.append(SubItem % data) |
|---|
| | 77 | |
|---|
| | 78 | OutputList.append("<br>") |
|---|
| | 79 | |
|---|
| | 80 | OutputList.append("<br>") |
|---|
| | 81 | |
|---|
| | 82 | # Print the parsed data |
|---|
| | 83 | for index in range(len(OutputList)): |
|---|
| | 84 | print OutputList[index] |
|---|
| | 85 | |
|---|
| | 86 | |
|---|
| | 87 | |
|---|