def render(entry, settings): board = Board() board.fromAlgebraic(entry["algebraic"]) html = pdf.ExportDocument.header(entry, settings['lang']) html += board_to_html(board, settings['diagram_font']) html += entry['stipulation'] + ' ' + board.getPiecesCount() + "<br/>\n" html += pdf.ExportDocument.solver(entry, settings['lang']) + "<br/>\n" html += pdf.ExportDocument.legend(board) + "<br/><br/>\n" if 'solution' in entry: html += solution_to_html(entry['solution'], settings['inline_font']) if 'keywords' in entry: html += "<br/>\n" + ', '.join(entry['keywords']) + "<br/>\n" if 'comments' in entry: html += "<br/>\n" + "<br/>\n".join(entry['comments']) + "<br/>\n" html += "<br/><br/>\n" return html