{ "info": { "author": "Cowboy8625", "author_email": "cowboy8625@protonmail.com", "bugtrack_url": null, "classifiers": [], "description": "# CLITUI\n\n\n## Installing\n```\npip install clitui\n```\n\nmodule v 0.1.0\n\nkeyboard support only on:\nMac\nLinux\n\nTUI is a module for making custom CLI/Console App's with python\n\n\n## Terminal suport\n- [x] Mac\n- [X] Linux\n- [ ] Windows CMD\n\nHope to add more cool things to package like window manager but\nI'm not sure what I'll need yet do to this projects is only made\nto help another project I am working on.\nhttps://github.com/cowboy8625/WordRPG\n\nhere is a example on how to use clitui\ncode found in projects examples folder.\n\n\n![menu](https://user-images.githubusercontent.com/43012445/75123819-7e173f00-5670-11ea-9504-b2a0b7539a98.gif)\n\n```py\n# First off we import all the things needed for this\n# example\nfrom clitui import Menu, getchar, fg_by, bg_by, safe_run, is_pressed\n\n# There many ways of setting colors in clitui but here is one where\n# We made a global variable to use throughout code\nFG_CYAN = fg_by(0, 160, 160)\n\n# We first create instances of any kind of menu or submenui\n# with Menu class. Menu takes a x and y and an option argument\n# if no x, y is given submenu's default to parant menu's x, y.\nmain_menu = Menu(\"Main Menu\", x=10, y=10)\noptions_menu = Menu(\"Options Menu\")\nkey_controls = Menu(\"Key Controler\")\n\n# to set color for any menu or submenu just call background_color method.\n# it takes a wide array of valid options.\n# string of \"black\" or \"cycan\"\n# a tuple (0, 160, 160) or just put bg_by function directly in there\nmain_menu.background_color((50, 0, 0))\n\n# here we add items to are menu\n# you can stack method calls on here as well\n# you need a Name and a id for all menu items.\nmain_menu.add(\"New Game\", 0).font_color_for(0, (0, 255, 0))\nmain_menu.add(\"Load\", 1).font_color_for(1, FG_CYAN)\nmain_menu.add(\"Save\", 2).font_color_for(2, \"Cyan\")\n\n# if the menu item has a submenu then give it a Menu instances\n# in submenu method\nmain_menu.add(\"Options\", 3).submenu(3, options_menu)\nmain_menu.add(\"Exit\", 4).add_action(4, exit)\n\n# here we are adding submenu items\noptions_menu.add(\"Sound\", 0)\noptions_menu.add(\"Controls\", 1).submenu(1, key_controls)\n\nkey_controls.add(\"Key0\", 0)\nkey_controls.add(\"Key1\", 1)\nkey_controls.add(\"Key2\", 2)\nkey_controls.add(\"Key3\", 3)\n\n# finally we call the create method to genorate all the need\n# items for drawing.\nmain_menu.create()\n\n\ndef main():\n while True:\n # to get key presses call getchar\n key = getchar()\n\n # finally to get the fun part and draw the menu just call the draw\n # method\n main_menu.draw()\n\n # to get the curser to move pass in key to method\n # move_curser and use up and down\n main_menu.move_curser(key)\n\n if is_pressed(\"ESC\", key):\n exit()\n\n\n# if you want to hide the curser you can call them directly from the curser_controller\n# module in clitui but it is advised to use the safe_run function so you dont get\n# your terminal out of sync\nsafe_run(main)\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/cowboy8625/CLITUI", "keywords": "", "license": "Apache License", "maintainer": "", "maintainer_email": "", "name": "clitui", "package_url": "https://pypi.org/project/clitui/", "platform": "", "project_url": "https://pypi.org/project/clitui/", "project_urls": { "Homepage": "https://github.com/cowboy8625/CLITUI" }, "release_url": "https://pypi.org/project/clitui/0.2.2/", "requires_dist": null, "requires_python": "", "summary": "A tool to help make command line drawing easier.", "version": "0.2.2", "yanked": false, "yanked_reason": null }, "last_serial": 6685947, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "3499a64ff0ff7202f489cc12eb4015a3", "sha256": "7124d7a5240f326764338488126da7f0fa4dc0c7cd28f92ed269f673343988c0" }, "downloads": -1, "filename": "clitui-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3499a64ff0ff7202f489cc12eb4015a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13530, "upload_time": "2019-10-29T22:51:29", "upload_time_iso_8601": "2019-10-29T22:51:29.449149Z", "url": "https://files.pythonhosted.org/packages/23/7d/5a0a8f3ff7d85912e4d98db41e0de0550c6e9537794eb9f40c13af27d44a/clitui-0.1.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "c65219042c86b6039303ab1969352475", "sha256": "5a0fe110f7654968d80ebd42aa424d8bcb2d5cec5b7dd225766e479b0116b0f6" }, "downloads": -1, "filename": "clitui-0.1.2.tar.gz", "has_sig": false, "md5_digest": "c65219042c86b6039303ab1969352475", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15273, "upload_time": "2019-10-30T21:21:23", "upload_time_iso_8601": "2019-10-30T21:21:23.667608Z", "url": "https://files.pythonhosted.org/packages/02/10/f59ab5987669e80dc32eb7e1952a613f584340a84a63574646b78ebbe06d/clitui-0.1.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f33b7867a1001f71676bf23e6f416f1f", "sha256": "049e9de055f79898c664c89a5a25ec06af266b69707aed126403673757a1d176" }, "downloads": -1, "filename": "clitui-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f33b7867a1001f71676bf23e6f416f1f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7974, "upload_time": "2020-02-20T16:03:49", "upload_time_iso_8601": "2020-02-20T16:03:49.425620Z", "url": "https://files.pythonhosted.org/packages/b9/ab/e894b11df2752b59319bf370a299522e55c335553bba9344d6d73cbd5cc9/clitui-0.2.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "f33b6a62428066edd64645afdc2d0bd1", "sha256": "88cb838e20b6add414574bccca2143b3817ef0e58ae6a294407f635e3d07c466" }, "downloads": -1, "filename": "clitui-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f33b6a62428066edd64645afdc2d0bd1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9360, "upload_time": "2020-02-21T17:48:09", "upload_time_iso_8601": "2020-02-21T17:48:09.115986Z", "url": "https://files.pythonhosted.org/packages/42/29/afce5f1a0643f54e2bd764b3c7d1607dc400f99f3c604106a393f4284eb8/clitui-0.2.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "4577f6475de6489cf4a68b3455c5efb5", "sha256": "550973720ba4c175fe232b871c4c48c89293abe01e205b8ebcdbaf3880ee5986" }, "downloads": -1, "filename": "clitui-0.2.2.tar.gz", "has_sig": false, "md5_digest": "4577f6475de6489cf4a68b3455c5efb5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9938, "upload_time": "2020-02-24T01:16:21", "upload_time_iso_8601": "2020-02-24T01:16:21.098651Z", "url": "https://files.pythonhosted.org/packages/12/e2/1052514f02773e16f0f6f2fbea6d8ccf320536047a2c6780d02600af0f50/clitui-0.2.2.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4577f6475de6489cf4a68b3455c5efb5", "sha256": "550973720ba4c175fe232b871c4c48c89293abe01e205b8ebcdbaf3880ee5986" }, "downloads": -1, "filename": "clitui-0.2.2.tar.gz", "has_sig": false, "md5_digest": "4577f6475de6489cf4a68b3455c5efb5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9938, "upload_time": "2020-02-24T01:16:21", "upload_time_iso_8601": "2020-02-24T01:16:21.098651Z", "url": "https://files.pythonhosted.org/packages/12/e2/1052514f02773e16f0f6f2fbea6d8ccf320536047a2c6780d02600af0f50/clitui-0.2.2.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }