-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvars.py
58 lines (45 loc) · 1.58 KB
/
vars.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# MODULES
import configparser
import gettext
# VARS
appName = "GlpiClient"
appExeFile = "GlpiClient.exe"
appDirName = "GlpiClient"
appVersion = "0.305"
authorEmail = "clesssalvein@gmail.com"
appHomepage = "https://github.com/clesssalvein/GlpiClient"
sessionToken = None
# userPass enc, NOT FOR WinXP
# encKey = "SCfeRgVZprA9IEgnA8UnilYVhnSV_HW2hW0tspwAVDI="
# config.ini read
config = configparser.ConfigParser()
configFileName = "config.ini"
configPath = "config/config.ini"
config.read(configPath, encoding="utf8")
glpiApiBaseUrl = config.get("main", "glpiApiBaseUrl")
appToken = config.get("main", "appToken")
appLang = config.get("main", "lang")
hideAppWindowToTrayAtStartup = config.get("main", "hideappwindowtotrayatstartup")
hideAppWindowToTrayOnClose = config.get("main", "hideappwindowtotrayonclose")
# gettext multilang
langDirsPath = "lang/i18n"
translate = gettext.translation('glpiClient', langDirsPath, languages=[appLang])
# auth.ini create, if doesn't exist
configAuthPath = "config/auth.ini"
# create dir "update", if not exist
updateDirPath = "./update"
# ftp server data
ftpServerHost = config.get("ftp", "ftpserverhost")
ftpServerPort = config.get("ftp", "ftpserverport")
ftpServerUser = config.get("ftp", "ftpserveruser")
ftpServerPass = config.get("ftp", "ftpserverpass")
# update options
updaterExeFile = "Updater.exe"
appAutoUpdate = config.get("main", "autoupdate")
updateDirPath = "./update/"
updateAppDirPath = "./update/GlpiClient/"
updateConfigDirPath = "./update/GlpiClient/config/"
ftpPath = "/data/"
appNameZip = "GlpiClient.zip"