Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
it4i-modules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SCS
it4i-modules
Commits
67f02ae7
Commit
67f02ae7
authored
7 years ago
by
Lukáš Krupčík
Browse files
Options
Downloads
Patches
Plain Diff
Mon, 27 Nov 2017 16:52:38 +0100
parent
626397cf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules.py
+10
-4
10 additions, 4 deletions
modules.py
salomon.md
+248
-645
248 additions, 645 deletions
salomon.md
with
258 additions
and
649 deletions
modules.py
+
10
−
4
View file @
67f02ae7
...
...
@@ -22,16 +22,22 @@ def get_software_versions(software_path):
def
get_module_description
(
module_path
):
"""
Return software homepage URL and description
"""
url
=
""
url_position
=
0
description
=
"
"
with
open
(
module_path
)
as
f
:
content
=
f
.
read
()
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+)(\]\]|\]==\])\)
"
,
if
module_path
.
endswith
(
'
lua
'
):
data
=
re
.
search
(
r
"
whatis\((\[\[|\[==\[)Description: ?([\s\S]+)(\]\]|\]==\])\)\s+whatis\((\[\[|\[==\[)Homepage:\s(\S+)(\]\]|\]==\])\)
"
,
content
,
re
.
DOTALL
)
url_position
=
5
else
:
data
=
re
.
search
(
r
"
module-whatis\s{(Description: )?(.+)\s-\sHomepage:\s(\S+)}
"
,
content
,
re
.
DOTALL
)
url_position
=
3
try
:
description
=
data
.
group
(
2
)
url
=
data
.
group
(
5
)
url
=
data
.
group
(
url_position
)
except
AttributeError
:
pass
return
url
,
description
...
...
This diff is collapsed.
Click to expand it.
salomon.md
+
248
−
645
View file @
67f02ae7
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment