Skip to content

Commit

Permalink
Merge pull request #483 from healthysustainablecities/enhancements
Browse files Browse the repository at this point in the history
updated policy report generation to more flexibly specify required cu…
  • Loading branch information
carlhiggs authored Oct 3, 2024
2 parents edf8f52 + e0f3b66 commit 6e7e9d3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions process/subprocesses/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,30 @@ def generate_policy_report(
language = 'English'
else:
language = options['language']
if 'images' in options:
r.config['reporting']['images'] = options['images']
print(
f'\nCustom image configuration:\n{r.config["reporting"]["images"]}',
)
if 'context' in options:
r.config['reporting']['languages'][language]['context'] = options[
'context'
]
print(
f'\nCustom context:\n{r.config["reporting"]["languages"][language]["context"]}',
)
if 'summary' in options:
r.config['reporting']['languages'][language]['summary'] = options[
'summary'
]
print(
f'\nCustom summary:\n{r.config["reporting"]["languages"][language]["summary"]}',
)
if 'exceptions' in options:
r.config['reporting']['exceptions'][language] = options['exceptions']
print(
f"\nCustom exceptions:\n{r.config['reporting']['exceptions'][language]}",
)
phrases = r.get_phrases(language)
font = get_and_setup_font(language, r.config)
report = generate_scorecard(
Expand Down

0 comments on commit 6e7e9d3

Please sign in to comment.