def spc(s):
return s.replace(" ", " ")
+bugurl = "https://bugs.libre-soc.org/show_bug.cgi?bug="
def main():
parser = argparse.ArgumentParser(
reportdir = "/".join(reportdir.split("/")[:-1]) # strip /mdwn
reportname = reportdir + "/report.mdwn"
with open(reportname, "w") as f:
- print("<tt>", file=f) # for using the output as markdown
+ print("<pre>", file=f) # for using the output as markdown
bz = Bugzilla(config.bugzilla_url)
if args.username:
logging.debug("logging in...")
write_budget_markdown(budget_graph, args.output_dir)
write_budget_csv(budget_graph, args.output_dir)
summarize_milestones(f, budget_graph, detail=args.detail)
- print("</tt>", file=f) # for using the output as markdown
+ print("</pre>", file=f) # for using the output as markdown
# now create the JSON milestone files for putting into NLnet RFP system
json_milestones(budget_graph, args.comments, args.output_dir)
excl_desc = " "
if b_incl != b_excl:
excl_desc = "excltasks %6s" % b_excl
- print(spc("bug #%5d %s budget %6s %s %s<br>" %
- (bug.bug.id, ' | ' * indent,
+ bugid = spc("%5d" % bug.bug.id)
+ buglink = "<a href='%s%d'>%s</a>" % (bugurl, bug.bug.id, bugid)
+ print(spc("bug #URL %s budget %6s %s %s" %
+ (' | ' * indent,
b_incl,
excl_desc,
descr
- )), file=f)
+ )).replace("URL", buglink), file=f)
if detail:
- print(spc(" %s | (%s)<br>" %
+ print(spc(" %s | (%s)" %
(' | ' * indent,
bug.bug.summary[:40]
)), file=f)
def summarize_milestones(f, budget_graph, detail=False):
for milestone, payments in budget_graph.milestone_payments.items():
summary = PaymentSummary(payments)
- print(f"{milestone.identifier}<br>", file=f)
+ print(f"{milestone.identifier}", file=f)
print(f" {summary.total} submitted: "
- f"{summary.total_submitted} paid: {summary.total_paid}<br>",
+ f"{summary.total_submitted} paid: {summary.total_paid}",
file=f)
not_submitted = summary.get_not_submitted()
if not_submitted:
- print("not submitted %s<br>" % not_submitted, file=f)
+ print("not submitted %s" % not_submitted, file=f)
# and one to display people
for person in budget_graph.milestone_people[milestone]:
- print(spc(" %-30s - %s<br>" % (person.identifier,
+ print(spc(" %-30s - %s" % (person.identifier,
person.full_name)),
file=f)
- print("<br>", file=f)
+ print("", file=f)
# now do trees
for milestone, payments in budget_graph.milestone_payments.items():
- print("%s %d<br>" % (milestone.identifier, milestone.canonical_bug_id),
+ print("%s %d" % (milestone.identifier, milestone.canonical_bug_id),
file=f)
print_budget_then_children(f, 0, budget_graph.nodes,
milestone.canonical_bug_id, detail)
- print("<br>", file=f)
+ print("", file=f)
def json_milestones(budget_graph: BudgetGraph, add_comments: bool,