From: Luke Kenneth Casson Leighton Date: Wed, 13 Jul 2022 12:39:10 +0000 (+0100) Subject: get output of budget_sync into markdown form, for uploading to libre-soc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8089fbaaf914b1b68adbb43f6bb1728849f87508;p=utils.git get output of budget_sync into markdown form, for uploading to libre-soc --- diff --git a/Makefile b/Makefile index c778930..b3ac7fa 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHANTOM: build upload clean build: - budget-sync -c budget-sync-config.toml -o task_db/mdwn + nohup budget-sync -c budget-sync-config.toml -o task_db/mdwn > task_db/report.mdwn upload: build rsync -HPavz -e 'ssh -p 922' --delete task_db/* \ diff --git a/src/budget_sync/main.py b/src/budget_sync/main.py index 1e1c61c..09f68f9 100644 --- a/src/budget_sync/main.py +++ b/src/budget_sync/main.py @@ -45,6 +45,7 @@ def main(): except (IOError, ConfigParseError) as e: logging.error("Failed to parse config file: %s", e) return + print ("```") # for using the output as markdown logging.info("Using Bugzilla instance at %s", config.bugzilla_url) bz = Bugzilla(config.bugzilla_url) if args.username: @@ -118,7 +119,7 @@ def summarize_milestones(budget_graph: BudgetGraph): # and one to display people for person in budget_graph.milestone_people[milestone]: - print(f"\t{person.identifier}") + print(f"\t%s (%s)" % (person.identifier, person.full_name)) print() # now do trees @@ -128,6 +129,8 @@ def summarize_milestones(budget_graph: BudgetGraph): milestone.canonical_bug_id) print() + print ("```") # for using the output as markdown + if __name__ == "__main__": main()