def title_from_name(source_file, config):
    """
    Title-cases the name and stores it in config['title']
    """
    if is_index(config) and hasattr(config, 'parent'):
        title = config.parent['name']
    else:
        title = config['name']
    title = titlecase(title)
    config['title'] = title
    return config
Beispiel #2
0
def setdefault_url(source_file, config):
    if is_index(config):
        config['url'] = ''
    else:
        config['url'] = urllib.quote(config['target_name'])
    return config
def setdefault_iterable(source_file, config):
    config['iterable'] = not is_index(config)
    return config