From 8089fbaaf914b1b68adbb43f6bb1728849f87508 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 13 Jul 2022 13:39:10 +0100 Subject: [PATCH] get output of budget_sync into markdown form, for uploading to libre-soc --- Makefile | 2 +- src/budget_sync/main.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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() -- 2.30.2