-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
streamlit run already supports "raw" Github and Gist URLs today. But we'd also like to support the "non-raw" version.
For example, this:
streamlit run https://gist.github.com/tvst/faf057abbedaccaa70b48216a1866cdd
doesn't work, but if you go to that Gist and copy the "raw" URL, that does work:
https://gist.githubusercontent.com/tvst/faf057abbedaccaa70b48216a1866cdd/raw/83b124b20e235291930f85bf4f905101eecedc90/session_state_example.py
For this FR, we should make the first resolve to the second. In the case of Gist URLs, I think we can just change the domain name to gist.githubusercontent.com and add /raw to the end of the URL. You don't seem to need everything that comes after that.
Similarly, for a Github URL like https://github.com/streamlit/streamlit/blob/develop/lib/streamlit/hello.py, I think you just need to change the domain name and get rid of the part that says blob/$branch_name/. So you'd get this: https://raw.githubusercontent.com/streamlit/streamlit/develop/lib/streamlit/hello.py