Example #1
0
def add_all_syllabi(force=False):
    syllabi = bundle.list_names()
    _log.start('Adding all syllabi', nSteps=len(syllabi))

    dependencies = []
    for syllabus in syllabi:
        dependencies.extend(bundle.SyllabusBundle.get_dependencies(syllabus))

    if not force and not Checksum.needs_update('syllabi', dependencies,
            ['lexicon']):
        _log.finish('Already up-to-date')
        return
        
    for syllabus_name in syllabi:
        add_syllabus(syllabus_name, force=force)
    Checksum.store('syllabi', dependencies)
    _log.finish()
Example #2
0
def list_syllabi():
    syllabi = bundle.list_names()
    _log.start('Available syllabi', nSteps=len(syllabi))
    for syllabus_name in syllabi:
        _log.log(syllabus_name)
    _log.finish()