Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pyicon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Nils Brüggemann
pyicon
Commits
0c6f5822
Commit
0c6f5822
authored
1 year ago
by
Nils Brueggemann
Browse files
Options
Downloads
Patches
Plain Diff
doc/notebooks_nblink/link_notebooks.py: Allow notebooks to be ignorred to be linked.
parent
06fa80aa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#34301
passed
1 year ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/notebooks_nblink/examp_pyicon_start_Mac.nblink
+0
-3
0 additions, 3 deletions
doc/notebooks_nblink/examp_pyicon_start_Mac.nblink
doc/notebooks_nblink/link_notebooks.py
+10
-4
10 additions, 4 deletions
doc/notebooks_nblink/link_notebooks.py
with
10 additions
and
7 deletions
doc/notebooks_nblink/examp_pyicon_start_Mac.nblink
deleted
100644 → 0
+
0
−
3
View file @
06fa80aa
{
"path": "../../notebooks/examp_pyicon_start_Mac.ipynb"
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
doc/notebooks_nblink/link_notebooks.py
+
10
−
4
View file @
0c6f5822
...
...
@@ -5,9 +5,15 @@ import glob
flist
=
glob
.
glob
(
'
../../notebooks/*.ipynb
'
)
flist
.
sort
()
redlist
=
[
'
examp_pyicon_start_Mac
'
]
for
fpath
in
flist
:
fpath_link
=
'
./
'
+
fpath
.
split
(
'
/
'
)[
-
1
].
split
(
"
.ipynb
"
)[
0
]
+
'
.nblink
'
print
(
f
'
Linking:
{
fpath
}
->
{
fpath_link
}
'
)
with
open
(
fpath_link
,
'
w
'
)
as
f
:
f
.
write
(
f
'
{{
\n
"
path
"
:
"
{
fpath
}
"
\n
}}
'
)
name
=
fpath
.
split
(
'
/
'
)[
-
1
].
split
(
"
.ipynb
"
)[
0
]
fpath_link
=
'
./
'
+
name
+
'
.nblink
'
if
name
in
redlist
:
print
(
f
'
Ignorring:
{
name
}
'
)
else
:
print
(
f
'
Linking:
{
fpath
}
->
{
fpath_link
}
'
)
with
open
(
fpath_link
,
'
w
'
)
as
f
:
f
.
write
(
f
'
{{
\n
"
path
"
:
"
{
fpath
}
"
\n
}}
'
)
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