{ "info": { "author": "Alexander Groden", "author_email": "alexander.groden@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Build Tools", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# python-minimizer\nMinimizes Python code using Python's lexical scanning tokenize module.\n## Command-line usage\nCurrently python-minimizer supports the following options:\n```sh\nusage: minimizer.py [-h] [-o OUT_PATH] [-b] [-c] [-d] [-s]\n [-w WHITESPACE_CHAR] [-i INDENT_CHAR] [-r] [-v]\n in_path\n\nMinimizes Python code using Python's lexical scanning tokenize module.\n\npositional arguments:\n in_path The file to minimize\n\noptional arguments:\n -h, --help show this help message and exit\n -o OUT_PATH, --out-path OUT_PATH\n When specified, minimizer will output to the path\n instead of stdout\n -b, --keep-blank-lines\n When set, minimizer will not remove blank lines.\n -c, --keep-comments When set, minimizer will not remove comment lines and\n inline comments\n -d, --keep-docstrings\n When set, minimizer will not remove docstrings\n -s, --keep-whitespace\n When set, minimizer will not remove extraneous\n whitespace\n -w WHITESPACE_CHAR, --whitespace-char WHITESPACE_CHAR\n Set the whitespace character to use. Defaults to space\n (\" \")\n -i INDENT_CHAR, --indent-char INDENT_CHAR\n Set the indentation character to use. Defaults to tab\n (\"\\t\")\n -r, --recursive Treat the in-path and --out-path as directories to\n minimize recursively\n -v, --verbose Explain what we are doing as we do it, higher levels\n are useful for debugging\n\nBy default, the minimizer removes blank lines, comments, docstrings, and\nextraneous whitespace. Where needed, it will insert a space (\" \") for\nwhitespace between operators and use a tab (\"\\t\") for indentation. Use the\ncommand line switches to change any of the defaults.\n```\n## Library usage\nOf course, you can also import the minimizer module and use it as follows:\n```python\nfrom minimizer import minimize\nwith open(code_file, 'r') as f:\n code = f.read()\nminimized_code = minimize(code)\nwith open(minimized_file, 'w') as f:\n f.write(minimized_code)\n```\nBy default, the ```minimize``` function will remove blank lines, comments, docstrings, and whitespace between operators and uses a space (\" \") for the whitespace character and a tab (\"\\t\") for the indent character, but accepts keyword arguments to change these options.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/agroden/python-minimizer", "keywords": "minimization minification minimize minify mit-license", "license": "", "maintainer": "", "maintainer_email": "", "name": "python-minimizer", "package_url": "https://pypi.org/project/python-minimizer/", "platform": "", "project_url": "https://pypi.org/project/python-minimizer/", "project_urls": { "Homepage": "https://github.com/agroden/python-minimizer" }, "release_url": "https://pypi.org/project/python-minimizer/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "Minimizes Python code using Python's lexical scanning tokenize module.", "version": "1.0.2" }, "last_serial": 3492696, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "c03c9b543a7037708420263682a434d0", "sha256": "0a4cfccfff0b57625b29705cef6c720d4152e396fee0eabb7e351d5438e76e74" }, "downloads": -1, "filename": "python-minimizer-1.0.1.tar.gz", "has_sig": false, "md5_digest": "c03c9b543a7037708420263682a434d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6070, "upload_time": "2017-12-29T05:07:59", "url": "https://files.pythonhosted.org/packages/29/60/2c3280ee4965d75b21ca4c673ac098194b0a7d2cf714ad56dcc53bf9a0f2/python-minimizer-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "5ebb32af6bf2207171b98ea937f07233", "sha256": "b7c4fb7766acd4962fb492c6db9910802e5c8216d6f6df2ca38d8eeb5028e1cd" }, "downloads": -1, "filename": "python-minimizer-1.0.2.tar.gz", "has_sig": false, "md5_digest": "5ebb32af6bf2207171b98ea937f07233", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5265, "upload_time": "2018-01-16T03:08:24", "url": "https://files.pythonhosted.org/packages/0c/38/727a7bbef52734a45719a5ee6bb39a36bb1f6f83d26118f7ded40f615915/python-minimizer-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5ebb32af6bf2207171b98ea937f07233", "sha256": "b7c4fb7766acd4962fb492c6db9910802e5c8216d6f6df2ca38d8eeb5028e1cd" }, "downloads": -1, "filename": "python-minimizer-1.0.2.tar.gz", "has_sig": false, "md5_digest": "5ebb32af6bf2207171b98ea937f07233", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5265, "upload_time": "2018-01-16T03:08:24", "url": "https://files.pythonhosted.org/packages/0c/38/727a7bbef52734a45719a5ee6bb39a36bb1f6f83d26118f7ded40f615915/python-minimizer-1.0.2.tar.gz" } ] }