3 SCRIPTDIR
= os
.path
.dirname(__file__
)
5 ## Build initial help list
10 f
= open(os
.path
.join(SCRIPTDIR
, 'help.txt'))
14 if not line
or line
.startswith('#'):
15 # skip blank or commented lines
17 elif line
.startswith('>'):
18 help_list
[title
][-1] += ' ' + line
[1:]
25 help_list
[title
][-1] += ' ' + line
28 value
, data
= [x
.strip() for x
in line
.split(':', 1)]
29 if value
.lower() == 'available in':
30 # special setting to create section_known array
31 for section
in data
.split(','):
32 section
= section
.lower().strip()
33 if section
not in settings_known
:
34 settings_known
[section
] = []
35 settings_known
[section
].append(title
)
37 help_list
[title
].append(line
)
40 ## Done building help list
45 def getknown(section
):
46 return settings_known
[section
]