Skip to content

Commit 7b5f7a4

Browse files
committed
Make add navigation tool print progress
1 parent 9f42681 commit 7b5f7a4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/add_navigation.py

+3
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,14 @@ def iter_navbars():
3636
def write_navbars():
3737
for nb_name, navbar in iter_navbars():
3838
nb = nbformat.read(nb_name, as_version=4)
39+
nb_file = os.path.basename(nb_name)
3940
is_comment = lambda cell: cell.source.startswith(NAV_COMMENT)
4041

4142
if is_comment(nb.cells[1]):
43+
print("- amending navbar for {0}".format(nb_file))
4244
nb.cells[1].source = navbar
4345
else:
46+
print("- inserting navbar for {0}".format(nb_file))
4447
nb.cells.insert(1, new_markdown_cell(source=navbar))
4548

4649
if is_comment(nb.cells[-1]):

0 commit comments

Comments
 (0)