{ "info": { "author": "Trevor Bramwell", "author_email": "trevor@bramwell.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Text Processing :: Filters" ], "description": "Name\n====\n\n**field** - extract fields from a file\n\nSYNOPSIS\n--------\n\n.. code:: bash\n\n field [-h] [-f FILE] [-d DELIMITER] [FIELD ...]\n\nDESCRIPTION\n-----------\n\n**field** extracts a list of fields from a file. It is a simpler\nversion of::\n\n awk '{ print $5,$3,$1; }'\n\nand similar scripts. Whitespace delimited (space and tab) fields are\nread from stdin and written to stdout.\n\nFIELD is assumed to be 1-indexed integer, separated by commas and/or\nspaces, and take the following form:\n\n N a single field.\n\n N-M a range of increasing or decreasing fields from N to M.\n\n**-h**, **--help**\n show concise list of options and exit\n\n**--version**\n display version information and exit\n\n**-f**, **--file** *FILE*\n an explicit file to extract fields\n\n**-d**, **--delimiter** *DELIMITER*\n character delimiter between fields\n\nNOTES\n-----\n\nField was written to address two short comings of cut:\n\n1. Default Behavior\n\n The default delimiter of cut is tab. Most command line utilities\n produce output delimited by whitespace, which includes spaces.\n Field takes this into account and defaults the delimiter to both\n tab and space characters.\n\n2. Field Ordering\n\n Fields extracted by cut are not listed in the order they are\n passed.\n\nEXAMPLES\n--------\n\n.. code:: bash\n\n $ mount | field 5 3 1\n ext4 / /dev/mapper/sda7_crypt\n proc /proc proc\n sysfs /sys sysfs\n\n.. code:: bash\n\n $ ls -l /usr/local/bin/ | field 1 9\n -rwxr-xr-x airbrake*\n -rwxr-xr-x bayes.rb*\n -rwxr-xr-x bourbon*\n\n.. code:: bash\n\n $ cat /etc/mtab | cut -d' ' -f 4 | field -d',' 1 4 3 2\n rw gid=5 nosuid noexec\n rw size=10% nosuid noexec\n rw nodev nosuid noexec\n rw user=root nodev nosuid\n\nAUTHOR\n------\n\nWritten by Trevor Bramwell.\n\nCOPYRIGHT\n---------\n\nCopyright (C) 2015 Trevor Bramwell License GPLv3+: GNU GPL version 3 or\nlater .\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\nCHANGELOG\n=========\n\n0.2.0\n-----\n\n* field arguments can be now be listed as either a single field, or an\n increasing or decreasing range.\n\n* Manpage included with package.\n\n* Added ``-v, --version`` option for displaying version and license\n information.\n\n* Changed ``-h, --help`` option to display better usage and include\n license.\n\n\n0.1.0\n-----\n\n* Initial Release\n\n* fields can be extracted from stdin or explicit files.\n\n* Added ``-f, --file``, ``-d, --delimiter``, and ``-h, --help`` options.", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bramwelt/field", "keywords": null, "license": "GPLv3+", "maintainer": null, "maintainer_email": null, "name": "field", "package_url": "https://pypi.org/project/field/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/field/", "project_urls": { "Homepage": "https://github.com/bramwelt/field" }, "release_url": "https://pypi.org/project/field/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Extact fields from a file", "version": "0.2.0" }, "last_serial": 1495129, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "531bfdf2c45e846c6138d3a7f22ab298", "sha256": "f96f7a3a6e0c07fba0367121a5a5b8052e2200ede61101dda07a91a33e005694" }, "downloads": -1, "filename": "field-0.1.0.linux-x86_64.tar.gz", "has_sig": true, "md5_digest": "531bfdf2c45e846c6138d3a7f22ab298", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3569, "upload_time": "2015-02-23T20:58:23", "url": "https://files.pythonhosted.org/packages/56/01/76976f7c00d6cb512903789aa49821af9fc0392c3df704595efec0e3e7f3/field-0.1.0.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "ec2fc9f7f25975c4c5f90705c9bf5a0b", "sha256": "74d71fc4ef588cb8561fe633dc604cd510ad450bf259dffad209d9692b9fff3b" }, "downloads": -1, "filename": "field-0.1.0-py2-none-any.whl", "has_sig": true, "md5_digest": "ec2fc9f7f25975c4c5f90705c9bf5a0b", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4843, "upload_time": "2015-02-23T20:58:26", "url": "https://files.pythonhosted.org/packages/04/aa/fd46c524f7bd7766097f5eecfef2d94d3dcbcdd3bb08c64d4ecfa881d854/field-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "738d1af33dfca88beed51d9b4903033c", "sha256": "7b2239d1563a7feb10d732d9f0978d9eac751e1d271c58bcf82d59598ea000a5" }, "downloads": -1, "filename": "field-0.1.0.tar.gz", "has_sig": true, "md5_digest": "738d1af33dfca88beed51d9b4903033c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2911, "upload_time": "2015-02-23T20:58:28", "url": "https://files.pythonhosted.org/packages/f9/e0/76f2fd972056c01d5d0a0fc3abd49fede95c1a704b6191021001b97af843/field-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "72d3f4c76c609db3a4fae3bcd6b273c1", "sha256": "537b72e4067a4a013da2aaf9331b1a19d13438e44012e307a1b7bc2a6a0fd455" }, "downloads": -1, "filename": "field-0.2.0-py2-none-any.whl", "has_sig": true, "md5_digest": "72d3f4c76c609db3a4fae3bcd6b273c1", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7866, "upload_time": "2015-04-08T00:08:39", "url": "https://files.pythonhosted.org/packages/1f/54/ba56958f8bb315a39571bd671a20ba42678c64859467aaa465a454606c20/field-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "64eb76b875a128041eb31b625b435616", "sha256": "29394bc076ac37e1b40aa5d9249d8a60056f244bf6167d29cc66ec9d6b7dd182" }, "downloads": -1, "filename": "field-0.2.0.tar.gz", "has_sig": true, "md5_digest": "64eb76b875a128041eb31b625b435616", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18325, "upload_time": "2015-04-08T00:08:42", "url": "https://files.pythonhosted.org/packages/5e/51/55bd7485e2b45cd1f4cfb95526a478e956979ae71d080feadcde14c020fe/field-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "72d3f4c76c609db3a4fae3bcd6b273c1", "sha256": "537b72e4067a4a013da2aaf9331b1a19d13438e44012e307a1b7bc2a6a0fd455" }, "downloads": -1, "filename": "field-0.2.0-py2-none-any.whl", "has_sig": true, "md5_digest": "72d3f4c76c609db3a4fae3bcd6b273c1", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7866, "upload_time": "2015-04-08T00:08:39", "url": "https://files.pythonhosted.org/packages/1f/54/ba56958f8bb315a39571bd671a20ba42678c64859467aaa465a454606c20/field-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "64eb76b875a128041eb31b625b435616", "sha256": "29394bc076ac37e1b40aa5d9249d8a60056f244bf6167d29cc66ec9d6b7dd182" }, "downloads": -1, "filename": "field-0.2.0.tar.gz", "has_sig": true, "md5_digest": "64eb76b875a128041eb31b625b435616", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18325, "upload_time": "2015-04-08T00:08:42", "url": "https://files.pythonhosted.org/packages/5e/51/55bd7485e2b45cd1f4cfb95526a478e956979ae71d080feadcde14c020fe/field-0.2.0.tar.gz" } ] }