bin/preprocess.py
def harvest_blog(config):
    '''Harvest metadata for all blog entries.

    Note that the YAML parser reads times with a leading 0 like '09:00:00' as strings,
    not as times, so we have to convert manually.
    '''

    all_meta = []
    for folder in glob.glob('blog/????/??'):
        for post in glob.glob('{0}/*.html'.format(folder)):
            m = harvest_metadata(post)
            m['folder'] = folder
            fill_optional_metadata(m, 'favorite')
            all_meta.append(m)

    decorated = [(x['date'], x['time'], x) for x in all_meta]
    decorated.sort()
    all_meta = [x[2] for x in decorated]
    return all_meta
Harvest metadata for all blog entries.

    Note that the YAML parser reads times with a leading 0 like '09:00:00' as strings,
    not as times, so we have to convert manually.
    
Harvest metadata for all blog entries.
Note that the YAML parser reads times with a leading 0 like '09:00:00' as strings,
not as times, so we have to convert manually.
Harvest metadata for all blog entries . Note that the YAML parser reads times with a leading 0 like ' 09 : 00 : 00 ' as strings not as times so we have to convert manually .
def harvest_blog(config):
    all_meta = []
    for folder in glob.glob('blog/????/??'):
        for post in glob.glob('{0}/*.html'.format(folder)):
            m = harvest_metadata(post)
            m['folder'] = folder
            fill_optional_metadata(m, 'favorite')
            all_meta.append(m)
    decorated = [(x['date'], x['time'], x) for x in all_meta]
    decorated.sort()
    all_meta = [x[2] for x in decorated]
    return all_meta
def harvest_blog ( config ) : all_meta = [ ] for folder in glob . glob ( 'blog/????/??' ) : for post in glob . glob ( '{0}/*.html' . format ( folder ) ) : m = harvest_metadata ( post ) m [ 'folder' ] = folder fill_optional_metadata ( m , 'favorite' ) all_meta . append ( m ) decorated = [ ( x [ 'date' ] , x [ 'time' ] , x ) for x in all_meta ] decorated . sort ( ) all_meta = [ x [ 2 ] for x in decorated ] return all_meta
Harvest metadata for all blog entries.
Harvest metadata for all blog entries .
'''Harvest metadata for all blog entries.

    Note that the YAML parser reads times with a leading 0 like '09:00:00' as strings,
    not as times, so we have to convert manually.
    '''
config