Subversion Repositories basico

Rev

Rev 342 | Rev 353 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
340 t00mlabs 1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3
"""
4
# File: mod_env.py
5
# Author: Tomás Vírseda
6
# License: GPL v3
7
# Description: Environment variables module
8
"""
9
 
10
import sys
11
import os
12
from os.path import abspath, sep as SEP
13
 
14
ROOT = abspath(sys.modules[__name__].__file__ + "/../../")
15
USER_DIR = os.path.expanduser('~')
16
 
17
# App Info
18
APP = {}
19
APP['short'] = "basico"
20
APP['name'] = "SAP Notes Manager for SAP Consultants"
21
APP['license'] = "The code is licensed under the terms of the  GPL v3\nso you're free to grab, extend, improve and fork the code\nas you want"
22
APP['copyright'] = "Copyright \xa9 2016-2019 Tomás Vírseda"
23
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"
342 t00mlabs 24
APP['version'] = "0.4"
340 t00mlabs 25
APP['authors'] = ["Tomás Vírseda <tomasvirseda@gmail.com>"]
26
APP['documenters'] = ["Tomás Vírseda <tomasvirseda@gmail.com>"]
27
APP['email'] = "t00m@t00mlabs.net"
28
 
29
 
30
# Local paths
31
LPATH = {}
32
LPATH['ROOT'] = USER_DIR + SEP + '.basico' + SEP
33
LPATH['ETC'] = LPATH['ROOT'] + 'etc' + SEP
34
LPATH['VAR'] = LPATH['ROOT'] + 'var' + SEP
35
LPATH['PLUGINS'] = LPATH['VAR'] + 'plugins' + SEP
36
LPATH['LOG'] = LPATH['VAR'] + 'log' + SEP
37
LPATH['TMP'] = LPATH['VAR'] + 'tmp' + SEP
38
LPATH['CACHE'] = LPATH['VAR'] + 'cache' + SEP
39
LPATH['CACHE_XML'] = LPATH['CACHE'] + 'xml' + SEP
40
LPATH['CACHE_PDF'] = LPATH['CACHE'] + 'pdf' + SEP
41
LPATH['DB'] = LPATH['VAR'] + 'db' + SEP
42
LPATH['SAPNOTES'] = LPATH['DB'] + 'sapnotes' + SEP
43
LPATH['ANNOTATIONS'] = LPATH['DB'] + 'annotations' + SEP
44
LPATH['COLLECTIONS'] = LPATH['DB'] + 'collections' + SEP
45
LPATH['RESOURCES'] = LPATH['DB'] + 'resources' + SEP
46
LPATH['WWW'] = LPATH['VAR'] + 'www' + SEP
47
LPATH['EXPORT'] = LPATH['VAR'] + 'export' + SEP
48
LPATH['BACKUP'] = LPATH['EXPORT'] + 'backup' + SEP
49
LPATH['PDF'] = LPATH['EXPORT'] + 'pdf' + SEP
50
LPATH['OPT'] = LPATH['ROOT'] + 'opt' + SEP
51
LPATH['DRIVERS'] = LPATH['OPT'] + 'webdrivers' + SEP
52
 
53
 
54
# Global paths
55
GPATH = {}
56
GPATH['ROOT'] = ROOT
57
GPATH['DATA'] = GPATH['ROOT'] + SEP  + 'data' + SEP
58
GPATH['UI'] = GPATH['DATA'] + 'ui' + SEP
59
GPATH['ICONS'] = GPATH['DATA'] + 'icons' + SEP
60
GPATH['PLUGINS'] = GPATH['DATA'] + 'plugins' + SEP
61
GPATH['SHARE'] = GPATH['DATA'] + 'share' + SEP
62
GPATH['DOC'] = GPATH['SHARE'] + 'docs' + SEP
63
GPATH['RES'] = GPATH['DATA'] + 'res' + SEP
348 t00mlabs 64
GPATH['CSS'] = GPATH['RES'] + 'css' + SEP
340 t00mlabs 65
GPATH['SELENIUM'] = GPATH['RES'] + 'selenium' + SEP
66
GPATH['DRIVERS'] = GPATH['SELENIUM'] + 'drivers' + SEP
67
GPATH['HELP'] = GPATH['DATA'] + 'help' + SEP
68
GPATH['HELP_HTML'] = GPATH['HELP'] + 'html' + SEP
69
 
70
# Configuration, SAP Notes Database and Log files
71
FILE = {}
348 t00mlabs 72
FILE['CSS'] = GPATH['CSS'] + 'basico.css'
340 t00mlabs 73
FILE['DBSAP'] = LPATH['SAPNOTES'] + 'sapnotes.json'
74
FILE['DBCOLS'] = LPATH['COLLECTIONS'] + 'collections.json'
75
FILE['CNF'] = LPATH['ETC'] + 'basico.ini'
76
FILE['LOG'] = LPATH['LOG'] + 'basico.log'
77
FILE['EVENTS'] = LPATH['LOG'] + 'events.log'
78
FILE['CREDITS'] = GPATH['DOC'] + 'CREDITS'
79
FILE['HELP_INDEX'] = GPATH['HELP_HTML'] + 'index.html'
80
 
81
# Annotations
82
ATYPES = ['Bookmark', 'Email', 'Fixme', 'Incident', 'Meeting', 'Note', 'Procedure', 'Snippet', 'Template', 'Todo']