浏览代码

company: show production amount

raylu 1 周之前
父节点
当前提交
bf1bf3267b
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      company.py

+ 3 - 2
company.py

@@ -28,9 +28,10 @@ def main() -> None:
 	print()
 
 	company_report = integration.pmmg_monthly_report()[company['CompanyId']]
-	for mat in company_report.keys():
+	for mat, production in company_report.items():
 		expertise = experts.get(mat)
-		print(mat, expertise, ', '.join(cogc_planets.get(expertise, []))) # pyright: ignore[reportArgumentType, reportCallIssue]
+		print(f'{mat:3} {production["amount"]:8,.0f} {expertise or '':19}',
+				', '.join(cogc_planets.get(expertise, []))) # pyright: ignore[reportArgumentType, reportCallIssue]
 
 def iter_planet_cogc() -> typing.Iterator[tuple[Planet, Expertise | None]]:
 	all_planets: typing.Collection[Planet] = cache.get('https://universemap.taiyibureau.de/planet_data.json',