Skip to content

Commit

Permalink
CHANGE: setup change page for app
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMonks committed Apr 22, 2024
1 parent 4095b8c commit 9482c8f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Change Log

## v3.0.0

22nd April 2024
Expand Down
38 changes: 38 additions & 0 deletions pages/7_🗒️_Change_Log.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
'''
Change log page
A list of changes to each version of the app
'''

import streamlit as st
import urllib.request as request

FILE = (
"https://raw.githubusercontent.com/pythonhealthdatascience/"
+ "stars-streamlit-example/main/CHANGES.md"
)


def read_file_contents(path):
"""
Download the content of a file from the GitHub Repo and return as a utf-8 string
Notes:
-------
adapted from 'https://github.com/streamlit/demo-self-driving'
Parameters:
----------
path: str
e.g. file_name.md
Returns:
--------
utf-8 str
"""
response = request.urlopen(path)
return response.read().decode("utf-8")


st.markdown(read_file_contents(FILE))

0 comments on commit 9482c8f

Please sign in to comment.