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

Mon, 27 Nov 2017 16:45:03 +0100

parent f1311868
No related branches found
No related tags found
No related merge requests found
......@@ -25,11 +25,13 @@ def get_module_description(module_path):
description = " "
with open(module_path) as f:
content = f.read()
data = re.search(r"module-whatis\s{(Description: )?(.+)\s-\sHomepage:\s(\S+)}",
content, re.DOTALL)
print(module_path)
#data = re.search(r"module-whatis\s{(Description: )?(.+)\s-\sHomepage:\s(\S+)}",
data = re.search(r"whatis\((\[\[|\[==\[)Description: ?([\s\S]+)(\]\]|\]==\])\)\s+whatis\((\[\[|\[==\[)Homepage:\s(\S+)(\]\]|\]==\])\)",
content, re.DOTALL)
try:
description = data.group(2)
url = data.group(3)
url = data.group(5)
except AttributeError:
pass
return url, description
......
This diff is collapsed.
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