Exemple #1
0
def reprocess(render_context, lang):
    ret = []
    render_index(render_context)
    render_and_save_archives(render_context)
    all_issue_paths = get_past_issue_paths(lang)
    for issue_path in all_issue_paths:
        issue_date = issue_path.rpartition('/')[2]
        print issue_date
        issue_data = get_issue_data(lang, issue_date)
        issue_data['signup_url'] = SIGNUP_MAP[lang]
        if not issue_data.get('issue_number'):
            print 'no data for %s' % issue_date
            continue
        fmt = 'html'
        issue_rerendered = render_issue(issue_data, render_context, format=fmt)
        final_issue = save_issue(fmt,
                                 issue_rerendered,
                                 lang,
                                 is_dev=False,
                                 date=issue_date)
        ret.append(final_issue)
    return ret
Exemple #2
0
def reprocess(render_context, lang):
    ret = []
    render_index(render_context)
    render_and_save_archives(render_context)
    all_issue_paths = get_past_issue_paths(lang)
    for issue_path in all_issue_paths:
        issue_date = issue_path.rpartition('/')[2]
        print issue_date
        issue_data = get_issue_data(lang, issue_date)
        issue_data['signup_url'] = SIGNUP_MAP[lang]
        if not issue_data.get('issue_number'):
            print 'no data for %s' % issue_date
            continue
        fmt = 'html'
        issue_rerendered = render_issue(issue_data, 
                                        render_context, 
                                        format=fmt)
        final_issue = save_issue(fmt, 
                                 issue_rerendered, 
                                 lang,
                                 is_dev=False,
                                 date=issue_date)
        ret.append(final_issue)
    return ret
Exemple #3
0
def get_rendered_issue(issue_ashes_env, lang=DEFAULT_LANGUAGE, format=None):
    issue_data = prep_latest_issue(lang)
    return render_issue(issue_data, issue_ashes_env, format=format)