{ "info": { "author": "Armin Ronacher", "author_email": "armin.ronacher@active-4.com", "bugtrack_url": null, "classifiers": [], "description": "webdepcompress\n ~~~~~~~~~~~~~~\n\n This package implements a simple framework-independent system for web\n dependency compression. With the help of various compressors it\n compresses JavaScript and CSS if necessary and allows a fallback if\n the files are used uncompressed (developer mode).\n\n This package provides a naive, whitespace removing compressor for\n CSS and JavaScript but a powerful, yuicompressor based compressing\n algorithm will be available from the pypi that is used automatically\n if available. This makes it possible to ship this package with an\n application for production usage and precompressed files without\n having to install yuicompressor and Java.\n\n Declaring Packs\n ---------------\n\n Add a file to your package (for example packs.py) with the following\n contents::\n\n from webdepcompress.manager import PackManager\n\n mgr = PackManager(os.path.join(os.path.dirname(__file__), 'static'),\n lambda fn, t: '/static/' + fn)\n\n mgr.add_pack('default', ['style.css', 'print.css',\n 'jquery.js', 'application.js'])\n\n First you have to create a pack manager. That manager keeps a registry\n of all your packs, because you can have multiple of those. The first\n argument to it is the path to where the files are stored. Most of the\n time it makes sure to point to somewhere inside your package. That path\n is used as base path for the source files and it will also be used as\n a path for the compressed files when created.\n\n The second argument to the manager is a function that returns the URL\n to the file. In this case it assumes that the files are available\n as ``/static/filename.css`` and so forth.\n\n When you add a pack you call `PackManager.add_pack` with the\n name of the pack as first argument and the files it should pack together\n as the second.\n\n Using Packs\n -----------\n\n Packs provide a simple interface:\n\n >>> mgr['default']\n \n >>> print mgr['default']\n \n \n \n \n\n As you can see, the `__str__` and `__unicode__` special methods of a\n pack return the HTML needed to include the files specified. Please note\n that it will print out the stylesheets before the scripts by default\n and that scripts and files are kept in the order specified but grouped\n by type. It also outputs HTML4/HTML5 by default and not XHTML. This\n can be changed.\n\n Packs can be compressed by calling the `PackManager.compress`\n method on the manager or of a pack:\n\n >>> mgr.compress()\n\n That can take a while, after that you can see that the manager spits\n out the compressed includes:\n\n >>> print mgr['default']\n \n \n\n You can pass packs to your template engine easily. The best idea is to\n forward the pack as a string or list of strings so that the template\n cannot call `compress` on it.\n\n Setuputils Integration\n ----------------------\n\n If you add a webdepcompress_manager setting to your setup call you\n can use the `compress_deps` command from `setup.py`::\n\n setup(\n ...,\n webdepcompress_manager='yourapplication.packs.mgr'\n )\n\n Then you can compile the deps from the command line::\n\n $ python setup.py compress_deps\n\n And clean the compressed files again::\n\n $ python setup.py compress_deps --clean\n\n\n :copyright: (c) 2009 by Armin Ronacher, see AUTHORS for more details.\n :license: BSD, see LICENSE for more details.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://dev.pocoo.org/hg/webdepcompress/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "WebDepCompress", "package_url": "https://pypi.org/project/WebDepCompress/", "platform": "any", "project_url": "https://pypi.org/project/WebDepCompress/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://dev.pocoo.org/hg/webdepcompress/" }, "release_url": "https://pypi.org/project/WebDepCompress/0.2/", "requires_dist": null, "requires_python": null, "summary": "JavaScript and CSS Compression Package", "version": "0.2" }, "last_serial": 785994, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ce653699968143eca9c7275ec2a6c156", "sha256": "7ed833e12ade6c46ed4df24593eeb68a51bf917b4fcfb0a920e26e47ee25e832" }, "downloads": -1, "filename": "WebDepCompress-0.1.zip", "has_sig": false, "md5_digest": "ce653699968143eca9c7275ec2a6c156", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10909, "upload_time": "2009-08-30T14:52:14", "url": "https://files.pythonhosted.org/packages/b4/48/4c8e281b3d3fe2a8523ce55f07a229d5dfecc7d491948c64f29245156727/WebDepCompress-0.1.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "0a327a20bcf2ca2f4bfa5355d254fee7", "sha256": "300ea5a70dfd26626c3282cdbdc96ef579e92249acf21ac6fb58d01cc0d4e0c6" }, "downloads": -1, "filename": "WebDepCompress-0.1.1.zip", "has_sig": false, "md5_digest": "0a327a20bcf2ca2f4bfa5355d254fee7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11891, "upload_time": "2009-08-30T15:12:43", "url": "https://files.pythonhosted.org/packages/49/e6/9e708c943b782835292a1198ad5b14f85e2aa9d3c6835a7dd1f270ed0a4a/WebDepCompress-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "411756f39d19e1aae8b787f45c4b9ea8", "sha256": "4421dc1d4f96b5581f492b900c6d646abd140abe2356f8135b6c7d10e848390f" }, "downloads": -1, "filename": "WebDepCompress-0.1.2.tar.gz", "has_sig": false, "md5_digest": "411756f39d19e1aae8b787f45c4b9ea8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6986, "upload_time": "2010-08-14T14:39:32", "url": "https://files.pythonhosted.org/packages/10/e9/1015d56a7e75d57be7f393acae3c9bd0c464cf314dcb13318a48cbe04807/WebDepCompress-0.1.2.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "ffd2d2165fad411d808c8e7fc5d3b513", "sha256": "4d798cf30a1d5cabe8ae6c730e66a06d516290c1feed92d23874624ff0fe93e6" }, "downloads": -1, "filename": "WebDepCompress-0.2.tar.gz", "has_sig": false, "md5_digest": "ffd2d2165fad411d808c8e7fc5d3b513", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7306, "upload_time": "2010-08-14T14:51:15", "url": "https://files.pythonhosted.org/packages/95/cd/4fffe000aa0a5d0b3105d7e01dc5598fec40bfe6a15fc9775ff6d2c7a662/WebDepCompress-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ffd2d2165fad411d808c8e7fc5d3b513", "sha256": "4d798cf30a1d5cabe8ae6c730e66a06d516290c1feed92d23874624ff0fe93e6" }, "downloads": -1, "filename": "WebDepCompress-0.2.tar.gz", "has_sig": false, "md5_digest": "ffd2d2165fad411d808c8e7fc5d3b513", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7306, "upload_time": "2010-08-14T14:51:15", "url": "https://files.pythonhosted.org/packages/95/cd/4fffe000aa0a5d0b3105d7e01dc5598fec40bfe6a15fc9775ff6d2c7a662/WebDepCompress-0.2.tar.gz" } ] }