forked from devoteam-cybertrust/droidstatx
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathConfiguration.py
More file actions
35 lines (26 loc) · 1.13 KB
/
Configuration.py
File metadata and controls
35 lines (26 loc) · 1.13 KB
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
from configparser import ConfigParser
import os
class Configuration:
file = "droidstatx.config"
configParser = ConfigParser()
def __init__(self):
cwd = os.path.dirname(os.path.realpath(__file__))
self.configParser.read(cwd + "/" + self.file)
def geXmindTopicStructure(self):
return self.configParser.get("Settings", "xmindTopicStructure")
def getXmindTopicFoldAt(self):
return int(self.configParser.get("Settings", "topicFoldAt"))
def getFileExclusions(self):
return self.configParser.get("Settings", "fileExclusions")
def getFolderExclusions(self):
return self.configParser.get("Settings", "folderExclusions")
def getMaxSubTopics(self):
return int(self.configParser.get("Settings", "maxSubTopics"))
def getCustomChecks(self):
checksList = []
for section in self.configParser.sections():
if section == "CustomChecks":
options = self.configParser.options(section)
for option in options:
checksList.append([option, self.configParser.get(section, option)])
return checksList