-
Notifications
You must be signed in to change notification settings - Fork 1
/
SiteControl.py
29 lines (24 loc) · 1.27 KB
/
SiteControl.py
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
import DatabaseControl
# Handles all site changes.
# Module functions ----------------------------------------------------------------------
# tell user if they specify a key in their signal request but it doesn't exist.
def broadcast_nonexistant_key(posed_key, flag):
if(flag == 'unfound'):
print("Specified key does not exist. Broadcast overwritten with new key: [insert new keyword created here]", )
if(flag == 'new'):
print("Keyword unspecified. [insert new keyword created here]")
def display_current_profiles():
# for ever profiles in the database, only display current ones that are not older than 1 year.
# those can be accessed later in a list form.
#
# for now, displays profiles screen name and previous locations in console
current_profiles = DatabaseControl.get_current_profiles()
for profile in current_profiles:
signals_string = ""
for signal in profile.get_signals_arr():
signal_string = signal_string + signal.get_location() + ", "
print("Profile: " + profile.get_screen_name() + "Current location: " + profile.get_current_location() + "Previous Locations: ")
# connects to Google Maps API later.....
# sends commands to site to change pages and stuff based on criteria, not yet known
def change_page():
return