comparison src/core/constants.py @ 942:598fc223cf59

core: more organisation in constants.py
author Goffi <goffi@goffi.org>
date Fri, 28 Mar 2014 18:07:13 +0100
parents cbf4122baae7
children 71926ec2114d
comparison
equal deleted inserted replaced
941:c6d8fc63b1db 942:598fc223cf59
20 import os.path 20 import os.path
21 from xdg import BaseDirectory 21 from xdg import BaseDirectory
22 22
23 23
24 class Const(object): 24 class Const(object):
25
26 ## Application ##
25 APP_NAME = u'Salut à Toi' 27 APP_NAME = u'Salut à Toi'
26 APP_NAME_SHORT = u'SàT' 28 APP_NAME_SHORT = u'SàT'
27 APP_NAME_FULL = u'%s (%s)' % (APP_NAME_SHORT, APP_NAME) 29 APP_NAME_FULL = u'%s (%s)' % (APP_NAME_SHORT, APP_NAME)
28 APP_VERSION = u'0.4.1D' # Please add 'D' at the end for dev versions 30 APP_VERSION = u'0.4.1D' # Please add 'D' at the end for dev versions
29 31
32
33 ## Parameters ##
34 NO_SECURITY_LIMIT = -1
35 INDIVIDUAL = "individual"
36 GENERAL = "general"
37
38
39 ## Profile and entities ##
40 PROF_KEY_NONE = '@NONE@'
41 PROF_KEY_DEFAULT = '@DEFAULT@'
42 ENTITY_ALL = '@ALL@'
43
44
45 ## Configuration ##
30 DEFAULT_CONFIG = { 46 DEFAULT_CONFIG = {
31 'media_dir': '/usr/share/sat/media', 47 'media_dir': '/usr/share/sat/media',
32 'pid_dir': '/tmp', 48 'pid_dir': '/tmp',
33 'log_dir': BaseDirectory.save_data_path('sat'), 49 'log_dir': BaseDirectory.save_data_path('sat'),
34 } 50 }
43 CONFIG_FILES = [(os.path.expanduser(path) + 'sat.conf') for path in \ 59 CONFIG_FILES = [(os.path.expanduser(path) + 'sat.conf') for path in \
44 ['/etc/', '~/', '~/.', '', '.'] + \ 60 ['/etc/', '~/', '~/.', '', '.'] + \
45 ['%s/' % path for path in list(BaseDirectory.load_config_paths('sat'))] 61 ['%s/' % path for path in list(BaseDirectory.load_config_paths('sat'))]
46 ] 62 ]
47 63
48 NO_SECURITY_LIMIT = -1
49 INDIVIDUAL = "individual"
50 GENERAL = "general"
51 SAVEFILE_DATABASE = "sat.db"
52 PROF_KEY_NONE = '@NONE@'
53 PROF_KEY_DEFAULT = '@DEFAULT@'
54 IQ_SET = '/iq[@type="set"]'
55 64
65 ## Plugins ##
56 # names of widely used plugins 66 # names of widely used plugins
57 TEXT_CMDS = 'TEXT-COMMANDS' 67 TEXT_CMDS = 'TEXT-COMMANDS'
68
69
70 ## Misc ##
71 SAVEFILE_DATABASE = "sat.db"
72 IQ_SET = '/iq[@type="set"]'