Skip to content

Commit

Permalink
fix generate to work when tp has multiple ipynb files
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoMF committed Aug 22, 2023
1 parent 2487e3d commit e3a8b4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gepetuto/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def generate(tp_id: List[int], **kwargs):
def generate_from_id(tp_id: int):
"""Find the corresponding ipynb and folder for a given tp_id."""
folder = Path() / f"tp{tp_id}"
ipynb = next(Path().glob(f"{tp_id}-*.ipynb"))
generate_ipynb(ipynb, folder)
for ipynb in Path().glob(f"{tp_id}-*.ipynb"):
generate_ipynb(ipynb, folder)


def fix_end_of_content(content):
Expand Down

0 comments on commit e3a8b4a

Please sign in to comment.