comparison README.txt @ 0:fa2005f769eb

adding decoupage from http://my-svn.assembla.com/svn/arbez/decoupage r355
author k0s <k0scist@gmail.com>
date Mon, 07 Sep 2009 13:40:22 -0400
parents
children ebc1a802f9b8
comparison
equal deleted inserted replaced
-1:000000000000 0:fa2005f769eb
1 decoupage
2 =========
3
4 what is it?
5 -----------
6
7 decoupage is a static file server that allows for index pages
8 configurable with genshi templates and .ini files. I mainly wrote it
9 because i was tired of using apache for serving my website and
10 generating index.html files by hand.
11
12
13 how do i use it?
14 ----------------
15
16 Set up a `paste <http://pythonpaste.org>`_ .ini file that specifies the
17 directory to serve (``decoupage.directory``) and, optionally, a
18 configuration file .ini file (``decoupage.configuraton``) which
19 specifies the labels for the files based on directory. An example of a
20 `paste <http://pythonpaste.org>`_ .ini file is in
21 ``decoupage.ini``. Note the ``[app:decoupage]`` section::
22
23 [app:decoupage]
24 paste.app_factory = decoupage.factory:factory
25 decoupage.directory = %(here)s/example
26 decoupage.configuration = %(here)s/example.ini
27
28 The labels for files are in ``example.ini``, specified by sections as
29 directories::
30
31 [/]
32 foo.txt = a file about cats
33
34 [/cats]
35 lilly.txt = lilly
36 hobbes.txt = a file about Hobbes
37
38 You can specify the entire layout from here. Alternately, you can
39 have an ``index.ini`` in a directory which, if present, overrides the
40 default configuration. Such a file is in the ``fleem`` subdirectory
41 of ``example``::
42
43 /template = index.html
44 fleem.txt = some fleem for ya
45
46 Try it out! Install decoupage and run ``paster serve decoupage.ini``
47 and point your browser to the URL it gives you.
48
49
50 how do i do more with decoupage?
51 --------------------------------
52
53 Since filenames can't start with a ``/`` (just try it!), the
54 functionality of decoupage may be extended with ``/`` commands in a
55 section. This is done by adding a setuptools ``entry_point`` to
56 ``[decoupage.formatters]``. See the decoupage ``setup.py`` and
57 ``decoupage.formatters`` for examples.