Subversion Repositories basico

Rev

Rev 9 | 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"
9 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"
74 t00mlabs 20
APP['version'] = "0.2"
4 t00mlabs 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
74 t00mlabs 35
LPATH['OPT'] = LPATH['ROOT'] + 'opt' + SEP
36
LPATH['DRIVERS'] = LPATH['OPT'] + 'webdrivers' + SEP
37
LPATH['RES'] = LPATH['ROOT'] + 'res' + SEP
4 t00mlabs 38
 
39
# Global paths
40
GPATH = {}
74 t00mlabs 41
GPATH['ROOT'] = ROOT
42
GPATH['DATA'] = GPATH['ROOT'] + SEP  + 'data' + SEP
4 t00mlabs 43
GPATH['UI'] = GPATH['DATA'] + 'ui' + SEP
44
GPATH['ICONS'] = GPATH['DATA'] + 'icons' + SEP
45
GPATH['PLUGINS'] = GPATH['DATA'] + 'plugins' + SEP
46
GPATH['SHARE'] = GPATH['DATA'] + 'share' + SEP
47
GPATH['DOC'] = GPATH['SHARE'] + 'docs' + SEP
74 t00mlabs 48
GPATH['RES'] = GPATH['DATA'] + 'res' + SEP
4 t00mlabs 49
 
50
# Configuration, SAP Notes Database and Log files
51
FILE = {}
74 t00mlabs 52
FILE['TASKS'] = LPATH['ETC'] + 'tasks.txt'
4 t00mlabs 53
FILE['CNF'] = LPATH['ETC'] + 'basico.ini'
54
FILE['SAP'] = LPATH['DB'] + 'sapnotes.json'
55
FILE['LOG'] = LPATH['LOG'] + 'basico.log'
56
FILE['CREDITS'] = GPATH['DOC'] + 'CREDITS'
74 t00mlabs 57
 
58
# SAP related
59
SAP = {}
60
SAP['NOTE_URL'] = "https://launchpad.support.sap.com/#/notes/%s"
61
SAP['ODATA_NOTE_URL'] = "https://launchpad.support.sap.com/services/odata/svt/snogwscorr/TrunkSet(SapNotesNumber='%s',Version='0',Language='E')" #$expand=LongText" #?$expand=LongText,RefTo,RefBy"
62