{ "info": { "author": "Harold Martin", "author_email": "harold.martin@openx.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Documentation", "Topic :: Utilities" ], "description": "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\nKontinuous Integration and ReBuild\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n================================\nQuick Start\n================================\n**Follow along with example.py**\n\n::\n\n import kirb\n path = '.'\n watcher = kirb.Watcher(path)\n\nWatchers can specify File Sets, which are a group of files to watch for changes.\nA File Set must first specify an output file (where the build output is written)\nand a list a files to monitor (relative to the Watcher's path)\n\n``watcher.add_file_set('styles.css', ['css/a.css', 'css/b.css'])``\n\nTo start monitoring for file changes, call:\n\n``watcher.start()``\n\nWhenever css/a.css or css/b.css are modified, both files will be concatenated\n(in list order) to styles.css\nWhen your program is ready to exit, call ``watcher.stop()``\n\nTo immediately apply the operations and callbacks to all File Sets without\nwaiting for a file to change (i.e. may be called without ``start()`` ):\n\n``watcher.compile()``\n\n\n================================\nMirrored Builds\n================================\nFile Sets can used to create Mirror Sets. Mirror Sets are useful for building \nvariations of the main file set, such as static themes or customer tuned builds.\nMirror Sets assume that there is an identical tree structure to a given File Set\nwith files that may be overriden or added in the mirror directory.\n\n``my_project.add_mirror_set('styles.css', 'customerA')``\n\nNow we are watching 'customerA/css/a.css' and 'customerA/css/b.css' (if they\nexist), and if not we are continuing to watch the original File Set files (with\noriginal order preserved). Output for the Mirror Set will be written to\n'customerA/styles.css'. Mirror Sets may also be passed an optional third\nargument, a list of files for only the Mirror Set to watch.\n\n================================\nModes\n================================\nadd_file_set can be passed a third argument, a dict containing a mode and\ncallbacks for various mode-specific build stages:\n\n``watcher.add_file_set(out, js_paths, {'mode' : 'concat', 'onchange' : js_lint})``\n\n--------------------------------\nconcat\n--------------------------------\nThis mode reads the files in the File Set line by line and writes them to the\nFile Set's out. This is the default mode.\n\n**Callbacks**\n\n* ``each([out, files]) ``\n \n Return a list to modify the files used for concatenation.\n This could be used when watching SCSS files to generate CSS if none is\n present (assume onchange callback already compiled the modified SCSS\n file), then return a list of css paths.\n* ``line(str) ``\n \n Called during concatenation with line of original file\n Return value is written to concatenated final\n* ``post(file_path)``\n \n Called with string path of concatenated file after concatenation\n\n--------------------------------\nfiles_only\n--------------------------------\nThis mode calls the each handler then does nothing else. It's useful for\nspriting, so the spriter could be run then return False\n\n**Callbacks**\n\n* ``each([out, files])``\n \n Same as above.\n\n--------------------------------\nslurp\n--------------------------------\nThis mode reads the contents of all of files into memory, which it then passes\nto a **required** each handler. Note this each handler receives different\narguments that the other callbacks. It is useful for pickling files\ntogether, i.e. to serialize template files into a single JSON object.\n\n**Callbacks**\n\n* ``each(out, [[file_name_1, file_contents_1], [file_name_2, file_contents_2], ...])``\n \n Be careful with this, try to avoid using unless absolutely necessary.\n\n--------------------------------\nafter Watcher.start()\n--------------------------------\nAfter a Watcher has been started, it will fire the onchange callback (all modes)\n\n**Callbacks**\n\n* ``onchange(name of changed file)``\n \n onchange will be passed a string containing the changed file's path. This is\n useful for linting, which may be needlessly expensive to run on all files in\n the File Set. Raise an exception if an error is detected.\n\n================================\nOther Options\n================================\nIn addition to mode, add_file_set can also be passed the options:\n* no_out\n Set to False to prevent the File Set from writing its output file. Default to\n True. Useful for when the File Set is only used to setup Mirror Set builds.\n* prefix_chomp\n This prefix will be removed from any files in the File Set when identifying\n files to be overwritten in a Mirror Set.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hbmartin/kirb", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "kirb", "package_url": "https://pypi.org/project/kirb/", "platform": "any", "project_url": "https://pypi.org/project/kirb/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/hbmartin/kirb" }, "release_url": "https://pypi.org/project/kirb/1.6.2/", "requires_dist": null, "requires_python": null, "summary": "Continuous Integration & ReBuild", "version": "1.6.2" }, "last_serial": 793954, "releases": { "1.6.1": [ { "comment_text": "", "digests": { "md5": "d826573de82ca52c53aeda6683a89fd9", "sha256": "0e13f52f6c7f7d19fda784ee7ec375055dd7c180d20d44e10bf10177111699f8" }, "downloads": -1, "filename": "kirb-1.6.1.tar.gz", "has_sig": false, "md5_digest": "d826573de82ca52c53aeda6683a89fd9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4813, "upload_time": "2013-03-09T01:44:22", "url": "https://files.pythonhosted.org/packages/9a/cf/1ccb8eb153654a0f9f8e1c5ad45d1685c76b66d1d477d6414961aae0b492/kirb-1.6.1.tar.gz" } ], "1.6.2": [ { "comment_text": "", "digests": { "md5": "1ca39b334dfeccc1f9f23bc1ee917e0c", "sha256": "f25c05a84ef259e6a380854b3026d4d5c5343d22de02cf50c48ba02c3750baf2" }, "downloads": -1, "filename": "kirb-1.6.2.tar.gz", "has_sig": false, "md5_digest": "1ca39b334dfeccc1f9f23bc1ee917e0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4829, "upload_time": "2013-05-07T19:07:40", "url": "https://files.pythonhosted.org/packages/97/ed/cb66b48d71c89d9afcc9d3aa3de2b5e32b6a444a2639e147a0a0b2b070fc/kirb-1.6.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1ca39b334dfeccc1f9f23bc1ee917e0c", "sha256": "f25c05a84ef259e6a380854b3026d4d5c5343d22de02cf50c48ba02c3750baf2" }, "downloads": -1, "filename": "kirb-1.6.2.tar.gz", "has_sig": false, "md5_digest": "1ca39b334dfeccc1f9f23bc1ee917e0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4829, "upload_time": "2013-05-07T19:07:40", "url": "https://files.pythonhosted.org/packages/97/ed/cb66b48d71c89d9afcc9d3aa3de2b5e32b6a444a2639e147a0a0b2b070fc/kirb-1.6.2.tar.gz" } ] }