{ "info": { "author": "Alice Butcher", "author_email": "alycejenni@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "# Ernest\n\n## What Ernest is\n1. A CLI-based tool for making bulk changes to files via Python, partly achieved through syntax trees (for .py files, using [redbaron](https://github.com/PyCQA/redbaron)) and partly through regular expressions.\n2. Useful if you're making a load of really boring changes that you can't really do with regexes alone (or only with regexes the length of War and Peace).\n2. Named after the [Nitpicker](http://theadventurezone.wikia.com/wiki/Nitpicker) from The Adventure Zone.\n\nIt was made as part of a refactoring effort for a specific project and as such is pretty limited at the moment - it currently only contains methods for refactoring Python files but it is intended to be extensible.\n\n## What Ernest isn't\n1. A tool that will fix all your syntax problems. \n2. Pulling from any set of code standards - any new refactorings have to defined _manually_ (though you can pick and choose which ones to apply).\n3. Particularly reliable.\n\n## Installation\n\n```sh\npip install ernest\n```\n\n## Configuration\nYou can override the defaults by making a JSON config file. By default Ernest looks in `~/.config/ernest/ernest.json` but you can specify a different json file using the `--config` option.\n\n```json\n{\n \"name\": \"\", // the name of the project - used in headers\n \"header\": [ // added at the top of python files\n \"#!/usr/bin/env python\",\n \"# encoding: utf-8\",\n \"This file is part of the {} project\", // example of how the name is used\n \"\"\n ],\n \"imports\": { // checks python imports\n \"exclude\": [], // do not allow these ever\n \"conditional_exclude\": {}, // do not allow these submodules from the main module, e.g. {'ernest': 'models'} excludes 'ernest.models' but allows 'ernest.helpers'\n \"conditional_include\": {} // allow only these submodules from the main module, e.g. {'ernest': 'models'} allows 'ernest.models' but not 'ernest.helpers'\n }\n}\n```\n\nYou can find an example of the config file in the [data](data/ernest.json) folder.\n\n## Usage\n### Quickstart\n```bash\nernest /project/path fix py\n```\n\n### General Options\n```sh\n--config /path/to/config\n--name \"My Project\"\n```\n\n### Subcommands\n#### `stats`\n```bash\nernest [--config /path/to/config] [--name \"My Project\"] [/path/to/dir] stats [filetypes]\n```\n\nShow statistics for all files:\n```bash\nernest /path/to/dir stats\n```\n\nStats for just (e.g.) `txt` and `md` files:\n```bash\nernest /path/to/dir stats txt md\n```\n\n#### `fix`\n```bash\nernest [--config /path/to/config] [--name \"My Project\"] [/path/to/dir] fix [filetype] [fix(es)]\n```\n\nRun all fixes for `.py` files:\n```bash\nernest /path/to/dir fix py all\n```\n\nRun the _literal string quote_ and _docstring quote_ fixes for `.py` files:\n```bash\nernest /path/to/dir fix py literal docstring\n```\n\n## Contributing\nPlease feel free to fork, submit pull requests, etc.! It doesn't have to be limited to Python files - that's just how Ernest processes the text.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/alycejenni/ernest", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ernest", "package_url": "https://pypi.org/project/ernest/", "platform": "", "project_url": "https://pypi.org/project/ernest/", "project_urls": { "Homepage": "https://github.com/alycejenni/ernest" }, "release_url": "https://pypi.org/project/ernest/0.1.6/", "requires_dist": [ "click", "redbaron" ], "requires_python": "", "summary": "A CLI-based tool for making bulk changes to file text.", "version": "0.1.6" }, "last_serial": 5154637, "releases": { "0.1.4": [ { "comment_text": "", "digests": { "md5": "7705c0ea2118f72faf107ec64991eba8", "sha256": "29c63d0c482902c163c8acf3aa1783b36edfcc14f600fba7e1a9cf0557c8793a" }, "downloads": -1, "filename": "ernest-0.1.4-py2-none-any.whl", "has_sig": false, "md5_digest": "7705c0ea2118f72faf107ec64991eba8", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 13551, "upload_time": "2019-04-17T10:33:21", "url": "https://files.pythonhosted.org/packages/c4/dc/f1d6734415424bb157b8eee80727be5c8fc3253bf5620cce54897473b4ba/ernest-0.1.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dfb31a617d9202b7ae0499ebda1a0f3d", "sha256": "4e91e61d1e8e3eb18fa59e405262f74ae68eddf54279c02898858bd9c772589c" }, "downloads": -1, "filename": "ernest-0.1.4-py3.7.egg", "has_sig": false, "md5_digest": "dfb31a617d9202b7ae0499ebda1a0f3d", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 9791, "upload_time": "2018-11-08T11:47:20", "url": "https://files.pythonhosted.org/packages/20/87/c2d4d1e03eeaeb8dd864c3db451819db1391ae89a23d2d9193ca888ff8a9/ernest-0.1.4-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "286459c96b7e909d5d87808ceb49d72e", "sha256": "5c5232273953246cbe4d52df281855e56427ca0380d007752d3846444caa7a51" }, "downloads": -1, "filename": "ernest-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "286459c96b7e909d5d87808ceb49d72e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11210, "upload_time": "2018-11-08T11:47:18", "url": "https://files.pythonhosted.org/packages/9e/88/d37746b9e547f4c6a74461430d816ab66272d041cb33e4db46312eaba160/ernest-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1dd5a4c0c8cf17949247f9552aada78", "sha256": "0906c604cae0bf86c1cbea171e188b10728f727ff964ded21cead20bd823b9e8" }, "downloads": -1, "filename": "ernest-0.1.4.tar.gz", "has_sig": false, "md5_digest": "b1dd5a4c0c8cf17949247f9552aada78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7788, "upload_time": "2018-11-08T11:47:21", "url": "https://files.pythonhosted.org/packages/0e/fb/00fe95341b7b255bb22480088918d32cceedcc82338ecf98e6f019d98868/ernest-0.1.4.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "8bba8aa0adcdd3dec9e524bb0d5b8732", "sha256": "ee3c768788a2f5bac50ff662be56ad199a42a52676e1c33a164b4ca390f02e94" }, "downloads": -1, "filename": "ernest-0.1.6-py2.7.egg", "has_sig": false, "md5_digest": "8bba8aa0adcdd3dec9e524bb0d5b8732", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 11915, "upload_time": "2019-04-17T10:53:47", "url": "https://files.pythonhosted.org/packages/7a/42/f02feac615ee4a90322c973e8ec6757f48b4df7e444b0e80312e51979763/ernest-0.1.6-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "77e7a6566debd95f677438642c528dd5", "sha256": "958a09fcb19b12967e4e7e1883dd5487198a33d0d56e2d4f76c5a43d935de6c1" }, "downloads": -1, "filename": "ernest-0.1.6-py2-none-any.whl", "has_sig": false, "md5_digest": "77e7a6566debd95f677438642c528dd5", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 13467, "upload_time": "2019-04-17T10:53:45", "url": "https://files.pythonhosted.org/packages/3b/0e/c8da4c93aff85b83a64c69f81fc8f328c9981b9fe7af7a3f21a7a2ae0bbc/ernest-0.1.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a9cf4350aba25a96079d5a08c3379ab9", "sha256": "5923d02e6073d331194c9d51e3d3b08b1e4ba68946609c343f9918eef954d7d3" }, "downloads": -1, "filename": "ernest-0.1.6-py3.7.egg", "has_sig": false, "md5_digest": "a9cf4350aba25a96079d5a08c3379ab9", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 11915, "upload_time": "2019-04-17T10:53:49", "url": "https://files.pythonhosted.org/packages/ff/9f/e775ae87e9d822c8c4e73d6cb174e5598103e9ee3c4484493cf4457b265e/ernest-0.1.6-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "a83186d269b1c82aff68e940b29ed070", "sha256": "c3e5e6ae791b54f1404ca62fb6f080cdd7bf2a122aaf5be844c70f5acc7c04b3" }, "downloads": -1, "filename": "ernest-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "a83186d269b1c82aff68e940b29ed070", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13467, "upload_time": "2019-04-17T10:53:46", "url": "https://files.pythonhosted.org/packages/71/1b/957d4f26ca61e819d6071271c06c8503071127a5d43615ff494f8e256ec6/ernest-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "20bf8b41e5b3d5443d3986fcc292204d", "sha256": "53bef7a42d6c1ccfe0b746ddff84cc5c7505e54148da6f67756217445169a443" }, "downloads": -1, "filename": "ernest-0.1.6.tar.gz", "has_sig": false, "md5_digest": "20bf8b41e5b3d5443d3986fcc292204d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7829, "upload_time": "2019-04-17T10:53:50", "url": "https://files.pythonhosted.org/packages/f0/f1/461b4295421d2c52ca1de134b697024e7a74e359157e9a1a1cec9ae57073/ernest-0.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8bba8aa0adcdd3dec9e524bb0d5b8732", "sha256": "ee3c768788a2f5bac50ff662be56ad199a42a52676e1c33a164b4ca390f02e94" }, "downloads": -1, "filename": "ernest-0.1.6-py2.7.egg", "has_sig": false, "md5_digest": "8bba8aa0adcdd3dec9e524bb0d5b8732", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 11915, "upload_time": "2019-04-17T10:53:47", "url": "https://files.pythonhosted.org/packages/7a/42/f02feac615ee4a90322c973e8ec6757f48b4df7e444b0e80312e51979763/ernest-0.1.6-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "77e7a6566debd95f677438642c528dd5", "sha256": "958a09fcb19b12967e4e7e1883dd5487198a33d0d56e2d4f76c5a43d935de6c1" }, "downloads": -1, "filename": "ernest-0.1.6-py2-none-any.whl", "has_sig": false, "md5_digest": "77e7a6566debd95f677438642c528dd5", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 13467, "upload_time": "2019-04-17T10:53:45", "url": "https://files.pythonhosted.org/packages/3b/0e/c8da4c93aff85b83a64c69f81fc8f328c9981b9fe7af7a3f21a7a2ae0bbc/ernest-0.1.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a9cf4350aba25a96079d5a08c3379ab9", "sha256": "5923d02e6073d331194c9d51e3d3b08b1e4ba68946609c343f9918eef954d7d3" }, "downloads": -1, "filename": "ernest-0.1.6-py3.7.egg", "has_sig": false, "md5_digest": "a9cf4350aba25a96079d5a08c3379ab9", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 11915, "upload_time": "2019-04-17T10:53:49", "url": "https://files.pythonhosted.org/packages/ff/9f/e775ae87e9d822c8c4e73d6cb174e5598103e9ee3c4484493cf4457b265e/ernest-0.1.6-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "a83186d269b1c82aff68e940b29ed070", "sha256": "c3e5e6ae791b54f1404ca62fb6f080cdd7bf2a122aaf5be844c70f5acc7c04b3" }, "downloads": -1, "filename": "ernest-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "a83186d269b1c82aff68e940b29ed070", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13467, "upload_time": "2019-04-17T10:53:46", "url": "https://files.pythonhosted.org/packages/71/1b/957d4f26ca61e819d6071271c06c8503071127a5d43615ff494f8e256ec6/ernest-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "20bf8b41e5b3d5443d3986fcc292204d", "sha256": "53bef7a42d6c1ccfe0b746ddff84cc5c7505e54148da6f67756217445169a443" }, "downloads": -1, "filename": "ernest-0.1.6.tar.gz", "has_sig": false, "md5_digest": "20bf8b41e5b3d5443d3986fcc292204d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7829, "upload_time": "2019-04-17T10:53:50", "url": "https://files.pythonhosted.org/packages/f0/f1/461b4295421d2c52ca1de134b697024e7a74e359157e9a1a1cec9ae57073/ernest-0.1.6.tar.gz" } ] }