{ "info": { "author": "Tim Savannah", "author_email": "kata198@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Database", "Topic :: Text Processing", "Topic :: Utilities" ], "description": "popLines\n========\n\nTools to pop (remove and return) lines from files, with a variety of modes.\n\n\nThis allows you to treat a file on disk as a queue, or to easily strip lines from a file, and many other uses.\n\n\nExample\n-------\n\n [cmd]$ cat test # Show original file\n\n one\n\n two\n\n three\n\n four\n\n five\n\n\n [cmd]$ popHead 2 test # Remove two lines from head of the file\n\n one\n\n two\n\n\n [cmd]$ cat test # Show that lines have been removed from file\n\n three\n\n four\n\n five\n\n\n\n\nModes\n-----\n\n\nFor all actions which provide a line number, the numbers are 1-origin (first line is \"1\", second is \"2\").\n\n\nThe followings modes and their associated command name are given:\n\n\n**Head** - popHead [numLines] [filename] - Removes \"numLines\" from the top of provided \"filename\", and prints them on stdout.\n\nIf *numLines* is a negative number, -N, popHead will pop lines starting from head up until the Nth-to-last line. For example, calling popHead -2 on a file with 6 lines will pop the first 4.\n\n\n**Tail** - popTail [numLines] [filename] - Removes \"numLines\" from the bottom of provided \"filename\", and prints them on stdout.\n\nIf *numLines* is a negative number, -N, popTail will pop lines starting from tail up until the Nthline. For example, calling popTail -3 on a file with 8 lines will pop the last 5.\n\n\n**Random** - popRandom [numLines] [filename] - Removes \"numLines\" from random positions within provided \"filename\", and prints to stdout in a random order.\n\n\nYou can pass the --ordered flag, and the randomly-selected lines will be output in the same order they appear in the file. By default, the random lines will be output in random order.\n\n\n**Range** - popRange [start] [stop] (optional: [step]) [filename] - Removes lines using inclusive 1-origin start, stop, and optional step, and prints to stdout. Negative numbers are supported to mean \"from the end\", -1 is last line, -2 is second-to-last line.\n\n\n**These** - popThese [line1] [...lineN] [filename] - Removes specific lines given 1-origin numbers. If numbers are out of range, that number will be ommited. Lines are returned in provided order, and duplicates are allowed. Negative numbers are supported to mean \"from the end\".\n\n\nPeeking\n-------\n\nBy default, the pop\\* commands are designed to implement queues, and thus they perform real \"pops\" and remove the elements extracted from the source file.\n\nIf you'd just like to \"peek\" (extract lines but keep them in the source), add \"--peek\" when invoking any of the pop\\* commands.\n\n\nModule\n------\n\nFunctionality is exposed through a module, PopLines, which can perform all the same operations.\n\nYou can checkout the pydoc here: http://pythonhosted.org/popLines", "description_content_type": null, "docs_url": "https://pythonhosted.org/popLines/", "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kata198/popLines", "keywords": "popLines,file,head,tail,random,queue,stack,pop,lines,peek,extract,text,popHead,popTail,popRandom,remove,position,line", "license": "GPLv2", "maintainer": null, "maintainer_email": null, "name": "popLines", "package_url": "https://pypi.org/project/popLines/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/popLines/", "project_urls": { "Homepage": "https://github.com/kata198/popLines" }, "release_url": "https://pypi.org/project/popLines/2.1.1/", "requires_dist": null, "requires_python": null, "summary": "Tools to pop/peek lines from the head/tail or known position within a given file, and output to stdout. Makes files into queues!", "version": "2.1.1" }, "last_serial": 2957212, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "5aecf3d0808fd5fc0cb90e32afeea4eb", "sha256": "953017daa688ea83d2a8d6fb011f3a072e5ab6f8e904478c5651520fa1b104a2" }, "downloads": -1, "filename": "popLines-1.0.tar.gz", "has_sig": false, "md5_digest": "5aecf3d0808fd5fc0cb90e32afeea4eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3929, "upload_time": "2016-01-13T19:05:28", "url": "https://files.pythonhosted.org/packages/27/b1/ac4effaf4ea7caaa592829921c29f47f590fca7a124c34cc5d84da72fcee/popLines-1.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "d82a035c7947139cfdd227da88339b1e", "sha256": "169cc38cb7f8384c40ce57b3b88e8a2afa272e3e74e16792507e9bbde3833115" }, "downloads": -1, "filename": "popLines-1.1.0.tar.gz", "has_sig": false, "md5_digest": "d82a035c7947139cfdd227da88339b1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6401, "upload_time": "2016-01-14T04:31:22", "url": "https://files.pythonhosted.org/packages/49/fd/4610afb57f9886adca7f307a2bf7890195c8bb76f89676358966b8b60ab8/popLines-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "907250884e836e7ff7a8dda124732fcb", "sha256": "c33615ae521973b5b9d43f94e464600c54d6067fe75487d5afbf6160f98c3651" }, "downloads": -1, "filename": "popLines-1.1.1.tar.gz", "has_sig": false, "md5_digest": "907250884e836e7ff7a8dda124732fcb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6377, "upload_time": "2017-02-28T19:19:29", "url": "https://files.pythonhosted.org/packages/f2/3f/3dfeebcd933369d9a91d64f86c1418cfddb1c4903282d9bcdf08cdbd5bb9/popLines-1.1.1.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "c1c86b0b686a7ec878e57ce610aef9f7", "sha256": "d03113cf89e1f838787dc4117325ed7b5da4b435f31dd73ba36ecdacd98ee412" }, "downloads": -1, "filename": "popLines-2.0.0.tar.gz", "has_sig": false, "md5_digest": "c1c86b0b686a7ec878e57ce610aef9f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7478, "upload_time": "2017-02-28T19:59:56", "url": "https://files.pythonhosted.org/packages/9d/4e/187ac03e1211abfd4dc376fbae884674164f51bf361f94e475f2335426b2/popLines-2.0.0.tar.gz" } ], "2.1.0": [ { "comment_text": "", "digests": { "md5": "96188448d5346babc6c415b8aa4b8d43", "sha256": "6478cdae89e5bdbdf0b4e5dbfa18b12093f727167026f18c86b0ba3f7676b05d" }, "downloads": -1, "filename": "popLines-2.1.0.tar.gz", "has_sig": false, "md5_digest": "96188448d5346babc6c415b8aa4b8d43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10059, "upload_time": "2017-06-18T05:14:05", "url": "https://files.pythonhosted.org/packages/f8/7d/b9c1e388e803fcf218879d295fba1679ae18eb141af7a1af45eb5d1e181a/popLines-2.1.0.tar.gz" } ], "2.1.1": [ { "comment_text": "", "digests": { "md5": "2bc812e1f09994abc1dd2f4524851da9", "sha256": "5e62ea3d7d3a0b1fefd4942168ee233bfec9a6e41a049d56a94ba5f2440d0ad6" }, "downloads": -1, "filename": "popLines-2.1.1.tar.gz", "has_sig": false, "md5_digest": "2bc812e1f09994abc1dd2f4524851da9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10074, "upload_time": "2017-06-18T05:16:24", "url": "https://files.pythonhosted.org/packages/43/18/9f307b1c8d3cdef3975ba4570748a6800636569154e027df451257922b63/popLines-2.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2bc812e1f09994abc1dd2f4524851da9", "sha256": "5e62ea3d7d3a0b1fefd4942168ee233bfec9a6e41a049d56a94ba5f2440d0ad6" }, "downloads": -1, "filename": "popLines-2.1.1.tar.gz", "has_sig": false, "md5_digest": "2bc812e1f09994abc1dd2f4524851da9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10074, "upload_time": "2017-06-18T05:16:24", "url": "https://files.pythonhosted.org/packages/43/18/9f307b1c8d3cdef3975ba4570748a6800636569154e027df451257922b63/popLines-2.1.1.tar.gz" } ] }