Skip to content
Snippets Groups Projects
Commit 0c6f5822 authored by Nils Brueggemann's avatar Nils Brueggemann
Browse files

doc/notebooks_nblink/link_notebooks.py: Allow notebooks to be ignorred to be linked.

parent 06fa80aa
No related branches found
No related tags found
No related merge requests found
Pipeline #34301 passed
{
"path": "../../notebooks/examp_pyicon_start_Mac.ipynb"
}
\ No newline at end of file
......@@ -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}}')
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