Subversion Repositories basico

Rev

Rev 281 | Rev 293 | Go to most recent revision | 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 -*-
264 t00m 3
"""
251 t00m 4
# File: mod_env.py
4 t00mlabs 5
# Author: Tomás Vírseda
6
# License: GPL v3
251 t00m 7
# Description: Environment variables module
264 t00m 8
"""
4 t00mlabs 9
 
10
import sys
11
import os
12
from os.path import abspath, sep as SEP
13
 
233 t00m 14
ROOT = abspath(sys.modules[__name__].__file__ + "/../../")
4 t00mlabs 15
USER_DIR = os.path.expanduser('~')
16
 
17
# App Info
18
APP = {}
19
APP['short'] = "basico"
9 t00mlabs 20
APP['name'] = "SAP Notes Manager for SAP Consultants"
136 t00mlabs 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"
281 t00m 22
APP['copyright'] = "Copyright \xa9 2016-2019 Tomás Vírseda"
9 t00mlabs 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"
77 t00mlabs 24
APP['version'] = "0.3"
25
APP['authors'] = ["Tomás Vírseda <tomasvirseda@gmail.com>"]
26
APP['documenters'] = ["Tomás Vírseda <tomasvirseda@gmail.com>"]
4 t00mlabs 27
APP['email'] = "t00m@t00mlabs.net"
28
 
126 t00mlabs 29
 
4 t00mlabs 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'] + 'logs' + SEP
37
LPATH['TMP'] = LPATH['VAR'] + 'tmp' + SEP
38
LPATH['DB'] = LPATH['VAR'] + 'db' + SEP
201 t00m 39
LPATH['CACHE'] = LPATH['DB'] + 'cache' + SEP
281 t00m 40
LPATH['CACHE_XML'] = LPATH['CACHE'] + 'xml' + SEP
41
LPATH['CACHE_PDF'] = LPATH['CACHE'] + 'pdf' + SEP
127 t00mlabs 42
LPATH['ANNOTATIONS'] = LPATH['DB'] + 'annotations' + SEP
43
LPATH['RESOURCES'] = LPATH['DB'] + 'resources' + SEP
93 t00mlabs 44
LPATH['WWW'] = LPATH['VAR'] + 'www' + SEP
4 t00mlabs 45
LPATH['EXPORT'] = LPATH['VAR'] + 'export' + SEP
127 t00mlabs 46
LPATH['BACKUP'] = LPATH['EXPORT'] + 'backup' + SEP
47
LPATH['PDF'] = LPATH['EXPORT'] + 'pdf' + SEP
74 t00mlabs 48
LPATH['OPT'] = LPATH['ROOT'] + 'opt' + SEP
49
LPATH['DRIVERS'] = LPATH['OPT'] + 'webdrivers' + SEP
4 t00mlabs 50
 
127 t00mlabs 51
 
4 t00mlabs 52
# Global paths
53
GPATH = {}
74 t00mlabs 54
GPATH['ROOT'] = ROOT
55
GPATH['DATA'] = GPATH['ROOT'] + SEP  + 'data' + SEP
4 t00mlabs 56
GPATH['UI'] = GPATH['DATA'] + 'ui' + SEP
57
GPATH['ICONS'] = GPATH['DATA'] + 'icons' + SEP
58
GPATH['PLUGINS'] = GPATH['DATA'] + 'plugins' + SEP
59
GPATH['SHARE'] = GPATH['DATA'] + 'share' + SEP
60
GPATH['DOC'] = GPATH['SHARE'] + 'docs' + SEP
74 t00mlabs 61
GPATH['RES'] = GPATH['DATA'] + 'res' + SEP
248 t00m 62
GPATH['SELENIUM'] = GPATH['RES'] + 'selenium' + SEP
63
GPATH['DRIVERS'] = GPATH['SELENIUM'] + 'drivers' + SEP
261 t00m 64
GPATH['HELP'] = GPATH['DATA'] + 'help' + SEP
65
GPATH['HELP_HTML'] = GPATH['HELP'] + 'html' + SEP
4 t00mlabs 66
 
67
# Configuration, SAP Notes Database and Log files
68
FILE = {}
229 t00m 69
FILE['COLLECTIONS'] = LPATH['DB'] + 'collections.json'
4 t00mlabs 70
FILE['CNF'] = LPATH['ETC'] + 'basico.ini'
239 t00m 71
FILE['DB'] = LPATH['DB'] + 'basico.json'
4 t00mlabs 72
FILE['LOG'] = LPATH['LOG'] + 'basico.log'
73
FILE['CREDITS'] = GPATH['DOC'] + 'CREDITS'
261 t00m 74
FILE['HELP_INDEX'] = GPATH['HELP_HTML'] + 'index.html'
287 t00m 75
 
76
# Annotations
77
ATYPES = ['Bookmark', 'Email', 'Fixme', 'Incident', 'Meeting', 'Note', 'Procedure', 'Snippet', 'Template', 'Todo']