Commit | Line | Data |
---|---|---|
7f004419 C |
1 | def build_link(p, msg, color) : |
2 | return "[[view:%s::face=%s::linb=%s::colb=%s::cole=%s][%s]]" % (p.file,color,p.line,p.column,p.column_end,msg) | |
3 | ||
4 | def print_todo(p, msg="", color="ovl-face1") : | |
5636bb2c | 5 | if msg == "" : msg = "%s::%s" % (p.file,p.line) |
7f004419 | 6 | link = build_link(p, msg, color) |
d6ce1786 | 7 | print ("* TODO %s" % (link)) |
7f004419 C |
8 | |
9 | def print_link(p, msg="", color="ovl-face1") : | |
5636bb2c | 10 | if msg == "" : msg = "%s::%s" % (p.file,p.line) |
7f004419 C |
11 | print (build_link(p, msg, color)) |
12 | ||
ae4735db C |
13 | def print_safe_todo(p, msg="", color="ovl-face1") : |
14 | msg_safe=msg.replace("[","@(").replace("]",")") | |
15 | print_todo(p, msg_safe, color) | |
16 | ||
17 | def print_safe_link(p, msg="", color="ovl-face1") : | |
18 | msg_safe=msg.replace("[","@(").replace("]",")") | |
19 | print_link(p, msg_safe, color) | |
20 | ||
7f004419 C |
21 | # |
22 | # print_main, print_sec and print_secs | |
7f004419 | 23 | # |
951c7801 | 24 | def print_main(msg, p, color="ovl-face1") : |
5636bb2c C |
25 | if msg == "" : |
26 | oldmsgfmt = "%s::%s" % (p[0].file,p[0].line) | |
27 | else: | |
28 | oldmsgfmt = "%s %s::%s" % (msg,p[0].file,p[0].line) | |
7f004419 | 29 | print_todo(p[0], oldmsgfmt, color) |
951c7801 C |
30 | |
31 | def print_sec(msg, p, color="ovl-face2") : | |
7f004419 | 32 | print_link(p[0], msg, color) |
951c7801 C |
33 | |
34 | def print_secs(msg, ps, color="ovl-face2") : | |
35 | for i in ps: | |
7f004419 | 36 | print_link (i, msg, color) |