Commits

Thomas Pelletier committed a1e6e1c

switch to 0.1.23 with markdown

  • Participants
  • Parent commits d3d3cca

Comments (0)

Files changed (4)

     info['running'] = __version__
     return info
 
-app.publish_html(url='/', template='index.html', context=data())
-
+app.publish_markdown(url='/', template='index.html', context=data(), \
+                     file="data/index.md")
+                     
 if __name__ == "__main__":
     app.run()
+## A very simple Buro application
+
+    :::python
+    from buro import Buro, get_root
+
+    app = Buro(get_root(__file__))
+    app.publish(url="/", template="index.html")
+
+    if __name__ == "__main__":
+        app.run()
+
+That's it. Just run your python file and the development web server will begin to listen on port 8000.
+
+## Easy installation
+
+Buro is both available on [PyPi](http://pypi.python.org/pypi/Buro/) and [Bitbucket](http://bitbucket.org/Kizlum/buro/src). However, it's recommended to use easy_install because it's, well, easier:
+
+    :::bash
+    easy_install Buro
+    python myapp.py
+
+## License
+
+That's simple: Buro is licensed under [the BSD license](http://creativecommons.org/licenses/BSD/).

media/css/pygments.css

-.syntax .hll { background-color: #ffffcc }
-.syntax  { background: #f8f8f8; }
-.syntax .c { color: #8f5902; font-style: italic } /* Comment */
-.syntax .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
-.syntax .g { color: #000000 } /* Generic */
-.syntax .k { color: #204a87; font-weight: bold } /* Keyword */
-.syntax .l { color: #000000 } /* Literal */
-.syntax .n { color: #000000 } /* Name */
-.syntax .o { color: #ce5c00; font-weight: bold } /* Operator */
-.syntax .x { color: #000000 } /* Other */
-.syntax .p { color: #000000; font-weight: bold } /* Punctuation */
-.syntax .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */
-.syntax .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */
-.syntax .c1 { color: #8f5902; font-style: italic } /* Comment.Single */
-.syntax .cs { color: #8f5902; font-style: italic } /* Comment.Special */
-.syntax .gd { color: #a40000 } /* Generic.Deleted */
-.syntax .ge { color: #000000; font-style: italic } /* Generic.Emph */
-.syntax .gr { color: #ef2929 } /* Generic.Error */
-.syntax .gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.syntax .gi { color: #00A000 } /* Generic.Inserted */
-.syntax .go { color: #000000; font-style: italic } /* Generic.Output */
-.syntax .gp { color: #8f5902 } /* Generic.Prompt */
-.syntax .gs { color: #000000; font-weight: bold } /* Generic.Strong */
-.syntax .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.syntax .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
-.syntax .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */
-.syntax .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */
-.syntax .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */
-.syntax .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */
-.syntax .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */
-.syntax .kt { color: #204a87; font-weight: bold } /* Keyword.Type */
-.syntax .ld { color: #000000 } /* Literal.Date */
-.syntax .m { color: #0000cf; font-weight: bold } /* Literal.Number */
-.syntax .s { color: #4e9a06 } /* Literal.String */
-.syntax .na { color: #c4a000 } /* Name.Attribute */
-.syntax .nb { color: #204a87 } /* Name.Builtin */
-.syntax .nc { color: #000000 } /* Name.Class */
-.syntax .no { color: #000000 } /* Name.Constant */
-.syntax .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */
-.syntax .ni { color: #ce5c00 } /* Name.Entity */
-.syntax .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
-.syntax .nf { color: #000000 } /* Name.Function */
-.syntax .nl { color: #f57900 } /* Name.Label */
-.syntax .nn { color: #000000 } /* Name.Namespace */
-.syntax .nx { color: #000000 } /* Name.Other */
-.syntax .py { color: #000000 } /* Name.Property */
-.syntax .nt { color: #204a87; font-weight: bold } /* Name.Tag */
-.syntax .nv { color: #000000 } /* Name.Variable */
-.syntax .ow { color: #204a87; font-weight: bold } /* Operator.Word */
-.syntax .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */
-.syntax .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */
-.syntax .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */
-.syntax .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */
-.syntax .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */
-.syntax .sb { color: #4e9a06 } /* Literal.String.Backtick */
-.syntax .sc { color: #4e9a06 } /* Literal.String.Char */
-.syntax .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */
-.syntax .s2 { color: #4e9a06 } /* Literal.String.Double */
-.syntax .se { color: #4e9a06 } /* Literal.String.Escape */
-.syntax .sh { color: #4e9a06 } /* Literal.String.Heredoc */
-.syntax .si { color: #4e9a06 } /* Literal.String.Interpol */
-.syntax .sx { color: #4e9a06 } /* Literal.String.Other */
-.syntax .sr { color: #4e9a06 } /* Literal.String.Regex */
-.syntax .s1 { color: #4e9a06 } /* Literal.String.Single */
-.syntax .ss { color: #4e9a06 } /* Literal.String.Symbol */
-.syntax .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
-.syntax .vc { color: #000000 } /* Name.Variable.Class */
-.syntax .vg { color: #000000 } /* Name.Variable.Global */
-.syntax .vi { color: #000000 } /* Name.Variable.Instance */
-.syntax .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */
+.codehilite .hll { background-color: #ffffcc }
+.codehilite  { background: #f8f8f8; }
+.codehilite .c { color: #8f5902; font-style: italic } /* Comment */
+.codehilite .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
+.codehilite .g { color: #000000 } /* Generic */
+.codehilite .k { color: #204a87; font-weight: bold } /* Keyword */
+.codehilite .l { color: #000000 } /* Literal */
+.codehilite .n { color: #000000 } /* Name */
+.codehilite .o { color: #ce5c00; font-weight: bold } /* Operator */
+.codehilite .x { color: #000000 } /* Other */
+.codehilite .p { color: #000000; font-weight: bold } /* Punctuation */
+.codehilite .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */
+.codehilite .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */
+.codehilite .c1 { color: #8f5902; font-style: italic } /* Comment.Single */
+.codehilite .cs { color: #8f5902; font-style: italic } /* Comment.Special */
+.codehilite .gd { color: #a40000 } /* Generic.Deleted */
+.codehilite .ge { color: #000000; font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #ef2929 } /* Generic.Error */
+.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { color: #00A000 } /* Generic.Inserted */
+.codehilite .go { color: #000000; font-style: italic } /* Generic.Output */
+.codehilite .gp { color: #8f5902 } /* Generic.Prompt */
+.codehilite .gs { color: #000000; font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.codehilite .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
+.codehilite .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */
+.codehilite .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #204a87; font-weight: bold } /* Keyword.Type */
+.codehilite .ld { color: #000000 } /* Literal.Date */
+.codehilite .m { color: #0000cf; font-weight: bold } /* Literal.Number */
+.codehilite .s { color: #4e9a06 } /* Literal.String */
+.codehilite .na { color: #c4a000 } /* Name.Attribute */
+.codehilite .nb { color: #204a87 } /* Name.Builtin */
+.codehilite .nc { color: #000000 } /* Name.Class */
+.codehilite .no { color: #000000 } /* Name.Constant */
+.codehilite .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */
+.codehilite .ni { color: #ce5c00 } /* Name.Entity */
+.codehilite .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
+.codehilite .nf { color: #000000 } /* Name.Function */
+.codehilite .nl { color: #f57900 } /* Name.Label */
+.codehilite .nn { color: #000000 } /* Name.Namespace */
+.codehilite .nx { color: #000000 } /* Name.Other */
+.codehilite .py { color: #000000 } /* Name.Property */
+.codehilite .nt { color: #204a87; font-weight: bold } /* Name.Tag */
+.codehilite .nv { color: #000000 } /* Name.Variable */
+.codehilite .ow { color: #204a87; font-weight: bold } /* Operator.Word */
+.codehilite .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */
+.codehilite .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */
+.codehilite .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */
+.codehilite .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */
+.codehilite .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */
+.codehilite .sb { color: #4e9a06 } /* Literal.String.Backtick */
+.codehilite .sc { color: #4e9a06 } /* Literal.String.Char */
+.codehilite .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */
+.codehilite .s2 { color: #4e9a06 } /* Literal.String.Double */
+.codehilite .se { color: #4e9a06 } /* Literal.String.Escape */
+.codehilite .sh { color: #4e9a06 } /* Literal.String.Heredoc */
+.codehilite .si { color: #4e9a06 } /* Literal.String.Interpol */
+.codehilite .sx { color: #4e9a06 } /* Literal.String.Other */
+.codehilite .sr { color: #4e9a06 } /* Literal.String.Regex */
+.codehilite .s1 { color: #4e9a06 } /* Literal.String.Single */
+.codehilite .ss { color: #4e9a06 } /* Literal.String.Symbol */
+.codehilite .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #000000 } /* Name.Variable.Class */
+.codehilite .vg { color: #000000 } /* Name.Variable.Global */
+.codehilite .vi { color: #000000 } /* Name.Variable.Instance */
+.codehilite .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */

templates/index.html

     <h2>Quite simple web framework</h2>
 </div>
 
-
     <div class="blah">
         Buro is a very simple Python-powered open-source web framework inspired by Flask, but following different design decisions. Consequently it's powered by <a href="http://werkzeug.pocoo.org/">Werkzeug</a> and <a href="http://jinja.pocoo.org/2/">Jinja2</a>. I hope that Buro doesn't look like a bad copy of Flask, and in that event their developers don't mind it.
     </div>
 {% block content %}
 
 <em>Latest version <a href="{{download_url}}">{{version}}</a>.</em>
-    
-<h2>A very simple Buro application</h2>
 
-<div class="syntax"><pre><span class="k">from</span> <span class="nv">buro</span> <span class="k">import</span> <span class="nv">Buro</span><span class="p">,</span> <span class="nv">get_root</span>
-
-<span class="nv">app</span> <span class="o">=</span> <span class="nv">Buro</span><span class="p">(</span><span class="nv">get_root</span><span class="p">(</span><span class="nv">__file__</span><span class="p">))</span>
-
-<span class="nv">app</span><span class="p">.</span><span class="nv">publish</span><span class="p">(</span><span class="nv">url</span><span class="o">=</span><span class="c1">&quot;/&quot;</span>, <span class="nv">template</span><span class="o">=</span><span class="c1">&quot;index.html&quot;</span>)</span>
-
-<span class="k">if</span> <span class="nv">__name__</span> <span class="o">==</span> <span class="c1">&quot;__main__&quot;:</span>
-
-    <span class="nv">app</span><span class="p">.</span><span class="nv">run</span><span class="p">()</span>
-</pre></div>
-
-<p>
-    That's it. Just run your python file and the development web server will
-    begin to listen on port 8000.
-</p>
-
-<h2>Easy installation</h2>
-
-<p>
-    Buro is both available on <a href="http://pypi.python.org/pypi/Buro/">PyPi</a> and <a href="http://bitbucket.org/Kizlum/buro/src">Bitbucket</a>. However, it's recommended to use easy_install because it's, well, easier:
-    
-    <div class="syntax"><pre>easy_install Buro
-python myapp.py</pre></div>
-    
-</p>
-
-<h2>License</h2>
-
-That's simple: Buro is licensed under <a href="http://creativecommons.org/licenses/BSD/">the BSD license</a>.
+{{content}}
 
 {% endblock content %}