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 C |
6 | link = build_link(p, msg, color) |
7 | print "* TODO %s" % (link) | |
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 | |
23 | # will be deprecated. | |
24 | # | |
951c7801 | 25 | def print_main(msg, p, color="ovl-face1") : |
5636bb2c C |
26 | if msg == "" : |
27 | oldmsgfmt = "%s::%s" % (p[0].file,p[0].line) | |
28 | else: | |
29 | oldmsgfmt = "%s %s::%s" % (msg,p[0].file,p[0].line) | |
7f004419 | 30 | print_todo(p[0], oldmsgfmt, color) |
951c7801 C |
31 | |
32 | def print_sec(msg, p, color="ovl-face2") : | |
7f004419 | 33 | print_link(p[0], msg, color) |
951c7801 C |
34 | |
35 | def print_secs(msg, ps, color="ovl-face2") : | |
36 | for i in ps: | |
7f004419 | 37 | print_link (i, msg, color) |