소스 검색

company: show production amount

raylu 1 주 전
부모
커밋
537817eb7c
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      company.py

+ 3 - 2
company.py

@@ -29,9 +29,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',