Package: decoupage
what is it?decoupageis adynamicfile server that allows for index pages
configurable with genshi templates and .ini files.  I mainly wrote it
because i was tired of using apache for serving my website and
generating index.html files by hand.  Decoupage provides views into
the filesystem.how do i use it?Set up apaste.ini file that specifies the
directory to serve (decoupage.directory) and, optionally, a
configuration file .ini file (decoupage.configuraton) which
specifies the labels for the files based on directory. An example of apaste.ini file is indecoupage.ini. Note the[app:decoupage]section:[app:decoupage]
paste.app_factory = decoupage.factory:factory
decoupage.directory = %(here)s/example
decoupage.configuration = %(here)s/example.iniThe labels for files are inexample.ini, specified by sections as
directories:[/]
foo.txt = a file about cats

[/cats]
lilly.txt = lilly
hobbes.txt = a file about HobbesYou can specify the entire layout from here.  Alternately, you can
have anindex.iniin a directory which, if present, overrides the
default configuration.  Such a file is in thefleemsubdirectory
ofexample:/template = index.html
fleem.txt = some fleem for yaTry it out!  Install decoupage and runpaster serve decoupage.iniand point your browser to the URL it gives you.how do i do more with decoupage?Since filenames can’t start with a/(just try it!), the
functionality of decoupage may be extended with/commands in a
section.  This is done by adding a setuptoolsentry_pointto[decoupage.formatters].  See the decoupagesetup.pyanddecoupage.formattersfor examples.  For instance,Runningdecoupage-formattersfrom the command line gives the list of
formatters that are available (which are pluggable setuptools extension points
at [decoupage.formatters]).  For example: /include = site.html could
include the site.html genshi template at the top of the body.Formatters:sort:determines how to sort the files in a directory;
right now only by case-insensitive alphabetically
* reverse : reverse the order of the sortingall:only pass files of a certain pattern;
the inverse of ignore
calling all with no arguments means only files with descriptions
are usedtitle:splits a description into a title and a description via a
separator in
the description.  The template will now have an additional
variable,
‘title’, per file
Arguments:
* separator: what separator to use (‘:’ by default)describe:obtain the description from the filename
the file extension (if any) will be dropped and
spaces will be substituted for underscoresignore:ignore files of a glob patterns.
These files will not be linked to in the template.
e.g./ignore = .* *.pdf  # don't list dotfiles and PDFsinclude: include a file at the top of the bodycss: specify CSS used (whitespace separated list)Decoupage also makes use of other special intrinsic keywords:formatters: ordered list of formatters to applyinherit: inherit configuration from a certain directory (instead of
the parenttransform: a list of transformers for contenttransformerTestingRight now, there is minimal testing.TODOallow transformers to be configurable on a per-directory basisadd a?format=rssquery string argumentadd a?template=foo.htmlquery string argument