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