diff --git a/setup.py b/setup.py index f32d45b..62a9581 100644 --- a/setup.py +++ b/setup.py @@ -175,12 +175,17 @@ def get_hostname( parameter, config_filepath ): print("hostname setup done!") sys.exit(0) -# Load secrets from secrets file -secrets_filepath = "secrets/secrets.txt" -uc_client_id = get_parameter("uc_client_id", secrets_filepath) -uc_client_secret = get_parameter("uc_client_secret", secrets_filepath) -uc_access_token = get_parameter("uc_access_token", secrets_filepath) +############################################################################### +# main -# Load configuration from config file -config_filepath = "config.txt" -mastodon_hostname = get_hostname("mastodon_hostname", config_filepath) # E.g., mastodon.social +if __name__ == '__main__': + + # Load secrets from secrets file + secrets_filepath = "secrets/secrets.txt" + uc_client_id = get_parameter("uc_client_id", secrets_filepath) + uc_client_secret = get_parameter("uc_client_secret", secrets_filepath) + uc_access_token = get_parameter("uc_access_token", secrets_filepath) + + # Load configuration from config file + config_filepath = "config.txt" + mastodon_hostname = get_hostname("mastodon_hostname", config_filepath)