Subversion Repositories basico

Rev

Rev 5 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 t00mlabs 1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3
# File: env.py
4
# Author: Tomás Vírseda
5
# License: GPL v3
6
# Description: Environment variables
7
 
8
import sys
9
import os
10
from os.path import abspath, sep as SEP
11
 
12
ROOT = abspath(sys.modules[__name__].__file__ + "/..")
13
USER_DIR = os.path.expanduser('~')
14
 
15
# App Info
16
APP = {}
17
APP['short'] = "basico"
10 t00mlabs 18
APP['name'] = "SAP Notes Manager for SAP Consultants"
19
APP['desc'] = "SAP Notes Manager for SAP Consultants\n\nThe code is licensed under the terms of the  GPL v3 so you're free to grab, extend, improve and fork the code as you want"
4 t00mlabs 20
APP['version'] = "0.1"
21
APP['authors'] = ["Tomás Vírseda <t00m@t00mlabs.net>"]
22
APP['documenters'] = ["Tomás Vírseda <t00m@t00mlabs.net>"]
23
APP['email'] = "t00m@t00mlabs.net"
24
 
25
# Local paths
26
LPATH = {}
27
LPATH['ROOT'] = USER_DIR + SEP + '.basico' + SEP
28
LPATH['ETC'] = LPATH['ROOT'] + 'etc' + SEP
29
LPATH['VAR'] = LPATH['ROOT'] + 'var' + SEP
30
LPATH['PLUGINS'] = LPATH['VAR'] + 'plugins' + SEP
31
LPATH['LOG'] = LPATH['VAR'] + 'logs' + SEP
32
LPATH['TMP'] = LPATH['VAR'] + 'tmp' + SEP
33
LPATH['DB'] = LPATH['VAR'] + 'db' + SEP
34
LPATH['EXPORT'] = LPATH['VAR'] + 'export' + SEP
35
 
36
# Global paths
37
GPATH = {}
38
GPATH['DATA'] = ROOT + SEP  + 'data' + SEP
39
GPATH['UI'] = GPATH['DATA'] + 'ui' + SEP
40
GPATH['ICONS'] = GPATH['DATA'] + 'icons' + SEP
41
GPATH['PLUGINS'] = GPATH['DATA'] + 'plugins' + SEP
42
GPATH['SHARE'] = GPATH['DATA'] + 'share' + SEP
43
GPATH['DOC'] = GPATH['SHARE'] + 'docs' + SEP
44
 
45
# Configuration, SAP Notes Database and Log files
46
FILE = {}
47
FILE['CNF'] = LPATH['ETC'] + 'basico.ini'
48
FILE['SAP'] = LPATH['DB'] + 'sapnotes.json'
49
FILE['LOG'] = LPATH['LOG'] + 'basico.log'
50
FILE['CREDITS'] = GPATH['DOC'] + 'CREDITS'