#!/usr/bin/env python
# -*- coding: utf-8 -*-

from uesyllabus.syllabus import Syllabus
from uesyllabus import argparser
import json


if __name__ == '__main__':
    syllabus = Syllabus()

    options = argparser.parse()
    lectures = syllabus.get_lectures(options)
    lectures_dict = {}

    for key in lectures:
        lectures_dict[key] = lectures[key].__dict__


    print json.dumps(lectures_dict, ensure_ascii=False).encode('utf-8')

