mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Added more data to maloja info command
This commit is contained in:
parent
1be4e50b49
commit
6fc2c1c889
@ -4,6 +4,7 @@ from doreah.control import mainfunction
|
||||
from doreah.io import col
|
||||
import os
|
||||
import signal
|
||||
from ipaddress import ip_address
|
||||
|
||||
from .setup import setup
|
||||
from . import tasks
|
||||
@ -94,6 +95,8 @@ def print_info():
|
||||
print_header_info()
|
||||
print("Configuration Directory:",globalconf.dir_settings['config'])
|
||||
print("Data Directory: ",globalconf.dir_settings['state'])
|
||||
print("Network: ",f"IPv{ip_address(globalconf.malojaconfig['host']).version}, Port {globalconf.malojaconfig['port']}")
|
||||
print("Timezone: ",f"UTC{globalconf.malojaconfig['timezone']:+d}")
|
||||
print()
|
||||
print("#####")
|
||||
print()
|
||||
|
@ -8,13 +8,12 @@ from ..globalconf import data_dir, dir_settings, malojaconfig
|
||||
|
||||
|
||||
# EXTERNAL API KEYS
|
||||
apikeys = {
|
||||
"LASTFM_API_KEY":"Last.fm API Key",
|
||||
#"FANARTTV_API_KEY":"Fanart.tv API Key",
|
||||
"SPOTIFY_API_ID":"Spotify Client ID",
|
||||
"SPOTIFY_API_SECRET":"Spotify Client Secret",
|
||||
"AUDIODB_API_KEY":"TheAudioDB API Key"
|
||||
}
|
||||
apikeys = [
|
||||
"LASTFM_API_KEY",
|
||||
"SPOTIFY_API_ID",
|
||||
"SPOTIFY_API_SECRET",
|
||||
"AUDIODB_API_KEY"
|
||||
]
|
||||
|
||||
|
||||
|
||||
@ -35,15 +34,16 @@ def setup():
|
||||
|
||||
print("Various external services can be used to display images. If not enough of them are set up, only local images will be used.")
|
||||
for k in apikeys:
|
||||
keyname = malojaconfig.get_setting_info(k)['name']
|
||||
key = malojaconfig[k]
|
||||
if key is False:
|
||||
print("\t" + "Currently not using a " + col['red'](apikeys[k]) + " for image display.")
|
||||
print("\t" + "Currently not using a " + col['red'](keyname) + " for image display.")
|
||||
elif key is None or key == "ASK":
|
||||
print("\t" + "Please enter your " + col['gold'](apikeys[k]) + ". If you do not want to use one at this moment, simply leave this empty and press Enter.")
|
||||
print("\t" + "Please enter your " + col['gold'](keyname) + ". If you do not want to use one at this moment, simply leave this empty and press Enter.")
|
||||
key = prompt("",types=(str,),default=False,skip=SKIP)
|
||||
malojaconfig[k] = key
|
||||
else:
|
||||
print("\t" + col['lawngreen'](apikeys[k]) + " found.")
|
||||
print("\t" + col['lawngreen'](keyname) + " found.")
|
||||
|
||||
|
||||
# OWN API KEY
|
||||
|
@ -21,7 +21,7 @@ classifiers = [
|
||||
dependencies = [
|
||||
"bottle>=0.12.16",
|
||||
"waitress>=1.3",
|
||||
"doreah>=1.7.1",
|
||||
"doreah>=1.7.2",
|
||||
"nimrodel>=0.7.0",
|
||||
"setproctitle>=1.1.10",
|
||||
"wand>=0.5.4",
|
||||
|
Loading…
Reference in New Issue
Block a user