{ "info": { "author": "J.P. Weiser", "author_email": "jon@jpweiser.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: POSIX", "Operating System :: POSIX :: BSD :: BSD/OS", "Operating System :: POSIX :: BSD :: FreeBSD", "Operating System :: POSIX :: Linux", "Operating System :: POSIX :: Other", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: Text Editors", "Topic :: Text Editors :: Documentation", "Topic :: Text Editors :: Text Processing", "Topic :: Text Processing :: Filters", "Topic :: Text Processing :: General", "Topic :: Utilities" ], "description": "cuts\r\n====\r\n\r\nAbout\r\n-----\r\n\r\nUtility for cutting out portions of each line of a file, and rearranging\r\nthe remaining contents as desired.\r\n\r\nBased on the Unix utility \u2018cut.\u2019 The goal is to enhance the capabilities\r\nof cut to allow rearranging, negative indexing, flexible delimiting\r\noutput, and proper handling of multiple instances of input delimiters.\r\n\r\nInstallation\r\n------------\r\n\r\n::\r\n\r\n pip install cuts\r\n\r\nUsage\r\n-----\r\n\r\nusage: cuts [-h] [-b BYTES] [-c CHARS] [-f FIELDS] [-d DELIMITER] [-e]\r\n[-s][-S SEPARATOR] [file [file \u2026]]\r\n\r\nRemove and/or rearrange sections from each line of a file(s).\r\n\r\npositional arguments:\r\n\r\nfile File(s) to cut\r\n\r\noptional arguments:\r\n\r\n-h, \u2013help show this help message and exit\r\n\r\n-b BYTES, \u2013bytes BYTES Bytes to select\r\n\r\n-c CHARS, \u2013chars CHARS Character to select\r\n\r\n-f FIELDS, \u2013fields FIELDS Fields to select\r\n\r\n-d DELIMITER, \u2013delimiter DELIMITER Sets field delimiter(default is TAB)\r\n\r\n-e, \u2013regex Enable regular expressions to be used as input delimiter\r\n\r\n-s, \u2013skip Skip lines that do not contain input delimiter.\r\n\r\n-S SEPARATOR, \u2013separator SEPARATOR Sets field separator for output.\r\n\r\nList Specification\r\n------------------\r\n\r\nEach of the arguments -b,-c, and -f expect a list of positions as an\r\nargument. This list should be comma delimited, and allows for negative\r\nindexing.\r\n\r\nAdditionally, the list may include ascii characters. If included, these\r\ncharacters will override the output delimiter with that character.\r\n\r\nRanges are permitted in the list, using a colon as below\r\n\r\nN:M All input positions from N to M\r\n\r\nN: All input positions from N to end of line\r\n\r\n:M All input positions from beginning of line to M\r\n\r\nPosition counting starts from one.\r\n\r\nFiles\r\n-----\r\n\r\nEach line of an arbitrary number of files may be optionally cut by\r\nnaming them each after all other parameters are set. The file names\r\nshould be separated by a space.\r\n\r\nIf no files are specified, or a \u2018-\u2019 is used, STDIN is used.\r\n\r\nBytes\r\n-----\r\n\r\n(-b,\u2013bytes)=LIST\r\n\r\nCuts input by byte, as specified by LIST.\r\n\r\nCharacters\r\n----------\r\n\r\nCuts input by character, as specified by LIST.\r\n\r\nFields\r\n------\r\n\r\n(-f,\u2013fields)=LIST\r\n\r\nCuts input into fields separated by the input delimiter.\r\n\r\nExample:\r\n\r\n::\r\n\r\n Input:\r\n echo \"this is just a test\" | cuts -f 1,X,3:5 -d \" \" -S \".\"\r\n Output:\r\n thisXjust.a.test\r\n\r\nDelimiter\r\n---------\r\n\r\n(-d,\u2013delimiter)=DELIM\r\n\r\nSpecifies input delimiter for fields option. Default is tab character\r\n(\u2018:raw-latex:`\\t`\u2019).\r\n\r\nIf the option -e is set, the delimiter will accept regular expressions,\r\nallowing for multiple delimiters.\r\n\r\nSeparator\r\n---------\r\n\r\n(-S,\u2013separator)=SEPARATOR\r\n\r\nSpecifies output delimiter. Will be overridden by ascii character in\r\nposition list.\r\n\r\nSee also\r\n--------\r\n\r\ncut(1)\r\n\r\nDevelopment notes\r\n-----------------\r\n\r\nProject is still under development. Any questions or comments, please\r\nemail jon@jpweiser.com", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/jpweiser/cuts/tarball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jpweiser/cuts", "keywords": "", "license": "UNKNOWN", "maintainer": "", "maintainer_email": "", "name": "cuts", "package_url": "https://pypi.org/project/cuts/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/cuts/", "project_urls": { "Download": "https://github.com/jpweiser/cuts/tarball/master", "Homepage": "https://github.com/jpweiser/cuts" }, "release_url": "https://pypi.org/project/cuts/0.37.7/", "requires_dist": null, "requires_python": null, "summary": "Remove and/or rearrange sections from each line of a file(s).", "version": "0.37.7" }, "last_serial": 1650870, "releases": { "0.37.1": [ { "comment_text": "", "digests": { "md5": "d541966d2ab5c08653bbc19fb72eb9d4", "sha256": "29f6f01b8be38efb62e43a0840e623d397e35694189a968a8d8c492acd9c114f" }, "downloads": -1, "filename": "cuts-0.37.1.tar.gz", "has_sig": false, "md5_digest": "d541966d2ab5c08653bbc19fb72eb9d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4299, "upload_time": "2015-07-14T02:57:40", "url": "https://files.pythonhosted.org/packages/e7/74/616ded56ef8f51aa2f0a5cb2bcd6627639a1e913d6b2b9e09b9d32189aca/cuts-0.37.1.tar.gz" } ], "0.37.2": [ { "comment_text": "", "digests": { "md5": "1c40e0537c58f1a3453e59d38d80407e", "sha256": "5ad34ade020fbf440c571625d2394a74239fe921a6bcb2725712785a6a8068a3" }, "downloads": -1, "filename": "cuts-0.37.2.tar.gz", "has_sig": false, "md5_digest": "1c40e0537c58f1a3453e59d38d80407e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4316, "upload_time": "2015-07-15T00:48:22", "url": "https://files.pythonhosted.org/packages/04/5a/f31c3ce9be624cee557fa3846f5d183b37e46dfc60145b20bbd3f5012aa9/cuts-0.37.2.tar.gz" } ], "0.37.5": [ { "comment_text": "", "digests": { "md5": "611665260b859306116ff3f840d385c6", "sha256": "e24a52cff4cca41d1f841bb3ffd1fece2129d7b03df09387b080412a22b98a12" }, "downloads": -1, "filename": "cuts-0.37.5.tar.gz", "has_sig": false, "md5_digest": "611665260b859306116ff3f840d385c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4792, "upload_time": "2015-07-23T01:22:44", "url": "https://files.pythonhosted.org/packages/04/cb/0dd64b2afc62e3bb0093ff789d4a7129d0d21c2d11f2f0a7c4cfdd92b888/cuts-0.37.5.tar.gz" } ], "0.37.7": [ { "comment_text": "", "digests": { "md5": "0170b28e33609880cc5327118adc4a26", "sha256": "d794bece32e17c0240c2e7c349c50f8c5b06fcb43090d07df91e6ab3d918ae9f" }, "downloads": -1, "filename": "cuts-0.37.7.tar.gz", "has_sig": false, "md5_digest": "0170b28e33609880cc5327118adc4a26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4929, "upload_time": "2015-07-26T21:23:49", "url": "https://files.pythonhosted.org/packages/5c/a6/88610528e00bedf0055323081789360827f6de7b66a6ad170a551841beda/cuts-0.37.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0170b28e33609880cc5327118adc4a26", "sha256": "d794bece32e17c0240c2e7c349c50f8c5b06fcb43090d07df91e6ab3d918ae9f" }, "downloads": -1, "filename": "cuts-0.37.7.tar.gz", "has_sig": false, "md5_digest": "0170b28e33609880cc5327118adc4a26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4929, "upload_time": "2015-07-26T21:23:49", "url": "https://files.pythonhosted.org/packages/5c/a6/88610528e00bedf0055323081789360827f6de7b66a6ad170a551841beda/cuts-0.37.7.tar.gz" } ] }