{ "info": { "author": "t3chn0tr0n", "author_email": "technotron.avik@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# termstrap\n\na css file (Bootstrap like) for unicode text formatting in python console output :)\n\n## USAGE\n\nInstall it using pip: `pip install termstrap`\n\nImport in your code: `import css` or ` from css import Bootstrap, printc`.\n\nCreate an object: `text = Bootstrap()`\n\nUse as: `text.colorize(, )` or `text.stylize(, < b / i / u >)` or `text.start_block(, )`\n\n## Accessible functions/methods\n\nSimple ones :\n\n- `colorize()` : Takes a text, font color(optional) and bgcolor(optional).\n- `stylize()` : Takes a text, style name (bold, italics, underline and blink). Passing only initials work (e.g. 'b' for bold). You can pass multiple styles simultaneously.\n\n_INFO_ : blink is experimental, if it doesn't work, it does not break anything! Therefore no shorthand for it!\n\nLil advanced ones:\n\n- `get_color()` : Takes name of a font color and returns its color code\n- `get_bgcolor()` : Takes name of a background color and returns its color code\n- `new_color()`: Takes a color name and color code. Can be used to add a new custom font color entry\n- `new_bgcolor()`: Takes a color name and color code. Can be used to add a new custom background color entry\n\n_WARNING_ : Only use `new_color()` or `new_bgcolor()` if you know what you are doing!\n\n## Accessible Variables\n\nAll colors can be accessed by the class instance. Overwriting them will/may break functionality.\n\n- **Color variables**: Bootstrap names - primary, danger, warning, etc.\n- **Background color variables**: bg_primary, bg_danger, bg_warning, etc.\n- **Style variables**: bold, italics, underline, selected, blink\n\n## More Utility Functions\nTHESE ARE NOT MEMBERS OF BOOTSTRAP CLASS. NO NEED FOR INSTANCE CREATION. just import and use.\n- **printc**: Like standard print(). Except: Does not have flush and file params. Have color param, takes name of the color. style param, takes a list or tuple of all styles. bgcolor param, takes name of the bgcolor!\n- **hide_cursor**: Hides cursor in the console\n- **show_cursor**: Restores cursor visibility.\n\n## Example\n\n```Python\n from css import Bootstrap, printc # make sure you have downloaded the css.py file in the same folder/directory\n text = Bootstrap()\n\n # Using colorize to color\n print(text.colorize(\"THIS IS RED\", \"red\")) # You can also use Bootstrap classes, eg. danger\n print(text.colorize(\"THIS IS blue\", \"primary\")) # blue will also work.\n\n # Using stylize to format text- bold(b), italics(i), underline(u), selected(s), blink\n print(text.stylize(\"A BOLD move\", \"bold\")) # b also works in place of bold\n print(text.stylize(\"Slightly slanted\", \"i\"))\n print(text.stylize(\"More the merrier\", 'b', 'u', 's', 'i'))\n\n # You can also combine colors and formats:\n print(text.stylize(text.colorize(\"This is bold in red\"), 'b'))\n\n # Change color for multiple lines if needed!\n text.start_block('red', bold=True)\n # Any text in this clock will be printed in RED, and BOLD by default\n text.end_block()\n\n # Using the printc\n printc(\"RED text in *BOLD*\", color='red', style=('b'))\n printc(\"[1,2,3,4]\", color='warning', style=('b', 'u'), sep='***') # yellow text, styled bold and underlined, seperated by - ***\n printc(\"a\", \"b\", \"cdf\", color=\"primary\", end='') # print multiple strings and specify end param as none, ie. no newline at end!\n```\n\n_IMPORTANT_: Info is not the same color as bootstrap info, its violet!\n\n## KNOWN ISSUES\n\n1. Style - blink DOES NOT work in most cases.\n2. Windows cmd only supports color in windows 10 (v1511 onwards)!\n\n## INSPIRATION\n\n[This](https://stackoverflow.com/questions/287871/how-to-print-colored-text-in-terminal-in-python/39452138#39452138) stackoverflow was the inspiration for this project.\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/t3chn0tr0n/termstrap", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "termstrap", "package_url": "https://pypi.org/project/termstrap/", "platform": "", "project_url": "https://pypi.org/project/termstrap/", "project_urls": { "Homepage": "https://github.com/t3chn0tr0n/termstrap", "Source": "https://github.com/t3chn0tr0n/termstrap" }, "release_url": "https://pypi.org/project/termstrap/1.2.3/", "requires_dist": null, "requires_python": ">=3.*.*", "summary": "Terminal Bootstrap - A Python css file for unicode text formatting in python console output", "version": "1.2.3" }, "last_serial": 5653758, "releases": { "1.2.0": [ { "comment_text": "", "digests": { "md5": "4836db380260d7f7d21ba71643bb80be", "sha256": "6502e923194689113aec1d969ee61b0c8c7677ad00a3fa23fd59882e53af452b" }, "downloads": -1, "filename": "termstrap-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4836db380260d7f7d21ba71643bb80be", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.*.*", "size": 3487, "upload_time": "2019-08-07T17:11:52", "url": "https://files.pythonhosted.org/packages/9e/16/77513a2fba1cf5d99657fa479e77bac97ade3274c35c652f67b6b7fce643/termstrap-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8efda5ed3f65121a9f86f931678a2089", "sha256": "9c98a901b3403efc03b9f0bf7f1286587e8f9df52e36ee563d9731de71662241" }, "downloads": -1, "filename": "termstrap-1.2.0.tar.gz", "has_sig": false, "md5_digest": "8efda5ed3f65121a9f86f931678a2089", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.*.*", "size": 3533, "upload_time": "2019-08-07T17:11:54", "url": "https://files.pythonhosted.org/packages/5b/3c/f2fc8ec984d3519c76ab19448be8c0204f4815c84b5d18aa3a06ee1d440a/termstrap-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "e38c0b9014d7731028310cfd51ddaf07", "sha256": "c486155f1bf99a094548c7c71d3e063713feea0e30e88292620de2763669f5f4" }, "downloads": -1, "filename": "termstrap-1.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e38c0b9014d7731028310cfd51ddaf07", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.*.*", "size": 5185, "upload_time": "2019-08-07T17:36:52", "url": "https://files.pythonhosted.org/packages/44/95/58f6bed10013be91ca166b813ed80a85856c23e09047bf330e24dd6b4e1b/termstrap-1.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cbdcc1db921eeb2c81f0a713570688f5", "sha256": "722fe8ea758e632e26abe3dd58a16adbfaaa861d8923733650a04c0241c72ef1" }, "downloads": -1, "filename": "termstrap-1.2.1.tar.gz", "has_sig": false, "md5_digest": "cbdcc1db921eeb2c81f0a713570688f5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.*.*", "size": 4303, "upload_time": "2019-08-07T17:36:54", "url": "https://files.pythonhosted.org/packages/53/8e/a70899c54ee304db7a6b512d9a7ada1449a81388395a151478cf06383401/termstrap-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "3250d1b02a65318bd992290e2cf668f8", "sha256": "7ca3eba88620fd3e00b05700b43f42df357f15c0f9dcfefe4f4600533c61a1bf" }, "downloads": -1, "filename": "termstrap-1.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "3250d1b02a65318bd992290e2cf668f8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.*.*", "size": 5163, "upload_time": "2019-08-08T17:47:28", "url": "https://files.pythonhosted.org/packages/ba/fa/1de9ee4e5b74a6cf79273cdcee7d795b7a9ff2f90041bd4631ee65a2b28b/termstrap-1.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "efb00dc42d7dcd2efef295baa680c947", "sha256": "fb45bfe0ac101027f8825b62fa1b82609a2e225613724dd3bc95f063b29750e7" }, "downloads": -1, "filename": "termstrap-1.2.2.tar.gz", "has_sig": false, "md5_digest": "efb00dc42d7dcd2efef295baa680c947", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.*.*", "size": 4277, "upload_time": "2019-08-08T17:47:31", "url": "https://files.pythonhosted.org/packages/0a/1e/73ad0f9de4fad48716f3f640d36dbd4b29282b6b94e95a36d409b09783a6/termstrap-1.2.2.tar.gz" } ], "1.2.3": [ { "comment_text": "", "digests": { "md5": "e0472f81e7d3ea4b70f183b475881bde", "sha256": "217adbc2906e4afcb9b79669dced4f2baf8efe5d44d9e851a0b33f90384212c2" }, "downloads": -1, "filename": "termstrap-1.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "e0472f81e7d3ea4b70f183b475881bde", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.*.*", "size": 5161, "upload_time": "2019-08-09T06:17:54", "url": "https://files.pythonhosted.org/packages/aa/e8/17201e1da70113fdaf782b80fecf467e4b1dd5e4f658f366a6d2935b26fc/termstrap-1.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5ef9ff3b4f4508c560275178472dc13b", "sha256": "e9ae6d49c4edac3e9790b25e9071e05186e7c5e55ee0d0dffe8586dd2fdc1794" }, "downloads": -1, "filename": "termstrap-1.2.3.tar.gz", "has_sig": false, "md5_digest": "5ef9ff3b4f4508c560275178472dc13b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.*.*", "size": 4277, "upload_time": "2019-08-09T06:18:01", "url": "https://files.pythonhosted.org/packages/f8/dd/63a3144dffacfd8ce27a366974728d7c940919c1acf08d528536c79960bf/termstrap-1.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e0472f81e7d3ea4b70f183b475881bde", "sha256": "217adbc2906e4afcb9b79669dced4f2baf8efe5d44d9e851a0b33f90384212c2" }, "downloads": -1, "filename": "termstrap-1.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "e0472f81e7d3ea4b70f183b475881bde", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.*.*", "size": 5161, "upload_time": "2019-08-09T06:17:54", "url": "https://files.pythonhosted.org/packages/aa/e8/17201e1da70113fdaf782b80fecf467e4b1dd5e4f658f366a6d2935b26fc/termstrap-1.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5ef9ff3b4f4508c560275178472dc13b", "sha256": "e9ae6d49c4edac3e9790b25e9071e05186e7c5e55ee0d0dffe8586dd2fdc1794" }, "downloads": -1, "filename": "termstrap-1.2.3.tar.gz", "has_sig": false, "md5_digest": "5ef9ff3b4f4508c560275178472dc13b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.*.*", "size": 4277, "upload_time": "2019-08-09T06:18:01", "url": "https://files.pythonhosted.org/packages/f8/dd/63a3144dffacfd8ce27a366974728d7c940919c1acf08d528536c79960bf/termstrap-1.2.3.tar.gz" } ] }