Skip to content

Commit 26223f6

Browse files
authored
update notebook generation script (#1121)
1 parent 68bd9e0 commit 26223f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/scripts/generate_notebooks_md.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def make_url_from_chapter_no_and_script_name(
4747
(chapter_no = 3,script_name=iris_plot.ipynb) converted to https://github.com/probml/pyprobml/blob/master/notebooks/book1/01/iris_plot.ipynb
4848
convert_to_which_url = Union["github","colab","gihub-raw"]
4949
"""
50-
base_url_ipynb = os.path.join(base_url, f"book{book_no}/{int(chapter_no):02d}")
50+
base_url_ipynb = os.path.join(base_url, f"book{book_no}/{chapter_no}")
5151
if script_name.strip().endswith(".py"):
5252
script_name = script_name[:-3] + ".ipynb"
5353
github_url = os.path.join(base_url_ipynb, script_name)
@@ -164,7 +164,7 @@ def to_colab_md_url(github_url):
164164
# df_pyprobml["type"] = "github"
165165
df_pyprobml["github_url"] = df_pyprobml.apply(
166166
lambda x: make_url_from_chapter_no_and_script_name(
167-
chapter_no=int(x["chap_no"]),
167+
chapter_no=x["chap_no"],
168168
script_name=x["Notebook"],
169169
book_no=int(x["book_no"][-1]),
170170
convert_to_which_url="github",

0 commit comments

Comments
 (0)