An example using simplicity and complexity.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Date: July 19, 2013
Author: Daniel Greenfeld
Version: 1.0
description:An example of using Simplicity to populate the data in a Complexity generated site.

Clone this and use it with the Complexity static site generator. Try it out:

$ pip install simplicity
$ pip install complexity
$ git clone my_project
$ cd my_project
$ simplicity README.rst > project/json/README.json
$ complexity project www



What the @#$% just happened?!?

  1. You installed:

    • simplicity: Converts ReStructuredText into JSON.
    • complexity: A refreshingly simple static site generator, for those who like to work in HTML.
$ pip install simplicity
$ pip install complexity
  1. You cloned these files to your local machine and went inside them.
$ git clone my_project
$ cd my_project
  1. You used simplicity to convert this README.rst file to JSON.
$ simplicity README.rst > project/json/README.json
  1. You used complexity to generate a static HTML site in a new 'www' folder.
$ complexity project www
  1. You viewed the generated static site which was served by complexity's built-in HTTP server:

    $ open


Take a look at

{% extends "base.html" %}

{% block title %}Home{% endblock %}

{% block content %}
<div class="row">
    <div class="span12">
        <h1>{{ README.0.title }}</h1>
        <p>Created: {{ }}</p>
        <p>Author: {{ }}</p>
        <p>Version: {{ README.0.version }}</p>
        <p>Version: {{ README.0.description }}</p>

{% endblock %}

Complexity used Jinja2 to render the data elements in that module with the README.json module you just created from this file using simplicity.

Easy as that.