{ "info": { "author": "Daniel J. R. May", "author_email": "daniel.may@danieljrmay.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# pyinilint\nThe `pyinilint` command line utility allows you to lint (check the\nsyntax) of [INI](https://en.wikipedia.org/wiki/INI_file)-like\nconfiguration files. Here\u2019s an example of the simplest possible\nuseage.\n\n```console\n$ pyinilint myfile.ini\n```\n\nSilent output, and a `0` exit status means that `myfile.ini` has been\nparsed successfully.\n\nThe `pyinilint` utility is a front-end to the Python\n[configparser](https://docs.python.org/3/library/configparser.html)\nmodule, which supports interpolation. This means you can have\n\"variables\" in your INI-files which can be optionally replaced with\nvalues, which can be defined within the same, or different,\nINI-file. Using different pyinilint command line switches you can\ninspect what is happening with variable interpolation in your INI-files.\n\n\n## Installation\n\n### Copr\n\nIf you use Fedora then you can install `pyinilint` via a [Copr\nrespository](https://copr.fedorainfracloud.org/coprs/danieljrmay/pyinilint/).\n\n```console\n$ dnf copr enable danieljrmay/pyinilint \n$ dnf install pyinilint \n```\n\nThe installed RPMs include a man page and Bash completion script.\n\n\n### PyPI\n\nYou can get a distribution of [`pyinilint` from\nPyPI](https://pypi.org/project/pyinilint/).\n\n```console\n$ pip install pyinilint\n```\n\nHowever, this distribution currently does not include the man page or\nBash completion script.\n\n\n### Source Code Release\n\nYou can download a source code release from the [`pyinilint` project\u2019s\nGitLab releases](https://gitlab.com/danieljrmay/pyinilint/releases)\npage. You can then install with something like the following:\n\n```console\n$ tar -xzf pyinilint-0.10.tar.gz\n$ cd pyinilint-0.10\n$ make\n$ make pybuild\n$ sudo make install\n$ sudo make pyinstall\n```\n\nThe `make` and `sudo make install` builds and installs the man page\nand Bash completion script. The `make pybuild` and `sudo make\npyinstall` builds and installs the Python module and console script.\n\n\n## Usage\n\n```console\n$ pyinilint --help\nusage: pyinilint [-h] [-b] [-d] [-e ENCODING] [-m] [-o] [-r] [-s] [-v]\n paths [paths ...]\n\npyinilint (version 0.10) is a linter and inspector for INI format files.\n\npositional arguments:\n paths paths of the file(s) to check\n\noptional arguments:\n -h, --help show this help message and exit\n -b, --basic use basic interpolation, the default is extended\n -d, --debug show debugging messages\n -e ENCODING, --encoding ENCODING\n set the encoding to be used, omit to use the default\n -i, --interpolate interpolate the parsed configuration without output\n -m, --merge merge files into a single configuration\n -o, --output output the parsed configuration to stdout\n -r, --raw output raw, do not interpolate\n -s, --serialize output the interpolated and serialized configuration\n to stdout\n -v, --verbose show verbose messages\n\nSee https://github.com/danieljrmay/pyinilint for more information.\n```\n\n### Options\n\n#### `-b`, `--basic`\nUse basic interpolation when parsing. See the Python configparser\ninterpolation documentation below for more information.\n\n#### `-d`, `--debug`\nOutput debugging messages, probably only of interest to those\ndeveloping pyinilint.\n\n#### `-e ENCODING`, `--encoding ENCODING`\nSpecifiy a non-default encoding to use when parsing the files to be\nchecked.\n\n#### `h`, `--help`\nDisplay help and version information.\n\n#### `i`, `--interpolate`\nInterpolate the parsed configuration but do not output anything. This\nis useful for detecting warnings and errors in the interpolation\nsyntax or values.\n\n#### `-m`, `--merge`\nRead all the specified `file`s into a single Python `ConfigParser`\nobject; this allows interpolation between files. When this option is\nnot specified each file is read into its own seperate `ConfigParser`\nobject.\n\n#### `-o`, `--output`\nOutput the parsed configuration to `STDOUT` without any\ninterpolation. Use the `--serialize` options to enable interpolation.\n\n#### `-r`, `--raw`\nUse raw mode, so there is no interpolation when parsing. See the\nPython configparser interpolation documentation below for more\ninformation.\n\n#### `-s`, `--serialize` \nOutput the parsed, interpolated and serialized configuration to\n`STDOUT`. Use this together with the `--basic`, `--merge` and `--raw`\noptions to inspect the interpolation of \"variables\" within you\nINI-files.\n\n#### `-v`, `--verbose`\nPrint verbose messages.\n\n\n### Exit status\nThis is the list of exit status codes and their meanings returned to the shell by `pyinilint`.\n\n| Exit Status | Name | Meaning |\n| :----------: | -------------------------------- | ------------------------------------------------------------------------------------- |\n| 0 | EXIT_OK | Everything went well, all files linted successfully. |\n| 1 | EXIT_NON_EXISTANT_FILE | At least one of the specified files does not exist. |\n| 2 | EXIT_SYNTAX_ERROR | There was an error in the command line syntax. |\n| 3 | EXIT_UNREADABLE_FILE | At least one of the specified files existed but was not readable. |\n| 4 | EXIT_DUPLICATE_SECTION | There is a duplicate section in the parsed configuration. |\n| 5 | EXIT_DUPLICATE_OPTION | There is a duplicate option in the parsed configuration. |\n| 6 | EXIT_INTERPOLATION_MISSING_OPTION | There is no corresponding option to a given interpolation key in the configuration. |\n| 7 | EXIT_INTERPOLATION_DEPTH | Maximum recursion depth has been exceeded in interpolation. |\n| 8 | EXIT_MISSING_SECTION_HEADER | There is a missing section header in a file. |\n| 9 | EXIT_PARSING_ERROR | Usually some kind of syntax error within a parsed file. |\n| 10 | EXIT_UNKNOWN_ERROR | A catch-all for some other kind of error, inspect the error message for more details. |\n\n\n### Examples\n\n#### Check a single file\n```console\n$ pyinilint myfile.ini\n```\nA silent response (with exit status of 0) means that `myfile.ini` has\npassed the lint check.\n\n#### Check multiple individual files\n```console\n$ pyinilint -v myfile1.ini myfile2.ini\n```\nCheck multiple files treating each one individually and output verbose\nmessages.\n\n#### Check multiple files in a collection, and output the serialized results\n```console\n$ pyinilint -m -s myfile1.ini myfile2.ini\n```\nCheck multiple files as part of a single `ConfigParser` object,\nand output the parsed and interpolated values.\n\n#### Check a file with a custom encoding\n```console\n$ pyinilint -e iso8859_15 myfile.ini\n```\nCheck `myfile.ini` using iso8859_15 encoding.\n\n\n### Caution \n\nIf your INI-files are ultimatly going to be parsed by an INI-parser\ndifferent from `ConfigParser` then you should be aware that there can\nbe subtle differences in INI-file format between parsers. However, it\nshould still spot most howling errors!\n\n\n## Contact\n\nPlease get in contact via the [`pyinilint` project\u2019s GitLab\nwebsite](https://gitlab.com/danieljrmay/pyinilint) to:\n\n* [Report issues](https://gitlab.com/danieljrmay/pyinilint/issues) or make feature requests.\n* Clone or fork the Git source code tree.\n* Say \u201chello!\u201d \ud83d\ude09\n\n\n## References\n* Python [configparser interpolation documentation](https://docs.python.org/3/library/configparser.html#interpolation-of-values)\n* The [pyinilint project website](https://gitlab.com/danieljrmay/pyinilint)", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/danieljrmay/pyinilint", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pyinilint", "package_url": "https://pypi.org/project/pyinilint/", "platform": "", "project_url": "https://pypi.org/project/pyinilint/", "project_urls": { "Homepage": "https://gitlab.com/danieljrmay/pyinilint" }, "release_url": "https://pypi.org/project/pyinilint/0.11/", "requires_dist": null, "requires_python": "", "summary": "A linter and inspector for INI format files", "version": "0.11" }, "last_serial": 4930691, "releases": { "0.10": [ { "comment_text": "", "digests": { "md5": "796d07df813812d46012df12c5c7961e", "sha256": "072ffd01f1ef258049150442af2cbae1d40bfa1c184f19f6050d43825c05372b" }, "downloads": -1, "filename": "pyinilint-0.10.tar.gz", "has_sig": false, "md5_digest": "796d07df813812d46012df12c5c7961e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20040, "upload_time": "2019-01-23T19:57:04", "url": "https://files.pythonhosted.org/packages/26/37/5d75528679a2996a280bdbaf447fadc9f53ca8efe424f3aa72173ee82280/pyinilint-0.10.tar.gz" } ], "0.11": [ { "comment_text": "", "digests": { "md5": "300ca647831d3ce7a899356008e32ee6", "sha256": "20c39c211ddcc1b323e182e96853101603463d77227594ddc0c8a88bce658208" }, "downloads": -1, "filename": "pyinilint-0.11.tar.gz", "has_sig": false, "md5_digest": "300ca647831d3ce7a899356008e32ee6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23101, "upload_time": "2019-03-12T15:40:54", "url": "https://files.pythonhosted.org/packages/4f/12/d0c6316bb4862a115b3f4e631ce6efcd46d1cc918a4783b9e0adb43edab6/pyinilint-0.11.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "2ac6f9eb57a2bfee394d5e64bf42c387", "sha256": "88878eb18bee400c3b33d49dfc89aed3519cfde9d43f775067a119e7a15447f9" }, "downloads": -1, "filename": "pyinilint-0.9.tar.gz", "has_sig": false, "md5_digest": "2ac6f9eb57a2bfee394d5e64bf42c387", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19267, "upload_time": "2019-01-23T16:38:08", "url": "https://files.pythonhosted.org/packages/9f/b9/02188c202566c7f391c1925f4913838d43eb6fb96b6add8c9acadf31c571/pyinilint-0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "300ca647831d3ce7a899356008e32ee6", "sha256": "20c39c211ddcc1b323e182e96853101603463d77227594ddc0c8a88bce658208" }, "downloads": -1, "filename": "pyinilint-0.11.tar.gz", "has_sig": false, "md5_digest": "300ca647831d3ce7a899356008e32ee6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23101, "upload_time": "2019-03-12T15:40:54", "url": "https://files.pythonhosted.org/packages/4f/12/d0c6316bb4862a115b3f4e631ce6efcd46d1cc918a4783b9e0adb43edab6/pyinilint-0.11.tar.gz" } ] }