On Wed, Feb 27, 2008 at 08:07:07AM -0700, Andrew McNabb wrote:
> 
> Although it's bad to waste a lot of time on bikeshedding, it would be
> helpful if we could discuss what the config file should look like.  Do
> any of you have any suggestions for what to name the different
> directives and what order to put the arguments in.  Also, are there any
> important configuration options that we haven't discussed yet?

Adam and I discussed some of these issues today, and here is what we
have converged on:

# When a request comes in for `abc.html`, grab the content from `abc.py` and
# format it using `present(py_to_html(content))`, where `py_to_html` converts
# from Python to raw HTML, and `present` puts the raw HTML into a template
# and renders it.
convert from .py to .html using py_to_html,present

# You can switch the order of `from`, `to` and `using`:
convert using py_to_html,present to .html from .py

# This is what I do on my web page: just throw the raw HTML page into a
# template and render it (without changing the extension):
convert to .html using present

# Ignore all extensions and treat every file as ReST (Peter's setup):
convert using rst_to_html,present

# View `abc.py.html` by retrieving `abc.py` and converting it to html:
convert to .py.html from .py using py_to_html,present

# View `abc.html` by retrieving `abc` and treating it as ReST content:
convert to .html from no_extension using rst_to_html,present

# View all files as text/plain:
convert using plaintext

# Treat `html` files as Django templates and render them:
convert to .html using render

# If the user requests `/abc/xyz/` then pretend they requested
# `/abc/xyz/index.html`
directory_index index.html


I think that this syntax provides for most simple situations.  We still
might want to add "allow/deny" or various other things, but those sorts
of things can easily be added down the road.

Now is your chance to bikeshed.  If you prefer
`using py_to_html+present` to `using py_to_html,present`, then now is
the time to talk about it.

Thanks!


-- 
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868
