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
|
from doreah.io import col
|
||||||
import os
|
import os
|
||||||
import signal
|
import signal
|
||||||
|
from ipaddress import ip_address
|
||||||
|
|
||||||
from .setup import setup
|
from .setup import setup
|
||||||
from . import tasks
|
from . import tasks
|
||||||
@ -94,6 +95,8 @@ def print_info():
|
|||||||
print_header_info()
|
print_header_info()
|
||||||
print("Configuration Directory:",globalconf.dir_settings['config'])
|
print("Configuration Directory:",globalconf.dir_settings['config'])
|
||||||
print("Data Directory: ",globalconf.dir_settings['state'])
|
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("#####")
|
print("#####")
|
||||||
print()
|
print()
|
||||||
|
@ -8,13 +8,12 @@ from ..globalconf import data_dir, dir_settings, malojaconfig
|
|||||||
|
|
||||||
|
|
||||||
# EXTERNAL API KEYS
|
# EXTERNAL API KEYS
|
||||||
apikeys = {
|
apikeys = [
|
||||||
"LASTFM_API_KEY":"Last.fm API Key",
|
"LASTFM_API_KEY",
|
||||||
#"FANARTTV_API_KEY":"Fanart.tv API Key",
|
"SPOTIFY_API_ID",
|
||||||
"SPOTIFY_API_ID":"Spotify Client ID",
|
"SPOTIFY_API_SECRET",
|
||||||
"SPOTIFY_API_SECRET":"Spotify Client Secret",
|
"AUDIODB_API_KEY"
|
||||||
"AUDIODB_API_KEY":"TheAudioDB 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.")
|
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:
|
for k in apikeys:
|
||||||
|
keyname = malojaconfig.get_setting_info(k)['name']
|
||||||
key = malojaconfig[k]
|
key = malojaconfig[k]
|
||||||
if key is False:
|
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":
|
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)
|
key = prompt("",types=(str,),default=False,skip=SKIP)
|
||||||
malojaconfig[k] = key
|
malojaconfig[k] = key
|
||||||
else:
|
else:
|
||||||
print("\t" + col['lawngreen'](apikeys[k]) + " found.")
|
print("\t" + col['lawngreen'](keyname) + " found.")
|
||||||
|
|
||||||
|
|
||||||
# OWN API KEY
|
# OWN API KEY
|
||||||
|
@ -21,7 +21,7 @@ classifiers = [
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bottle>=0.12.16",
|
"bottle>=0.12.16",
|
||||||
"waitress>=1.3",
|
"waitress>=1.3",
|
||||||
"doreah>=1.7.1",
|
"doreah>=1.7.2",
|
||||||
"nimrodel>=0.7.0",
|
"nimrodel>=0.7.0",
|
||||||
"setproctitle>=1.1.10",
|
"setproctitle>=1.1.10",
|
||||||
"wand>=0.5.4",
|
"wand>=0.5.4",
|
||||||
|
Loading…
Reference in New Issue
Block a user