decoupage


Namedecoupage JSON
Version 0.16.0 PyPI version JSON
download
home_pagehttp://k0s.org/hg/decoupage
SummaryDecoupage is the art of decorating an object by gluing colored paper cutouts onto it in combination with special paint effects ... The software decoupage lets you stitch together index pages from filesystem content
upload_time2024-08-30 19:26:28
maintainerNone
docs_urlNone
authorJeff Hammel
requires_pythonNone
licenseGPL
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            decoupage
=========

what is it?
-----------

`decoupage` is a *dynamic* file 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 a `paste <http://pythonpaste.org>`_ .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 a
`paste <http://pythonpaste.org>`_ .ini file is in
``decoupage.ini``. Note the ``[app:decoupage]`` section::

    [app:decoupage]
    paste.app_factory = decoupage.factory:factory
    decoupage.directory = %(here)s/example
    decoupage.configuration = %(here)s/example.ini

The labels for files are in ``example.ini``, specified by sections as
directories::

    [/]
    foo.txt = a file about cats

    [/cats]
    lilly.txt = lilly
    hobbes.txt = a file about Hobbes

You can specify the entire layout from here.  Alternately, you can
have an ``index.ini`` in a directory which, if present, overrides the
default configuration.  Such a file is in the ``fleem`` subdirectory
of ``example``::

    /template = index.html
    fleem.txt = some fleem for ya

Try it out!  Install decoupage and run ``paster serve decoupage.ini``
and 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 setuptools ``entry_point`` to
``[decoupage.formatters]``.  See the decoupage ``setup.py`` and
``decoupage.formatters`` for examples.  For instance,

Running `decoupage-formatters` from 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 sorting

all:
    only pass files of a certain pattern;
    the inverse of ignore
    calling all with no arguments means only files with descriptions
    are used

title:
    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 underscores

ignore:
    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 PDFs``

include: include a file at the top of the body

css: specify CSS used (whitespace separated list)

Decoupage also makes use of other special intrinsic keywords:

formatters: ordered list of formatters to apply

inherit: inherit configuration from a certain directory (instead of
the parent

transform: a list of transformers for contenttransformer


Testing
-------

Right now, there is minimal testing.

TODO
----

 * allow transformers to be configurable on a per-directory basis
 * add a ``?format=rss`` query string argument
 * add a ``?template=foo.html`` query string argument
            

Raw data

            {
    "_id": null,
    "home_page": "http://k0s.org/hg/decoupage",
    "name": "decoupage",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Jeff Hammel",
    "author_email": "k0scist@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/cc/e5/1ae5bce4916a65f27c5a8450e6ed79df3c4d10012892a3d29cc4f370fb75/decoupage-0.16.0.tar.gz",
    "platform": null,
    "description": "decoupage\n=========\n\nwhat is it?\n-----------\n\n`decoupage` is a *dynamic* file server that allows for index pages\nconfigurable with genshi templates and .ini files.  I mainly wrote it\nbecause i was tired of using apache for serving my website and\ngenerating index.html files by hand.  Decoupage provides views into\nthe filesystem.\n\n\nhow do i use it?\n----------------\n\nSet up a `paste <http://pythonpaste.org>`_ .ini file that specifies the\ndirectory to serve (``decoupage.directory``) and, optionally, a\nconfiguration file .ini file (``decoupage.configuraton``) which\nspecifies the labels for the files based on directory. An example of a\n`paste <http://pythonpaste.org>`_ .ini file is in\n``decoupage.ini``. Note the ``[app:decoupage]`` section::\n\n    [app:decoupage]\n    paste.app_factory = decoupage.factory:factory\n    decoupage.directory = %(here)s/example\n    decoupage.configuration = %(here)s/example.ini\n\nThe labels for files are in ``example.ini``, specified by sections as\ndirectories::\n\n    [/]\n    foo.txt = a file about cats\n\n    [/cats]\n    lilly.txt = lilly\n    hobbes.txt = a file about Hobbes\n\nYou can specify the entire layout from here.  Alternately, you can\nhave an ``index.ini`` in a directory which, if present, overrides the\ndefault configuration.  Such a file is in the ``fleem`` subdirectory\nof ``example``::\n\n    /template = index.html\n    fleem.txt = some fleem for ya\n\nTry it out!  Install decoupage and run ``paster serve decoupage.ini``\nand point your browser to the URL it gives you.\n\n\nhow do i do more with decoupage?\n--------------------------------\n\nSince filenames can't start with a ``/`` (just try it!), the\nfunctionality of decoupage may be extended with ``/`` commands in a\nsection.  This is done by adding a setuptools ``entry_point`` to\n``[decoupage.formatters]``.  See the decoupage ``setup.py`` and\n``decoupage.formatters`` for examples.  For instance,\n\nRunning `decoupage-formatters` from the command line gives the list of\nformatters that are available (which are pluggable setuptools extension points\nat [decoupage.formatters]).  For example: /include = site.html could\ninclude the site.html genshi template at the top of the body.\n\nFormatters:\n\nsort:\n    determines how to sort the files in a directory;\n    right now only by case-insensitive alphabetically\n    * reverse : reverse the order of the sorting\n\nall:\n    only pass files of a certain pattern;\n    the inverse of ignore\n    calling all with no arguments means only files with descriptions\n    are used\n\ntitle:\n    splits a description into a title and a description via a\n    separator in\n    the description.  The template will now have an additional\n    variable,\n    'title', per file\n    Arguments:\n    * separator: what separator to use (':' by default)\n\ndescribe:\n    obtain the description from the filename\n    the file extension (if any) will be dropped and\n    spaces will be substituted for underscores\n\nignore:\n    ignore files of a glob patterns.\n    These files will not be linked to in the template.\n    e.g. ``/ignore = .* *.pdf  # don't list dotfiles and PDFs``\n\ninclude: include a file at the top of the body\n\ncss: specify CSS used (whitespace separated list)\n\nDecoupage also makes use of other special intrinsic keywords:\n\nformatters: ordered list of formatters to apply\n\ninherit: inherit configuration from a certain directory (instead of\nthe parent\n\ntransform: a list of transformers for contenttransformer\n\n\nTesting\n-------\n\nRight now, there is minimal testing.\n\nTODO\n----\n\n * allow transformers to be configurable on a per-directory basis\n * add a ``?format=rss`` query string argument\n * add a ``?template=foo.html`` query string argument",
    "bugtrack_url": null,
    "license": "GPL",
    "summary": "Decoupage is the art of decorating an object by gluing colored paper cutouts onto it in combination with special paint effects ... The software decoupage lets you stitch together index pages from filesystem content",
    "version": "0.16.0",
    "project_urls": {
        "Homepage": "http://k0s.org/hg/decoupage"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cce51ae5bce4916a65f27c5a8450e6ed79df3c4d10012892a3d29cc4f370fb75",
                "md5": "ff9fb288bf7f0f9ebc855fb93527c36d",
                "sha256": "60193bcffa3c0393ea7f8f1d782ceaf2859ab1c47e3d4fa4047a0f6cfc3e3a19"
            },
            "downloads": -1,
            "filename": "decoupage-0.16.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ff9fb288bf7f0f9ebc855fb93527c36d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14784,
            "upload_time": "2024-08-30T19:26:28",
            "upload_time_iso_8601": "2024-08-30T19:26:28.596986Z",
            "url": "https://files.pythonhosted.org/packages/cc/e5/1ae5bce4916a65f27c5a8450e6ed79df3c4d10012892a3d29cc4f370fb75/decoupage-0.16.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-30 19:26:28",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "decoupage"
}
        
Elapsed time: 0.86862s