예제 #1
0
def _readProgressSection(xmlCtx, section, _):
    progressID = sub_parsers.parseID(xmlCtx, section, 'Specify a progress ID')
    conditions = []
    for _, subSec in _xml.getChildren(xmlCtx, section, 'steps'):
        conditions.append(chapter.HasIDConditions(sub_parsers.parseID(xmlCtx, subSec, 'Specify a condition ID'), sub_parsers.readConditions(xmlCtx, subSec, [])))

    return chapter.ChapterProgress(progressID, conditions)
예제 #2
0
def _parseChapterInfoCondition(xmlCtx, section, _):
    conditionID = sub_parsers._parseID(xmlCtx, section,
                                       'Specify a charter info ID')
    return chapter.HasIDConditions(
        sub_parsers._parseID(xmlCtx, section,
                             'Specify a charter info condition ID'),
        sub_parsers._readConditions(xmlCtx, section, []))