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 77e791f commit 1c0e7d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gepetuto/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ 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)
ipynbs = Path().glob(f"{tp_id}-*.ipynb")
for ipynb in ipynbs:
generate_ipynb(ipynb, folder)


def fix_end_of_content(content):
Expand Down

0 comments on commit 1c0e7d5

Please sign in to comment.