Skip to content

Commit

Permalink
Only include myst converted cookbooks in gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
jmunroe committed Jun 13, 2024
1 parent fb21f5f commit bf3d100
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions cookbook_gallery.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
HRRR-AWS-cookbook
radar-cookbook
advanced-viz-cookbook
10 changes: 4 additions & 6 deletions pythia-gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def fetch_yaml(url: str):


def render_cookbook(name: str):
raw_base_url = f"https://raw.githubusercontent.com/ProjectPythia/{name}/main"
base_url = f"https://github.com/ProjectPythia/{name}"
raw_base_url = f"https://raw.githubusercontent.com/ProjectPythia-MystMD/{name}/main"
base_url = f"https://github.com/ProjectPythia-MystMD/{name}"
config_url = f"{raw_base_url}/_config.yml"
book_url = f"https://projectpythia.org/{name}"

Expand Down Expand Up @@ -73,10 +73,8 @@ def render_cookbook(name: str):


def render_cookbooks(pool):
with urllib.request.urlopen(
"https://raw.githubusercontent.com/ProjectPythia/cookbook-gallery/main/site/cookbook_gallery.txt"
) as response:
body = response.read().decode()
with open("cookbook_gallery.txt") as f:
body = f.read()

return [*pool.map(render_cookbook, body.splitlines())]

Expand Down
4 changes: 3 additions & 1 deletion root.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Project Pythia Cookbook Gallery
# Cookbooks Gallery

*Only includes Cookbooks from ProjectPythia-MystMD*

Pythia Cookbooks provide example workflows on more advanced and domain-specific problems developed by the Pythia community. Cookbooks build on top of skills you learn in [Pythia Foundations](https://foundations.projectpythia.org/landing-page.html).

Expand Down

0 comments on commit bf3d100

Please sign in to comment.