get output of budget_sync into markdown form, for uploading to libre-soc
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 13 Jul 2022 12:39:10 +0000 (13:39 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 13 Jul 2022 12:39:10 +0000 (13:39 +0100)
Makefile
src/budget_sync/main.py

index c7789308c072cc3c9cb9eabe8528dc8fa3d8944e..b3ac7fa5065458fc2583fa56aba6126b039aa389 100644 (file)
--- 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/* \
index 1e1c61cefafde38c03b905e1f77a90cbc18c51e0..09f68f926f0e791618a653085bafcfae7506e175 100644 (file)
@@ -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()