Skip to content

Instantly share code, notes, and snippets.

@Ze1598
Created October 20, 2024 21:57
Show Gist options
  • Save Ze1598/4abf117a36a4a704eff5871237f4ad0d to your computer and use it in GitHub Desktop.
Save Ze1598/4abf117a36a4a704eff5871237f4ad0d to your computer and use it in GitHub Desktop.
import streamlit as st
from notion_api import *
import os
page_name = os.path.basename(__file__).replace(".py", "")
st.set_page_config(
page_title = page_name
)
st.markdown(f"# {page_name}")
child_pages = get_child_pages(BASE_PAGE_ID, NOTION_KEY)
formula_pages = {page["child_page"]["title"]: page["id"] for page in child_pages}
page_bullets = {formula: get_page_bullets(formula_pages[formula], NOTION_KEY) for formula in formula_pages}
display_string = "\n".join([f"* {bullet_item}" for bullet_item in page_bullets[page_name]])
st.markdown(display_string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment