Subversion Repositories basico

Rev

Rev 9 | Go to most recent revision | Details | 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"
18
APP['name'] = "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"
19
APP['version'] = "0.1"
20
APP['authors'] = ["Tomás Vírseda <t00m@t00mlabs.net>"]
21
APP['documenters'] = ["Tomás Vírseda <t00m@t00mlabs.net>"]
22
APP['email'] = "t00m@t00mlabs.net"
23
 
24
# Local paths
25
LPATH = {}
26
LPATH['ROOT'] = USER_DIR + SEP + '.basico' + SEP
27
LPATH['ETC'] = LPATH['ROOT'] + 'etc' + SEP
28
LPATH['VAR'] = LPATH['ROOT'] + 'var' + SEP
29
LPATH['PLUGINS'] = LPATH['VAR'] + 'plugins' + SEP
30
LPATH['LOG'] = LPATH['VAR'] + 'logs' + SEP
31
LPATH['TMP'] = LPATH['VAR'] + 'tmp' + SEP
32
LPATH['DB'] = LPATH['VAR'] + 'db' + SEP
33
LPATH['EXPORT'] = LPATH['VAR'] + 'export' + SEP
34
 
35
# Global paths
36
GPATH = {}
37
GPATH['DATA'] = ROOT + SEP  + 'data' + SEP
38
GPATH['UI'] = GPATH['DATA'] + 'ui' + SEP
39
GPATH['ICONS'] = GPATH['DATA'] + 'icons' + SEP
40
GPATH['PLUGINS'] = GPATH['DATA'] + 'plugins' + SEP
41
GPATH['SHARE'] = GPATH['DATA'] + 'share' + SEP
42
GPATH['DOC'] = GPATH['SHARE'] + 'docs' + SEP
43
 
44
# Configuration, SAP Notes Database and Log files
45
FILE = {}
46
FILE['CNF'] = LPATH['ETC'] + 'basico.ini'
47
FILE['SAP'] = LPATH['DB'] + 'sapnotes.json'
48
FILE['LOG'] = LPATH['LOG'] + 'basico.log'
49
FILE['CREDITS'] = GPATH['DOC'] + 'CREDITS'