def generate_html(data2lint, message, action): html = (generate_head() + """<h1>For a Few XML More</h1> """ + generate_form(data2lint, action) + """<center><div class="message">""" + message + """</div></center></body></html>""") return html
def generate_html(data2lint, message, action): html = (generate_head() + """<h1>The Good, the Bad and the JSON</h1> """ + generate_form(data2lint, action) + """<center><div class="message">""" + message + """</div></center></body></html>""" ) return html
def generate_html(data2lint, message, encoded, action): html = (generate_head() + """<center><h1>gzip & base64</h1>""" + generate_form(data2lint, action) + """<div class="message">""" + message + """</div>""" + encoded + """</center></body></html>""" ) return html
def render_main_html(): return """ <!DOCTYPE html> <html> <head> <!-- script data-require="[email protected]" data-semver="1.3.6" src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.6/angular.min.js"></script --> <script data-require="[email protected]" data-semver="1.3.6" src="/static/js/angular.min.js"></script> <link rel="stylesheet" href="/static/style.css" /> <script type="text/javascript" src="/static/js/behave.js"></script> <script type="text/javascript" src="/static/js/script.js"></script> </head> <body> <a href="/"><img src="/static/img/FistfulOfYaml.jpg" width="120" /></a> <h1>Lint Trilogy</h1> <p>This service offers the possibility to lint data in <a href="/lint/yaml/form">YaML</a>, <a href="/lint/xml/form">XML</a> and <a href="/lint/json/form">JSON</a><br> and optionally encode it in <a href="/conv/main">base64</a> (more encodings planned).</br> Click on the logo to come back to this main page.</p> """ + generate_form("", "") + """
def render_conv_main(): html = (generate_head() + """<h1>enC0de y0uR d4t4</h1>""" + generate_form("", "") + """</body></html>""") return html
def render_lint_main(): html = (generate_head() + """<h1>The YAML, the XML and the JSON</h1>""" + generate_form("", "") + """</body></html>""") return html