config.py

changeset 34
9fce700d42de
parent 33
91421eeb4426
child 43
8f3ac19f11b6
equal deleted inserted replaced
33:91421eeb4426 34:9fce700d42de
6 import yaml 6 import yaml
7 import io 7 import io
8 import os 8 import os
9 import string 9 import string
10 import logging 10 import logging
11 import borgend
11 from functools import reduce 12 from functools import reduce
12 13
13 logger=logging.getLogger(__name__) 14 logger=borgend.logger.getChild(__name__)
14 15
15 # 16 #
16 # Defaults 17 # Defaults
17 # 18 #
18 19
35 'prune_parameters': [], 36 'prune_parameters': [],
36 } 37 }
37 } 38 }
38 39
39 # 40 #
40 # Branding
41 #
42
43 appname="borgend"
44 appname_stylised="Borgend"
45
46 #
47 # Locations 41 # Locations
48 # 42 #
49 43
50 if False: 44 if False:
51 import xdg 45 import xdg
52 cfgfile=os.path.join(xdg.XDG_CONFIG_HOME, appname, "config.yaml") 46 cfgfile=os.path.join(xdg.XDG_CONFIG_HOME, borgend.appname, "config.yaml")
53 logs_location=os.path.join(xdg.XDG_DATA_HOME, appname, "logs") 47 logs_dir=os.path.join(xdg.XDG_DATA_HOME, borgend.appname, "logs")
54 else: 48 else:
55 import rumps 49 import rumps
56 __base=rumps.application_support(appname) 50 __base=rumps.application_support(borgend.appname)
57 cfgfile=os.path.join(__base, "config.yaml") 51 cfgfile=os.path.join(__base, "config.yaml")
58 logs_location=os.path.join(__base, "logs") 52 logs_dir=os.path.join(__base, "logs")
59 53
60 # 54 #
61 # Type checking etc. 55 # Type checking etc.
62 # 56 #
63 57

mercurial