{ "info": { "author": "Toby Slight", "author_email": "tslight@pm.me", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: ISC License (ISCL)", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# CURSES LIST PICKER\n\n![img](./cpick.gif \"Curses List Picker\")\n\n*Pick items from a list with a nice TUI, & comfy Vi keybindings.*\n\n## INSTALLATION\n\n`pip install cpick`\n\n## CLI USAGE\n\n```\nUSAGE: cpick:\n\n[-h] [--help]\n[-l LIMIT] [--limit LIMIT]\n[-n] [--numbers]\n[-H HEADER] [--header HEADER]\n[-F FOOTER] [--footer FOOTER]\n[ITEMS] [items ...]\n\nCurses List Picker.\n\nPositional Arguments:\n [ITEMS] : Items for the picker.\n\nOptional Arguments:\n -h, --help : Show this help message and exit.\n -l, --limit [LIMIT] : Limit number of picks.\n -n, --numbers : Show line numbers.\n -H, --header [HEADER] : A string to use as a header.\n -F, --footer [FOOTER] : A string to use as a footer.\n```\n\n## PYTHON USAGE\n\n**Example using all available arguments**\n\n``` python\nimport cpick\n\n# keyword argument dictionary\nkwargs = {\n\t# list to feed into the picker\n\t'items': ['a', 'list', 'of', 'items'],\n\t# only allow five items to be picked, defaults to sys.maxsize\n\t'limit': 5,\n\t# turn line numbering on\n\t'numbers': True,\n\t# defaults to 'PICK ITEMS FROM THIS LIST'\n\t'header': 'My Awesome Custom Header',\n\t# defaults to 'Press [?] to view keybindings'\n\t'footer': 'My Awesome Custom Footer',\n}\n\n# splat args using ** to unpack kwargs dictionary\npicked = cpick.pick(**kwargs)\n\n# print picked list\nprint(*picked, sep=\", \")\n# output if all items picked: a, list, of, items\n```\n\n**Example using only a list**\n\n``` python\n# pass in only mandatory arg - a list.\npicked = cpick.pick(items=['just', 'a', 'list'])\nprint(*picked, sep=\", \")\n# output if all items picked: just, a, list\n```\n\n## KEYBINDINGS\n\n| **KEY** | **ACTION** |\n|:-------------|:------------------------------------------|\n| `k`,`UP` | Move up one line |\n| `j`,`DOWN` | Move down one line |\n| `g`,`HOME` | Jump to first line |\n| `G`,`END` | Jump to last line |\n| `f`,`PGDN` | Jump down a page of lines |\n| `b`,`PGUP` | Jump up a page of lines |\n| `#` | Jump to line number |\n| `/` | Find items via wildcards, regex or range |\n| `n` | Jump to next search result |\n| `p` | Jump to previous search result |\n| `CTRL-n` | Jump to next pick |\n| `CTRL-p` | Jump to previous pick |\n| `r`,`F5` | Reset search results and picks |\n| `z`,`CTRL-l` | Recenter current line on screen |\n| `RET` | Pick an item |\n| `;` | Pick via wildcards, regex or range |\n| `u` | Undo the last pick |\n| `U` | Undo the last pick and move to it\\'s line |\n| `t` | Toggle an item |\n| `SPC` | Toggle item and go down a line |\n| `CTRL-SPC` | Toggle item and go up a line |\n| `a` | Toggle all items |\n| `:` | Toggle via wildcards, regex or range |\n| `v` | View picked items |\n| `?`,`F1` | View this help page |\n| `w`,`CTRL-s` | Save picks to a file |\n| `q`,`ESC` | Quit and display all marked paths |\n\n## NOTES\n\nPicking`[;]`, toggling `[:]`, and searching`[/]` is supported via the following\nmethods:\n\n- [Unix Style Wildcards](https://docs.python.org/3/library/fnmatch.html).\n- [Regular Expressions](https://docs.python.org/3/howto/regex.html).\n- Matching a complete string (ie. not substrings - use wildcards for this.)\n- Specifying the line number of an item.\n- Specifying a range of line numbers in the following forms:\n\n | **PROMPT** | **ACTION** |\n |:-----------|:------------------------------------------------------|\n | `x..y` | Match line numbers between *x* and *y* |\n | `x-y` | Match line numbers between *x* and *y* |\n | `x..` | Match line numbers from *x* until the end of the list |\n | `..y` | Match line numbers from beginning of list until *y* |\n | `x-` | Match line numbers from *x* until the end of the list |\n | `-y` | Match line numbers from beginning of list until *y* |\n\nThese can also be combined. You can enter multiple patterns, ranges and strings\nat one `Pick:`, `Toggle:` or `Find:` prompt.\n\nHowever, be aware, that when toggling - if patterns, ranges or strings are\nentered that match the same items, they will cancel each other out.\n\nFor example, if you entered `1..10 ^[A-Z][a-z]+$` on a list where the first 10\nitems were capitalised words, nothing would be picked.\n\nThe `1..10` would pick the first ten items, and then the `^[A-Z][a-z]+$` would\nunpick them, since they call the toggle method consecutively.\n\nIf you do not want this *(you probably don't..)* - use the `Pick:` prompt\ninstead.\n\n## EXAMPLES\n\nPick a number from 1 to 100, using custom header/footer and limiting picks to 5.\n\n`cpick --header \"My header\" --footer \"My footer\" --limit 5 {1..100}`\n\nPick 5 random words from the dictionary, using the default header/footer.\n\n`cpick --limit 5 $(shuf -n 100 /usr/share/dict/words)`\n\nPick an unlimited number of paths from the current directory.\n\n`cpick $(ls)`\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/tslight/cpick", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "cpick", "package_url": "https://pypi.org/project/cpick/", "platform": "", "project_url": "https://pypi.org/project/cpick/", "project_urls": { "Homepage": "https://github.com/tslight/cpick" }, "release_url": "https://pypi.org/project/cpick/0.0.7/", "requires_dist": [ "columns" ], "requires_python": "", "summary": "Curses List Picker", "version": "0.0.7" }, "last_serial": 5289388, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d35acf184e46f44dbc8fe08955ded25c", "sha256": "4773d1ecbcc5dd5d51f563111f48ba94dc3f8e8dd6c98cc79c8fa415617d0642" }, "downloads": -1, "filename": "cpick-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "d35acf184e46f44dbc8fe08955ded25c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3797, "upload_time": "2019-05-06T00:26:38", "url": "https://files.pythonhosted.org/packages/ae/cc/38464e90631f8f827f9c57f979dc808c0bb332aeb95bef7590506f0fce1a/cpick-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9c930de2ef54ed234198f0d1e6ea9c42", "sha256": "7c14c1fbb932cfe3f7022a48f97400c322cd5e7e412d9fec95b340544bc09d30" }, "downloads": -1, "filename": "cpick-0.0.1.tar.gz", "has_sig": false, "md5_digest": "9c930de2ef54ed234198f0d1e6ea9c42", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2303, "upload_time": "2019-05-06T00:26:40", "url": "https://files.pythonhosted.org/packages/03/1f/20907f579c485b113bb01bba2fcec898117af10a754492cdf5c7b460dae1/cpick-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "65bf8ddae7ad436f0e6f032ae27db846", "sha256": "9d3ebddc4e7dc7cb2c55af48055da70dce20468ea48b75e18b0062d3e820f6c0" }, "downloads": -1, "filename": "cpick-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "65bf8ddae7ad436f0e6f032ae27db846", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4067, "upload_time": "2019-05-06T11:26:05", "url": "https://files.pythonhosted.org/packages/14/b4/bf5b1298dd929af1876fa83d8f8290e67a422c5cd3e457e764481101d94c/cpick-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6efa37a036c8fa2960758ce5eb7de6b3", "sha256": "3ac939050fe44725c440e3687bde4a9c95d0f5afa67b6f05fbf3cdb6bf80df7f" }, "downloads": -1, "filename": "cpick-0.0.2.tar.gz", "has_sig": false, "md5_digest": "6efa37a036c8fa2960758ce5eb7de6b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2606, "upload_time": "2019-05-06T11:26:06", "url": "https://files.pythonhosted.org/packages/ab/b6/8a7ca5cbb488cd0843b94251e14d647154b109f141c869d751787198762b/cpick-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "81fc50aa69201ccdd8d14ea3efe8dac0", "sha256": "4c95f84034023b4e7f34b3df21ec09c0294ee270eedff953bc9cda960fc55e9c" }, "downloads": -1, "filename": "cpick-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "81fc50aa69201ccdd8d14ea3efe8dac0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7272, "upload_time": "2019-05-06T22:45:35", "url": "https://files.pythonhosted.org/packages/f8/4a/0d36e1fbb3bbc55c31d658e82eff3e24ec53616520bac117f58383db8748/cpick-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9d42fe63eac29ea5fa80ca0973584f1a", "sha256": "fc1822d83dc1488620f6644d04d5d385c1dcd60331d490ce516f417c2d38bf9c" }, "downloads": -1, "filename": "cpick-0.0.3.tar.gz", "has_sig": false, "md5_digest": "9d42fe63eac29ea5fa80ca0973584f1a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3876, "upload_time": "2019-05-06T22:45:36", "url": "https://files.pythonhosted.org/packages/f8/86/10bf7de275fda4a9bd640eb46a238209f624befeb258817494ec81b23d71/cpick-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "512e1fa91775074f9cd4d84f5b8ad1e7", "sha256": "d2730d462c0947003dc5f4bb900b920450f38624444d2cbdf059a0b11499ad58" }, "downloads": -1, "filename": "cpick-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "512e1fa91775074f9cd4d84f5b8ad1e7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13156, "upload_time": "2019-05-11T15:06:28", "url": "https://files.pythonhosted.org/packages/a9/9f/d78c2344366befb4299cbbce0ce05be0c99ae4385fb39610ba5d094e900e/cpick-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8425f74453ba58bf3266f609d4a5b1c1", "sha256": "adff574f0ef40c0e9a8b109cf63ad960a7ca5af129bb63e14a308528b8f48f40" }, "downloads": -1, "filename": "cpick-0.0.4.tar.gz", "has_sig": false, "md5_digest": "8425f74453ba58bf3266f609d4a5b1c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9157, "upload_time": "2019-05-11T15:06:29", "url": "https://files.pythonhosted.org/packages/22/39/b042667c0e80d84bdfdd538f659453f5e1906079f3f473e4e0ececa86a12/cpick-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "c7cbf296421e6611cb0f3e1cdb049b8a", "sha256": "0f41dec0f2239f903a7b42c0e7fc4bd59c5a33eb31fc5d8f6f0a2bf7491b97db" }, "downloads": -1, "filename": "cpick-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "c7cbf296421e6611cb0f3e1cdb049b8a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13375, "upload_time": "2019-05-11T16:03:51", "url": "https://files.pythonhosted.org/packages/fd/ae/90bf150cbc94b3900cf1c1429ae5831e9179bed6d2baee783666ada7dbb1/cpick-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "23e9d8a343f17f3b95ea76bffadd9ddf", "sha256": "d048cf7e8fd03d70bce2d0adde277fb29f6d2bab446be9edca6629d02ef487c9" }, "downloads": -1, "filename": "cpick-0.0.5.tar.gz", "has_sig": false, "md5_digest": "23e9d8a343f17f3b95ea76bffadd9ddf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9427, "upload_time": "2019-05-11T16:03:53", "url": "https://files.pythonhosted.org/packages/d1/8d/83ffbd06d675f734d43607440a64328dd8effa58214465fa5fe8f07ebed8/cpick-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "4e1ac1f42854440db8ca9b2176d613d8", "sha256": "5a9a06d333b1585a9aff8ef1da59c2102b2847b0cfa4379743a45b7f15ddf732" }, "downloads": -1, "filename": "cpick-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "4e1ac1f42854440db8ca9b2176d613d8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14712, "upload_time": "2019-05-12T21:50:20", "url": "https://files.pythonhosted.org/packages/cd/87/4429b3c939cf25def06f7b97b7b0668ba022d6d4360330720c19af1ca3d6/cpick-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "117fd79e5206548196c1d4c8f391a3c6", "sha256": "1200168aa79915b02a8a16a2518ddeb30c1bc55dc6d9ee7d9feeb9c281b624d2" }, "downloads": -1, "filename": "cpick-0.0.6.tar.gz", "has_sig": false, "md5_digest": "117fd79e5206548196c1d4c8f391a3c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11338, "upload_time": "2019-05-12T21:50:22", "url": "https://files.pythonhosted.org/packages/d4/4e/5d2fbc1739538304635257c1c4264b0854abc0525a60128bfb3a1cc530a2/cpick-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "2e5b19be01850c9cc05c539a5f5ec329", "sha256": "32a5ac2fb60f8a69461e49cd2238e5aaae91affd80dcf4d8766bcdd0554be5f1" }, "downloads": -1, "filename": "cpick-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "2e5b19be01850c9cc05c539a5f5ec329", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11698, "upload_time": "2019-05-19T19:55:12", "url": "https://files.pythonhosted.org/packages/41/b5/2fc4e69036e1746a0193be54e029aac26ba3e0ad5f6d295309c8a1a9890e/cpick-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "20d48fc64f98c58aff95ef988eda6954", "sha256": "57c82f1e0fd87c7ebd3cc21902186b606d80a19b0f1cd48a2747eae94c28320c" }, "downloads": -1, "filename": "cpick-0.0.7.tar.gz", "has_sig": false, "md5_digest": "20d48fc64f98c58aff95ef988eda6954", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11437, "upload_time": "2019-05-19T19:55:14", "url": "https://files.pythonhosted.org/packages/1a/75/749989d1f1f2be4b49e93a001b140edfb98a89c4cd7f36b367a4bfcd659f/cpick-0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e5b19be01850c9cc05c539a5f5ec329", "sha256": "32a5ac2fb60f8a69461e49cd2238e5aaae91affd80dcf4d8766bcdd0554be5f1" }, "downloads": -1, "filename": "cpick-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "2e5b19be01850c9cc05c539a5f5ec329", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11698, "upload_time": "2019-05-19T19:55:12", "url": "https://files.pythonhosted.org/packages/41/b5/2fc4e69036e1746a0193be54e029aac26ba3e0ad5f6d295309c8a1a9890e/cpick-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "20d48fc64f98c58aff95ef988eda6954", "sha256": "57c82f1e0fd87c7ebd3cc21902186b606d80a19b0f1cd48a2747eae94c28320c" }, "downloads": -1, "filename": "cpick-0.0.7.tar.gz", "has_sig": false, "md5_digest": "20d48fc64f98c58aff95ef988eda6954", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11437, "upload_time": "2019-05-19T19:55:14", "url": "https://files.pythonhosted.org/packages/1a/75/749989d1f1f2be4b49e93a001b140edfb98a89c4cd7f36b367a4bfcd659f/cpick-0.0.7.tar.gz" } ] }