Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
analytics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
nomad-lab
analytics
Merge requests
!18
Metainfos
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Metainfos
metainfos
into
master
Overview
0
Commits
2
Pipelines
1
Changes
2
Merged
Adam Fekete
requested to merge
metainfos
into
master
5 years ago
Overview
0
Commits
2
Pipelines
1
Changes
2
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
2d27e7df
2 commits,
5 years ago
2 files
+
37
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
.gitlab-ci/generate_tutorials_json.py
0 → 100644
+
32
−
0
Options
import
json
import
sys
from
pathlib
import
Path
cwd
=
Path
(
__file__
).
parent
def
iter_folders
(
path
):
for
file
in
path
.
glob
(
'
**/metainfo.json
'
):
with
open
(
file
)
as
f
:
yield
json
.
load
(
f
)
def
save_into_file
(
data
:
dict
):
if
len
(
sys
.
argv
)
!=
2
:
print
(
"
Please define an json file as output!
"
)
exit
(
1
)
output
=
sys
.
argv
[
1
]
with
open
(
output
,
'
w
'
)
as
f
:
json
.
dump
(
data
,
f
,
indent
=
2
)
if
__name__
==
'
__main__
'
:
# Defining the relative path of the tutorials
path
=
cwd
/
'
../tutorials/
'
list_of_tutorials
=
{
'
tutorials
'
:
list
(
iter_folders
(
path
))}
print
(
json
.
dumps
(
list_of_tutorials
,
indent
=
2
))
save_into_file
(
list_of_tutorials
)
Loading