Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
howto-cards LEGACY VERSION
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Gitlab will go in to maintenance on Friday 5:30pm since SIU is doing Isilon maintenance and we use isilon shares on the Gitlab
You are on a read-only GitLab instance.
Show more breadcrumbs
R3
howto-cards LEGACY VERSION
Commits
08394c3f
Verified
Commit
08394c3f
authored
2 years ago
by
Laurent Heirendt
Browse files
Options
Downloads
Patches
Plain Diff
prepare qms
parent
39cd9dc0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!403
[release] Regular merge of develop
,
!397
integrate QMS
Pipeline
#61664
failed
2 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.ci/generateIndex.py
+30
-0
30 additions, 0 deletions
.ci/generateIndex.py
with
30 additions
and
0 deletions
.ci/generateIndex.py
+
30
−
0
View file @
08394c3f
...
...
@@ -239,6 +239,35 @@ def generate_whitelist_entry(folder, permalink, shortcut):
return
wl_entry
def
prepare_qms
(
localroot
,
root
,
filename
):
os
.
chdir
(
root
)
filedata
=
""
with
open
(
filename
,
'
r
'
)
as
file
:
for
line
in
file
:
filedata
+=
line
# shift the subtitles by 1 level down
filedata
=
filedata
.
replace
(
"
#
"
,
"
##
"
)
# replace latex command for titles
filedata
=
filedata
.
replace
(
"
{-}
"
,
"
##
"
)
# deal with img location
filedata
=
filedata
.
replace
(
"
policies/
"
+
filename
[:
-
3
]
+
"
/
"
,
""
)
filedata
=
filedata
.
replace
(
"
sops/
"
+
filename
[:
-
3
]
+
"
/
"
,
""
)
# replace img attributes
filedata
=
filename
.
replace
(
"
{ width=50% }
"
,
""
)
# Write the file out again
with
open
(
filename
,
'
w
'
)
as
file
:
file
.
write
(
filedata
)
# change back to the local root
os
.
chdir
(
localroot
)
# loop through the entire internal tree
localroot
=
os
.
getcwd
()
...
...
@@ -310,6 +339,7 @@ for folder in cardDirs:
# extract the title from the QMS metadata
if
"
qms
"
in
root
:
title
=
save_tag
(
localroot
,
root
,
file
[:
-
3
]
+
"
.yml
"
,
"
title
"
)
prepare_qms
(
localroot
,
root
,
file
)
# remove the previous header
n
=
remove_header
(
localroot
,
root
,
file
)
...
...
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