-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathapp.py
More file actions
84 lines (59 loc) · 2.58 KB
/
app.py
File metadata and controls
84 lines (59 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# _____ _
# |_ _| | |
# | | _ __ ___ _ __ ___ _ __| |_ ___
# | || '_ ` _ \| '_ \ / _ \| '__| __/ __|
# _| || | | | | | |_) | (_) | | | |_\__ \
# \___/_| |_| |_| .__/ \___/|_| \__|___/
# | |
# |_|
# -----------------------------------------------------------------------
import streamlit as st
import numpy as np
import pandas as pd
import time
import os
import pathlib
from resources.setup import setup_check, initialize_settings, check_first_time_setup, initialize_app
## Checking for first time setup, will generate settings file & only allow for first time setup screen
setup_check()
if check_first_time_setup():
initialize_settings()
## Continue the imports
from resources.page_manager import PageManager
from resources.config import settings_core
# _ _ _ _ _
# | | | | (_) | | | |
# | | | | __ _ _ __ _ __ _| |__ | | ___ ___
# | | | |/ _` | '__| |/ _` | '_ \| |/ _ \/ __|
# \ \_/ / (_| | | | | (_| | |_) | | __/\__ \
# \___/ \__,_|_| |_|\__,_|_.__/|_|\___||___/
# -----------------------------------------------------------------------
settings = settings_core()
app = PageManager()
# ___ _ _ _ _
# / _ \ | (_) | | (_)
# / /_\ \_ __ _ __ | |_ ___ __ _| |_ _ ___ _ __
# | _ | '_ \| '_ \| | |/ __/ _` | __| |/ _ \| '_ \
# | | | | |_) | |_) | | | (_| (_| | |_| | (_) | | | |
# \_| |_/ .__/| .__/|_|_|\___\__,_|\__|_|\___/|_| |_|
# | | | |
# |_| |_|
# -----------------------------------------------------------------------
st.set_page_config(page_title="Media Manager", page_icon=None, layout='centered', initial_sidebar_state='auto', menu_items={'Get help':None,'Report a Bug':"https://github.com/Visualistic-Studios/Media-Manager/issues",'About':"https://github.com/Visualistic-Studios/Media-Manager/",})
st.header("Media Manager")
########## ADD PAGES HERE
#####
##### First Time Setup
if check_first_time_setup():
##### IMPORT PAGES
from pages import app_setup
##### LOAD PAGES
app.add_page("App Setup", app_setup.app)
##### Regular Application
else:
##### IMPORT PAGES
from pages import new_posts, settings_page
##### LOAD PAGES
app.add_page("New Posts", new_posts.app)
app.add_page("Settings", settings_page.app)
app.run()