{ "info": { "author": "Timo Furrer", "author_email": "tuxtimo@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Documentation" ], "description": "# click-man\n\n[![Build Status](https://travis-ci.org/click-contrib/click-man.svg?branch=master)](https://travis-ci.org/click-contrib/click-man) [![PyPI Package version](https://badge.fury.io/py/click-man.svg)](https://pypi.python.org/pypi/click-man)\n\nCreate **man pages** for [click](https://github.com/pallets/click) application as easy as this:\n\n```bash\npython3 setup.py --command-packages=click_man.commands man_pages\n```\n\n\u2192 Checkout the [debian packaging example](https://github.com/timofurrer/click-man#debian-packages)\n\n## What it does\n\n*click-man* will generate one man page per command of your click CLI application specified in `console_scripts` in your `setup.py`.\n\n## Installation\n\n```bash\npip3 install click-man\n```\n\n**click-man** is also available for Python 2:\n\n```bash\npip install click-man\n```\n\n## Usage Recipes\n\nThe following sections describe different usage example for *click-man*.\n\n### Use with a previously installed package\n\n**click-man** provides its own command line tool which can be passed the name of\nan installed script:\n\n```bash\nclick-man commandname\n```\n\nwhere `commandname` is the name of an installed `console_script` entry point.\n\nTo specify a target directory for the man pages, use the `--target` option:\n\n```bash\nclick-man --target path/to/man/pages commandname\n```\n\n### Use with setuptools\n\n**click-man** provides a sane setuptools command extension which can be used like the following:\n\n```bash\npython3 setup.py --command-packages=click_man.commands man_pages\n```\n\nor specify the man pages target directory:\n\n```bash\npython3 setup.py --command-packages=click_man.commands man_pages --target path/to/man/pages\n```\n\n### Automatic man page installation with setuptools and pip\n\nThis approach of installing man pages is problematic for various reasons:\n\n#### (1) Man pages are a UNIX thing\n\nPython in general and with that pip and setuptools are aimed to be platform independent.\nMan pages are **not**: they are a UNIX thing which means setuptools does not provide a sane\nsolution to generate and install man pages. \nWe should consider using automatic man page installation only with vendor specific packaging, e.g. for `*.deb` or `*.rpm` packages.\n\n#### (2) Man pages are not compatable with Python virtualenvs\n\nEven on systems that support man pages, Python packages can be installed in\nvirtualenvs via pip and setuptools, which do not make commands available\nglobally. In fact, one of the \"features\" of a virtualenv is the ability to\ninstall a package without affecting the main system. As it is imposable to\nensure a man page is only generated when not installing into a virtualenv,\nauto-generated man pages would pollute the main system and not stay contained in\nthe virtualenv. Additionally, as a user could install multiple different\nversions of the same package into multiple different virtualenvs on the same\nsystem, there is no guarantee that a globally installed man page will document\nthe version and behavior available in any given virtualenv.\n\n#### (3) We want to generate man pages on the fly\n\nFirst, we do not want to commit man pages to our source control.\nWe want to generate them on the fly. Either\nduring build or installation time.\n\nWith setuptools and pip we face two problems:\n\n1. If we generate and install them during installation of the package pip does not know about the man pages and thus cannot uninstall it.\n2. If we generate them in our build process and add them to your distribution we do not have a way to prevent installation to */usr/share/man* for non-UNIX-like Operating Systems or from within virtualenvs.\n\n### Debian packages\n\nThe `debhelper` packages provides a very convenient script called `dh_installman`.\nIt checks for the `debian/(pkg_name.)manpages` file and it's content which is basically a line by line list of man pages or globs:\n\n```\ndebian/tmp/manpages/*\n```\n\nWe override the rule provided by `dh_installman` to generate our man pages in advance, like this:\n\n```Makefile\noverride_dh_installman:\n\tpython3 setup.py --command-packages=click_man.commands man_pages --target debian/tmp/manpages\n\tdh_installman -O--buildsystem=pybuild\n```\n\nNow we are able to build are debian package with the tool of your choice, e.g.:\n\n```debuild -us -uc```\n\nCheckout a working example here: [repo debian package](https://github.com/timofurrer/click-man/tree/master/examples/debian_pkg)\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/click-contrib/click-man", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "click-man", "package_url": "https://pypi.org/project/click-man/", "platform": "", "project_url": "https://pypi.org/project/click-man/", "project_urls": { "Homepage": "https://github.com/click-contrib/click-man" }, "release_url": "https://pypi.org/project/click-man/0.3.0/", "requires_dist": [ "click" ], "requires_python": "", "summary": "Generate man pages for click based CLI applications", "version": "0.3.0" }, "last_serial": 4736659, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f611d97cb2b4e0a03a01c0bb062d97db", "sha256": "10f97d6f816dc843a295b558c38ab8cc9595355177f77ea0f31ef3df17296890" }, "downloads": -1, "filename": "click_man-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "f611d97cb2b4e0a03a01c0bb062d97db", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7222, "upload_time": "2016-09-18T15:35:15", "url": "https://files.pythonhosted.org/packages/b0/9b/36adeda994e17c7453b88ec1df83ff103e74e85640234ede46dfdf6d893c/click_man-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2e3df579c8907f82d3f2e54c161df897", "sha256": "77e4a8d7db5df5914241f160a4da6561ba0f26f7ced87cde7c36b1b0e2987faa" }, "downloads": -1, "filename": "click-man-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2e3df579c8907f82d3f2e54c161df897", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4645, "upload_time": "2016-09-18T15:35:12", "url": "https://files.pythonhosted.org/packages/9f/f0/3abdfb254ed2069d2f004aa61cecde5e56cfd59abecde4ad647db94c4b65/click-man-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "0f8680f494963ce5e4a4703922ead328", "sha256": "042d701319fb6f5768c162e98d87c30dae61bf8c434c1b4bbff26de53b9a05b0" }, "downloads": -1, "filename": "click-man-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0f8680f494963ce5e4a4703922ead328", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4923, "upload_time": "2016-09-27T18:36:12", "url": "https://files.pythonhosted.org/packages/e8/04/9b5736de0aa47a46907fec7d13a9c379d0c41aa2c61e555b67f1745efa43/click-man-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2b90e23f7cb9c5b2271be37f9154a9e3", "sha256": "d0ad0ab3d347df3fbdb31f75c83963fb60f6c783282cdeecb2901ffffca04765" }, "downloads": -1, "filename": "click-man-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2b90e23f7cb9c5b2271be37f9154a9e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6047, "upload_time": "2016-10-01T14:29:33", "url": "https://files.pythonhosted.org/packages/ac/69/77e610487f55c737a3065dc318bc7f839317dfd914fcd92f8d8ae0d2f05a/click-man-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "177615c0648755454b7f739a82f19a0a", "sha256": "66a62cac494196742641b6e8520b4a4bc0baf0bac71120c5aa49590f66c1113b" }, "downloads": -1, "filename": "click-man-0.2.1.tar.gz", "has_sig": false, "md5_digest": "177615c0648755454b7f739a82f19a0a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6746, "upload_time": "2017-03-11T12:28:15", "url": "https://files.pythonhosted.org/packages/7f/e5/a1ada387181cd9c76832db0f84db58b2d8bd7437d9a899e1e8ac1b583a13/click-man-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "3ae989cc8565b6d24ec59db00550e605", "sha256": "30f34f58d74870b196f1dea366084a837d951c53f6580a54446916a110af88f5" }, "downloads": -1, "filename": "click-man-0.2.2.tar.gz", "has_sig": false, "md5_digest": "3ae989cc8565b6d24ec59db00550e605", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7270, "upload_time": "2017-12-31T10:51:46", "url": "https://files.pythonhosted.org/packages/87/69/295986320010b09059e0e8b65b819ef7762729b8d8a4f127e586cec0b74e/click-man-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "1dbe89ccfdf247b022851f8ee1c6acd1", "sha256": "23fe3d29db6e548f18a91200cf1a35e03d6af01f6911a34b72e8c9c626169f13" }, "downloads": -1, "filename": "click_man-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1dbe89ccfdf247b022851f8ee1c6acd1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10724, "upload_time": "2019-01-24T17:19:16", "url": "https://files.pythonhosted.org/packages/b4/11/3e965e5cc551a84fecb9bd3612c76457d791139b0491776e765248cd4924/click_man-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1d0de939c9bee7326653eb61aa947d36", "sha256": "9cc88073973e1430dfb8d842965f0acfab0101d4c22ff9702f8129ad2f71fcd3" }, "downloads": -1, "filename": "click-man-0.3.0.tar.gz", "has_sig": false, "md5_digest": "1d0de939c9bee7326653eb61aa947d36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8218, "upload_time": "2019-01-24T17:19:18", "url": "https://files.pythonhosted.org/packages/25/05/f878c8adce3b5d3f22e8201631bd1e0ec85544242105ed819f04830387c3/click-man-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1dbe89ccfdf247b022851f8ee1c6acd1", "sha256": "23fe3d29db6e548f18a91200cf1a35e03d6af01f6911a34b72e8c9c626169f13" }, "downloads": -1, "filename": "click_man-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1dbe89ccfdf247b022851f8ee1c6acd1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10724, "upload_time": "2019-01-24T17:19:16", "url": "https://files.pythonhosted.org/packages/b4/11/3e965e5cc551a84fecb9bd3612c76457d791139b0491776e765248cd4924/click_man-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1d0de939c9bee7326653eb61aa947d36", "sha256": "9cc88073973e1430dfb8d842965f0acfab0101d4c22ff9702f8129ad2f71fcd3" }, "downloads": -1, "filename": "click-man-0.3.0.tar.gz", "has_sig": false, "md5_digest": "1d0de939c9bee7326653eb61aa947d36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8218, "upload_time": "2019-01-24T17:19:18", "url": "https://files.pythonhosted.org/packages/25/05/f878c8adce3b5d3f22e8201631bd1e0ec85544242105ed819f04830387c3/click-man-0.3.0.tar.gz" } ] }