{ "info": { "author": "Markus E Leypold", "author_email": "greenland-4sda212@m-e-leypold.de", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "Greenland: Pythonic Infrastructure\n==================================\n\nGreenland is a package that lowers the entry barrier to implementing\ntasks that are often more typically done in shell scripts.\n\nSource code is available from the `git repository`_. See\n`CHANGELOG.rst`_ for changes and release history.\n\n.. _CHANGELOG.rst: file:CHANGELOG.rst\n.. _git repository: https://github.com/m-e-leypold/greenland4\n\n\nThe example given below showcases what Greenland purports to solve: To\nprovide easily composable building blocks for tasks that occur in\nareas commonly reserved to shell scripting.\n\nGreenland currently is not complete in this respect and will not be\nfor some time. The author regardless wishes users much fun and\nsuccess, in case they decide to use Greenland.\n\n\nAn example\n----------\n\nAssume, you're tasked with writing a utility for cleaning up directory\ntrees. It should allow th user to provide a pattern and a directory\npath, then all files matching this pattern are deleted in the\nreferenced directory tree, like this:\n\n.. code-block:: console\n\n $> rm-in-tree '*~' my/data\n\nThe obvious and probably cheapest solution -- if you're fluent in bourne shell and shell\nutilities, is, to build a shell script around a line like\n\n.. code-block:: console\n\n find \"$ROOT\" -name \"$PATTERN\" -print0 | xargs -0 rm -f\n\nIt still leaves you with the burden to do some command line parsing in\nshell script -- which is not overly heavy in this case so far, but\nspins quickly out of control when the client wants more features, like:\n\n- A configuration for the default pattern in the users home directory.\n- A verbose option to log the parameters given and the files deleted.\n- A dry-run option to preview what will be deleted.\n\nSooner or later you'll wish you could do that in a real programming\nlanguage where not all data types are strings that are pasted together\nby arcane expansion rules.\n\nSo, this would be a case to use in example Python. While handling data\nin a real programming language is clearly less flakey than in the\nshell, parsing command lines often still constitutes a major burden,\neven with helpers already in the standard libraries. This is also true\nfor Python. And finding files in directory tree is also a bit of an\neffort.\n\nSo what the author of Greenland would have liked is to have in Python\nall the building blocks that one normally has available in shell\nprogramming, but where possible, better (like in example the command\nline parsing, which IMHO turns out to be a mess in practically all\nappoaches I've seen so far).\n\nSo, what what the author of Greenland would have liked to have, is a\ndeclarative way of specifying the command line arguments, like in\n\n.. literalinclude:: examples/rm-in-tree/rm-in-tree\n :language: python\n :start-after: [manual] begin usage\n :end-before: [manual] end usage\n :dedent: 4\n\nAnd the author of Greenland would have like to have a simple way to\niterate over all the files in a directory tree with a specified\nproperty, like in\n\n.. literalinclude:: examples/rm-in-tree/rm-in-tree\n :language: python\n :start-after: [manual] begin find_files\n :end-before: [manual] end find_files\n :dedent: 8\n\nYou can also see, how the *dry-run* option has become an object member\nvariable here. This is done automagically by the Greenland algorithms,\nexcept if you specify otherwise.\n\nLICENSE\n-------\n\nGreenland is free Software and licensed by the terms of the Gnu Public\nLicense, version 3 or later (GPL3).\n\nFor details and the full license text see the file LICENSE.txt at the\ntop of the source tree.\n\n\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/m-e-leypold/greenland4", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "greenland", "package_url": "https://pypi.org/project/greenland/", "platform": "", "project_url": "https://pypi.org/project/greenland/", "project_urls": { "Homepage": "https://github.com/m-e-leypold/greenland4" }, "release_url": "https://pypi.org/project/greenland/0.0.5/", "requires_dist": null, "requires_python": "", "summary": "A pythonic scripting environment", "version": "0.0.5" }, "last_serial": 4803389, "releases": { "0.0.4": [ { "comment_text": "", "digests": { "md5": "6ce42b3ba07b35dca08f91d10055729a", "sha256": "8225c188c37f6e1d8387d1956214ded4db066f58cb46acc910ebce872512efa4" }, "downloads": -1, "filename": "greenland-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "6ce42b3ba07b35dca08f91d10055729a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 42829, "upload_time": "2019-01-13T14:55:38", "url": "https://files.pythonhosted.org/packages/e5/84/b06926cd5d30cbe029606a41a0435b607f682c8a6c997758f4cdbd4891e5/greenland-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0e8ff58c76bebd5c23bf58d520c19f79", "sha256": "d38c907becbb906c4108ba87307ebc8e12ac4ff74e0b15b5821dc34408fece55" }, "downloads": -1, "filename": "greenland-0.0.4.tar.gz", "has_sig": false, "md5_digest": "0e8ff58c76bebd5c23bf58d520c19f79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17090, "upload_time": "2019-01-13T14:55:40", "url": "https://files.pythonhosted.org/packages/e2/17/f4fae80695db71d78d5106ff2036b7da3e3d258d2dbacb4dd26daef3b4d6/greenland-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "0164905a4e51084d0cbeb1839b4b38ea", "sha256": "d8a3db6fcca55eda5e2b455c985f333bcee734386f97cde503d883a4160c8ac1" }, "downloads": -1, "filename": "greenland-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "0164905a4e51084d0cbeb1839b4b38ea", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 50705, "upload_time": "2019-02-10T21:45:09", "url": "https://files.pythonhosted.org/packages/e2/5f/3850a6734463f8fda2db86d146d802765f74cd8f8dfb7263eb9148d684c6/greenland-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c4d6d5762a2a0e5ced8085cf5264fc2", "sha256": "73bb2250e8d4d30a602fc2c4b6c5a3998f1dc5db6d02c653019bb5075cae9260" }, "downloads": -1, "filename": "greenland-0.0.5.tar.gz", "has_sig": false, "md5_digest": "6c4d6d5762a2a0e5ced8085cf5264fc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22909, "upload_time": "2019-02-10T21:45:11", "url": "https://files.pythonhosted.org/packages/af/bd/bac7c67bd50b1ecdfcc16d47cf34aec21be280c618c15ff0cabcb8b441d2/greenland-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0164905a4e51084d0cbeb1839b4b38ea", "sha256": "d8a3db6fcca55eda5e2b455c985f333bcee734386f97cde503d883a4160c8ac1" }, "downloads": -1, "filename": "greenland-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "0164905a4e51084d0cbeb1839b4b38ea", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 50705, "upload_time": "2019-02-10T21:45:09", "url": "https://files.pythonhosted.org/packages/e2/5f/3850a6734463f8fda2db86d146d802765f74cd8f8dfb7263eb9148d684c6/greenland-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c4d6d5762a2a0e5ced8085cf5264fc2", "sha256": "73bb2250e8d4d30a602fc2c4b6c5a3998f1dc5db6d02c653019bb5075cae9260" }, "downloads": -1, "filename": "greenland-0.0.5.tar.gz", "has_sig": false, "md5_digest": "6c4d6d5762a2a0e5ced8085cf5264fc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22909, "upload_time": "2019-02-10T21:45:11", "url": "https://files.pythonhosted.org/packages/af/bd/bac7c67bd50b1ecdfcc16d47cf34aec21be280c618c15ff0cabcb8b441d2/greenland-0.0.5.tar.gz" } ] }