示例#1
0
def create_summary_schedule(config):
    schedule = read_html_tabular_schedule(config)
    write_summary_schedule(schedule, config)
示例#2
0
    row.append(extract_description(talk, config))
    return row


def extract_description(talk, config):
    if talk['type'] in EVENT_TYPES:
        path = os.path.join(config['content_dir'], talk['href'].strip('/') + '.md')
        with open(path) as f:
            text = f.read().decode('utf-8')
        # Remove metadata if present.
        idx = text.find('###')
        if idx != -1:
            return text[idx+3:].strip()
        return text
    return ''


def create_csv_schedule(config):
    schedule = read_html_tabular_schedule(config)
    write_csv_schedule(schedule, config)


if __name__ == '__main__':
    config = {
            'template_dir': 'templates',
            'output_dir': 'output',
            'content_dir': 'content'
    }
    schedule = read_html_tabular_schedule(config)
    write_csv_schedule(schedule, config)
示例#3
0
def create_csv_schedule(config):
    schedule = read_html_tabular_schedule(config)
    write_csv_schedule(schedule, config)
示例#4
0
def create_summary_schedule(config):
    schedule = read_html_tabular_schedule(config)
    write_summary_schedule(schedule, config)