Skip to content
Snippets Groups Projects
Commit c0d77c60 authored by easybuild's avatar easybuild
Browse files

fix

parent 9c49dcd9
No related branches found
No related tags found
No related merge requests found
Pipeline #38086 failed
#!/usr/bin/env python
#!/usr/bin/env python3
"""Script to generate module lists"""
import os
......@@ -43,10 +43,17 @@ if __name__ == "__main__":
SUBDIRS = os.environ['MODULEPATH'].split(':')
for subdir in sorted(SUBDIRS, key=lambda s: s.lower()):
# Ignore the specific path
if subdir == "/apps/all/Lmod/8.7.37/modulefiles/Core":
continue
if subdir == "/apps/all/Lmod/8.7.37/modulefiles/Linux":
continue
available_software = get_software_list(subdir)
print "\n## %s\n" % os.path.basename(subdir).title()
print "| Module | Description |"
print "| ------ | ----------- |"
print("\n## {}\n".format(os.path.basename(subdir).title()))
print("| Module | Description |")
print("| ------ | ----------- |")
HTML_SOURCE_DATA[subdir] = {}
for soft in sorted(available_software, key=str.lower):
software_path = os.path.join(subdir, soft)
......@@ -63,6 +70,6 @@ if __name__ == "__main__":
for version in software_versions:
HTML_SOURCE_DATA[subdir][soft]['versions'].append(version)
if software_url in ["", "(none)", "N/A"]:
print "| %s | %s |" % (soft, " ".join(software_description.split()))
print("| {} | {} |".format(soft, " ".join(software_description.split())))
else:
print "| [%s](%s) | %s |" % (soft, software_url, " ".join(software_description.split()))
print("| [{}]({}) | {} |".format(soft, software_url, " ".join(software_description.split())))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment