2 # -*- coding: utf-8 -*-
4 from __future__
import print_function
11 inputFile
= sys
.argv
[1]
12 inp
= open(inputFile
, "r")
16 pattern
= re
.compile("#\d+")
22 line
= line
.strip('\r\n')
26 if line
.startswith("<"):
28 if line
.startswith("["):
33 # print("line: %s" % line)
34 found
= re
.findall(pattern
, line
)
37 line
= line
.replace(issue
, '')
39 issue_links
= ["<a href=https://github.com/opentx/opentx/issues/%d>#%d</a>" % (int(issue
[1:]), int(issue
[1:])) for issue
in found
]
40 links
= "(" + ", ".join(issue_links
) + ")"
41 line
= "<li>" + line
+ " " + links
+ "</li>"