Skip to content

Commit

Permalink
Merge pull request #854 from xylar/add_web_address
Browse files Browse the repository at this point in the history
Print the URL for the web page
  • Loading branch information
xylar committed Jan 23, 2022
2 parents 83ae89f + f2f8a7c commit 238397e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion mpas_analysis/shared/html/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,17 @@ def generate_html(config, analyses, controlConfig, customConfigFiles):

page.generate()

print("Done.")
url = None
if config.has_section('web_portal'):
section = config['web_portal']
base_path = section.get('base_path')
base_url = section.get('base_url')
html_dir = config.get('output', 'htmlSubdirectory')
if html_dir.startswith(base_path):
url = base_url + html_dir[len(base_path):]
print(f'Web page: {url}')
if url is None:
print("Done.")

# }}}

Expand Down

0 comments on commit 238397e

Please sign in to comment.