Created
October 20, 2024 21:57
-
-
Save Ze1598/4abf117a36a4a704eff5871237f4ad0d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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