dup/config.py

19 lines
669 B
Python
Raw Normal View History

2024-05-12 11:45:32 +02:00
import os
config = {
"discordUrl" : "https://discord.com/api/download?platform=linux&format=tar.gz",
"asarUrl" : "https://github.com/GooseMod/OpenAsar/releases/download/nightly/app.asar",
"tmpDir" : "/tmp/dup/",
"confDir" : os.path.expanduser("~") + "/.config/",
"installDir" : os.path.expanduser("~") + "/.local/lib/Discord",
"linkDir" : os.path.expanduser("~") + "/.local/bin/Discord",
"localDir" : os.path.expanduser("~") + "/.local/share/dup"
}
def get( name: str ):
try:
config[name]
except:
raise Exception("No such configuration variable: " + name)
else:
return config[name]