Mercurial > libervia-backend
diff sat/core/constants.py @ 3480:7550ae9cfbac
Renamed the project from "Salut à Toi" to "Libervia":
This renaming follows the decision taken at the General Assemblee of January 27th 2021 (cf.
https://repos.goffi.org/sat_docs/raw-file/tip/association/2021-01-27%20-%20compte%20rendu%20de%20l%27AG%20extraordinaire.pdf)
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 20 Mar 2021 20:42:04 +0100 |
parents | be6d91572633 |
children | 509f7a1c67dc |
line wrap: on
line diff
--- a/sat/core/constants.py Fri Mar 19 15:45:14 2021 +0100 +++ b/sat/core/constants.py Sat Mar 20 20:42:04 2021 +0100 @@ -1,7 +1,6 @@ #!/usr/bin/env python3 - -# SàT: a XMPP client +# Libervia: an XMPP client # Copyright (C) 2009-2021 Jérôme Poisson (goffi@goffi.org) # This program is free software: you can redistribute it and/or modify @@ -29,12 +28,11 @@ class Const(object): ## Application ## - APP_NAME = "Salut à Toi" - APP_NAME_SHORT = "SàT" - APP_NAME_FILE = "sat" - APP_NAME_FULL = "{name_short} ({name})".format( - name_short=APP_NAME_SHORT, name=APP_NAME - ) + APP_NAME = "Libervia" + APP_COMPONENT = "backend" + APP_NAME_ALT = "SàT" + APP_NAME_FILE = "libervia" + APP_NAME_FULL = f"{APP_NAME} ({APP_COMPONENT})" APP_VERSION = ( sat.__version__ ) # Please add 'D' at the end of version in sat/VERSION for dev versions @@ -440,7 +438,7 @@ if ( BaseDirectory ): # skipped when xdg module is not available (should not happen in backend) - if "org.salutatoi.cagou" in BaseDirectory.__file__: + if "org.libervia.cagou" in BaseDirectory.__file__: # FIXME: hack to make config read from the right location on Android # TODO: fix it in a more proper way @@ -457,8 +455,8 @@ BaseDirectory = None Const.DEFAULT_CONFIG = { - "local_dir": "/data/data/org.salutatoi.cagou/app", - "media_dir": "/data/data/org.salutatoi.cagou/files/app/media", + "local_dir": "/data/data/org.libervia.cagou/app", + "media_dir": "/data/data/org.libervia.cagou/files/app/media", # FIXME: temporary location for downloads, need to call API properly "downloads_dir": os.path.join( Environment.getExternalStoragePublicDirectory( @@ -470,7 +468,7 @@ "log_dir": "%(local_dir)s", } Const.CONFIG_FILES = [ - "/data/data/org.salutatoi.cagou/files/app/android/" + "/data/data/org.libervia.cagou/files/app/android/" + Const.APP_NAME_FILE + ".conf" ] @@ -485,9 +483,14 @@ # image) ["/etc/_", "/etc/", "~/", "~/."] + [ - "%s/" % path + "{}/".format(path) for path in list(BaseDirectory.load_config_paths(Const.APP_NAME_FILE)) ] + # this is to handle legacy sat.conf + + [ + "{}/".format(path) + for path in list(BaseDirectory.load_config_paths("sat")) + ] + [root_dir] ) @@ -512,5 +515,9 @@ Const.CONFIG_FILES = [ realpath(expanduser(path) + Const.APP_NAME_FILE + ".conf") for path in Const.CONFIG_PATHS + ] + [ + # legacy sat.conf + realpath(expanduser(path) + "sat.conf") + for path in Const.CONFIG_PATHS ]