{ "info": { "author": "Marc Brinkmann", "author_email": "git@marcbrinkmann.de", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "gittar\n======\n\nGittar creates a git commit from a directory or an archive, allowing you to\nstore a sequence of selective filesystem-snapshots as git commits.\n\n\nWhy?\n----\n\nThe initial use case for ``gittar`` was storing a compiled version of an\napplication in a seperate root inside a git repository. Here's an example:\n\nAssume you have a webapplication that needs to compile its assets before being\ndeployed. You do not want to have to install a lot of LESS or JS compilers, CSS\nminifiers, etc. on your production environment.\n\nFirst, you run your build tool (e.g. ``scons`` when using `the scons-tools web\nmodule `_), now your app is inside the\ndirectory ``myapp``, including the compiled static files, while the source\nfiles reside outside the ``myapp`` directory.\n\nNow, you can run::\n\n gittar -b web file:myapp\n\nThis will create a new commit containing everything inside the ``myapp``\ndirectory. If the branch ``web`` does not exist, it will be created and will\npoint to the new commit, which will have no parent. If the branch did exist\nbefore, the new commit will have it as a parent and the branch will be updated.\n\nThe hash of the new commit will be printed to stdout. If the ``-b`` option is\nnot specified, this is the only way to reach the commit.\n\nA simple application for this is deploying to `heroku `_.\nBuild your app, add a new ``gittar``-commit to the web branch and push it using\n``git push heroku web:master``.\n\n\nSchemes\n-------\n\n``gittar`` can add files from ZIP-Archives, tar-Archives or plain directories\nand files.\n\nAll sources for inclusion are specified using the following syntax::\n\n scheme:arg1:arg2:...:named_arg1=value1:named_arg2=value2:...\n\nA scheme is one of ``file``, ``zip`` or ``tar``. The arguments and named\narguments are passed on to the sources collecting the files and have meanings\ndepending on the scheme.\n\nMultiple schemes can be specified in a single command.\n\nThe file-scheme\n~~~~~~~~~~~~~~~\n\nA single file or a directory can be added as follows::\n\n gittar file:myfile file:/my/home/special_file file:/some/directory\n\nThis will add ``myfile`` to the commit with the path ``myfile``. The file\n``/my/home/special_file`` will also be added, but named ``special_file`` (no\npath) inside the commit.\n\nAssuming ``/some/directory`` is a directory, all files in it will be added\nrecursively, without the ``/some/`` path prefix. Example: A file\n``/some/directory/foo/bar`` will be added as ``directory/foo/bar`` to the\ncommit.\n\nSimilarities and differences to tar\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nSpecifying ``file:`` targets is similiar to tar, with one key differences:\nInstead of adding absolute paths, ``gittar`` will strip any path information\n(but keep subdirectory trees intact).\n\nSpecifically, ``gittar`` will never change pathnames depending on your current\nworking directory.\n\nWildcards and directories as root\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nSince directories are added recursively and always kept in the relative path,\nit's not possible this way to add a directory as the root. One solution is to\nuse wildcards (note the quotes to prevent wildcard expansion by the shell)::\n\n gittar 'file:/some/directory/*'\n\nIf there are three files in ``/some/directory`` named ``a_file``, ``a_dir`` and\n``foo``, the command above will be logically expanded to::\n\n gittar 'file:/some/directory/a_file' 'file:/some/directory/a_dir' 'file:/some/directory/foo'\n\nThis will result in ``a_file`` being added to the root of the commit.\n\nNote that wildcard-expansion is done UNIX-style using the ``glob`` module.\nFiles starting with a dot (``.``) are not included using ``*``. To add all\nfiles in a directory ``/foo`` and not having them as subdirectories, you need\nto use the following command::\n\n gittar 'file:/foo/*' 'file:/foo/.*'\n\nThe zip-scheme\n~~~~~~~~~~~~~~\n\nAdds the contents of a zip-Archive::\n\n gittar zip:/path/to/some/archive.zip\n\nThis will add all files inside ``/path/to/some/archive.zip`` with their\nrelative paths to the commit.\n\nThe tar-scheme\n~~~~~~~~~~~~~~\n\nWorks fairly similiar to the ``zip``-scheme, but for tar archives. Automatic\ndetection of compression is done. Example::\n\n gittar tar:somearchive.tar tar:/another/archive.tar.bz2\n\n\nCommon Options\n--------------\n\nExtra options can be specififed, some are valid for all sources.\n\nInclusion/Exclusion\n~~~~~~~~~~~~~~~~~~~\n\nThe ``include`` and ``exclude`` options can be used to specify which files\nshould be included in the commit. Example::\n\n gittar tar:myarchive.tar:include=*.css:include=output/*.html:exclude=~*\n\nNote: You will most likely have to enter this with backslash-escaped asterisks\n(``\\*``) on your shell.\n\nThe command above will include all CSS files and all HTML files from the output\nfolder, provided they do not start with a tilde``~``.\n\nIf no include option is given all not-excluded files are included.\n\nRegular expressions\n~~~~~~~~~~~~~~~~~~~\n\nThe ``include`` and ``exclude`` commands use UNIX shell patterns. You can use\npython (Perl-like) regular expressions by using ``rinclude`` and ``rexclude``\ninstead.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/mbr/gittar", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "gittar", "package_url": "https://pypi.org/project/gittar/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/gittar/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/mbr/gittar" }, "release_url": "https://pypi.org/project/gittar/0.6/", "requires_dist": null, "requires_python": null, "summary": "The inverse of git archive. Adds a new commit from an archiveor the filesystem.", "version": "0.6" }, "last_serial": 1976462, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "1bfd3df7c616982da3da561d63974f73", "sha256": "0fd0ae20ad058e52c4bb0b650a4a9f9edfaaf5613ed525c9f9780fdf8122582f" }, "downloads": -1, "filename": "gittar-0.1.tar.gz", "has_sig": true, "md5_digest": "1bfd3df7c616982da3da561d63974f73", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4207, "upload_time": "2013-02-17T03:51:41", "url": "https://files.pythonhosted.org/packages/e7/58/c384caad86a54f9cc2e85e12048a8696963ea5b995f3471ab7a585cf02c8/gittar-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "747f60295fadd33e3955873b62493132", "sha256": "51eda60e562ab3a3c385e941047de93955e92ff6665b70f9e2c008c8bc12d185" }, "downloads": -1, "filename": "gittar-0.2.tar.gz", "has_sig": true, "md5_digest": "747f60295fadd33e3955873b62493132", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5816, "upload_time": "2013-02-18T00:45:04", "url": "https://files.pythonhosted.org/packages/fb/77/a4cca59db3a084cfa082cf073be08a5cfdfca4f4ff18e7b5b070be7e139b/gittar-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "0f1552e20fed516c79d9bbeeb91f676c", "sha256": "a534e0b823e2029aa3ceabc9748917e6ebf6d8a5da1ae9b40aa5744d99a19e44" }, "downloads": -1, "filename": "gittar-0.2.1.tar.gz", "has_sig": true, "md5_digest": "0f1552e20fed516c79d9bbeeb91f676c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6137, "upload_time": "2013-02-18T00:52:15", "url": "https://files.pythonhosted.org/packages/49/08/dd2dae70d0db2ac78930c0603d2360f926070fc19d703bdd9f19defb3917/gittar-0.2.1.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "2253c6374c4891dc77438b91ad4e3ada", "sha256": "5cb171663d313bd03a11e6935d4897a7446271db4caa1f34a7dbdb0c6fed9229" }, "downloads": -1, "filename": "gittar-0.4.tar.gz", "has_sig": true, "md5_digest": "2253c6374c4891dc77438b91ad4e3ada", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6167, "upload_time": "2013-02-18T01:14:16", "url": "https://files.pythonhosted.org/packages/c6/e7/99c0eac6e3bb2e8779b654d811032b2ed93236d9a83077974ff05e24e842/gittar-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "dbc7e441a2c042f9ae304c00e52a5628", "sha256": "59665addc45e1776bfd2913bf57b0ff0a2063d74d564c3472d5b83f9a8a024a2" }, "downloads": -1, "filename": "gittar-0.4.1.tar.gz", "has_sig": true, "md5_digest": "dbc7e441a2c042f9ae304c00e52a5628", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6157, "upload_time": "2013-02-18T01:46:16", "url": "https://files.pythonhosted.org/packages/55/51/9e43732aa477b791e800a77fef55bb5c4cf6d58c9ff4e9d00005deea9337/gittar-0.4.1.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "62c022ca43522fa9140754d242ed1766", "sha256": "12b127547c8b78f8a19b5dd81cfd158f55ef5d3c74281a977a731956376d3b2a" }, "downloads": -1, "filename": "gittar-0.5.tar.gz", "has_sig": true, "md5_digest": "62c022ca43522fa9140754d242ed1766", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6900, "upload_time": "2013-11-25T04:16:54", "url": "https://files.pythonhosted.org/packages/ba/e3/50d6feafff1ce1ed28a2f87e12a6309db6c147ce7ce1ba1ec690cb83810b/gittar-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "f23ec26375be0d38fa738abd6ea55c06", "sha256": "8bd7c796a976bd61c8178d0503efecbef7a3991c6f336d33e1c35cd96be7c6b5" }, "downloads": -1, "filename": "gittar-0.6.tar.gz", "has_sig": true, "md5_digest": "f23ec26375be0d38fa738abd6ea55c06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7041, "upload_time": "2016-02-25T16:08:50", "url": "https://files.pythonhosted.org/packages/0b/c5/5313f9d715cba3d95ec5f94bdcfae024157a43c015fe866c0418a3f13ed8/gittar-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f23ec26375be0d38fa738abd6ea55c06", "sha256": "8bd7c796a976bd61c8178d0503efecbef7a3991c6f336d33e1c35cd96be7c6b5" }, "downloads": -1, "filename": "gittar-0.6.tar.gz", "has_sig": true, "md5_digest": "f23ec26375be0d38fa738abd6ea55c06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7041, "upload_time": "2016-02-25T16:08:50", "url": "https://files.pythonhosted.org/packages/0b/c5/5313f9d715cba3d95ec5f94bdcfae024157a43c015fe866c0418a3f13ed8/gittar-0.6.tar.gz" } ] }