Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,18 +5,21 @@ import streamlit as st
|
|
5 |
st.sidebar.title('GitHub Functions')
|
6 |
|
7 |
url = st.sidebar.text_input("GitHub URL")
|
|
|
|
|
8 |
|
9 |
if st.sidebar.button("Pull & Read"):
|
10 |
-
|
11 |
|
12 |
if st.sidebar.button("Append & Write"):
|
13 |
-
|
14 |
|
15 |
if st.sidebar.button("Create File"):
|
16 |
-
|
17 |
|
18 |
if st.sidebar.button("Delete File"):
|
19 |
-
|
|
|
20 |
|
21 |
def pull_files_from_github_url(url):
|
22 |
import os
|
@@ -33,6 +36,3 @@ def pull_files_from_github_url(url):
|
|
33 |
repo = Repo(dir_name)
|
34 |
return [item.a_path for item in repo.tree.traverse()]
|
35 |
|
36 |
-
|
37 |
-
url = 'https://github.com/AaronCWacker/Yggdrasil'
|
38 |
-
pull_files_from_github_url(url)
|
|
|
5 |
st.sidebar.title('GitHub Functions')
|
6 |
|
7 |
url = st.sidebar.text_input("GitHub URL")
|
8 |
+
url = 'https://github.com/AaronCWacker/Yggdrasil'
|
9 |
+
|
10 |
|
11 |
if st.sidebar.button("Pull & Read"):
|
12 |
+
pull_files_from_github_url(url)
|
13 |
|
14 |
if st.sidebar.button("Append & Write"):
|
15 |
+
pull_files_from_github_url(url)
|
16 |
|
17 |
if st.sidebar.button("Create File"):
|
18 |
+
pull_files_from_github_url(url)
|
19 |
|
20 |
if st.sidebar.button("Delete File"):
|
21 |
+
pull_files_from_github_url(url)
|
22 |
+
|
23 |
|
24 |
def pull_files_from_github_url(url):
|
25 |
import os
|
|
|
36 |
repo = Repo(dir_name)
|
37 |
return [item.a_path for item in repo.tree.traverse()]
|
38 |
|
|
|
|
|
|