# style-print
style-print is a utility CLI for formatting and printing text in different styles. It uses the ``printy`` library for color and formatting options.
## Installation
- Install the package using pip:
```bash
pip install style-print
```
- Pre-commit hook:
```yaml
repos:
- repo: local
hooks:
- id: style-print
name: style-print
entry: style-print "This is a test" "r>UBI{b}"
language: python
additional_dependencies: ["style-print"]
pass_filenames: false
verbose: true
```
## Usage
### Command line usage
style-print can be used from the command line using the ``style-print`` command. The script takes three arguments:
- *positional* ``text``: The text to be printed, or the ``?gimme`` command
- *optional* ``options``: The options for formatting the text
- *info* ``?gimme``: A special text that prints the available colors and formats
- *optional* ``-d`` or ``--disable-gimme``: A flag that disables the default behavior when the ``text`` is equal to ``"?gimme"``.
#### *Text*
The text argument is the text to be printed. If the text is equal to ``"?gimme"``, then the available colors and formats are printed. This behavior can be disabled by passing the ``-d`` or ``--disable-gimme`` flag. You must use double quotes if you want to print a string that contains spaces.
#### *Options*
The options argument is used to pass the formatting options to ``printy``. The options are passed in a string format. You must use double quotes if you want to use background colors or colors with greater than or smaller than signs. For example, to set the text color to light red and background color to blue and underlined-bold-italic, you can pass the option ``"r>UBI{b}"``.
For more information on the options available, see the ``printy`` library documentation: https://github.com/edraobdu/printy#list-1-flags
### In code usage
Just use the ``printy`` library itself. The ``style-print`` package is just a wrapper around the ``printy`` library for command line usage.
## Issues
If you run into any issues, please open an issue on the GitHub repository: https://github.com/egeakman/style-print/issues
## License
This project is licensed under the AGPL-3.0 License - see the [LICENSE](LICENSE) file for details
Raw data
{
"_id": null,
"home_page": "https://github.com/egeakman/style-print",
"name": "style-print",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": "",
"keywords": "print,console,terminal,style,color,printy,utility",
"author": "Ege Akman",
"author_email": "me@egeakman.dev",
"download_url": "https://files.pythonhosted.org/packages/61/d7/018876e7ec17569bfe1b59d6f7ecfed28470c11f8e1e90ba08457c77f997/style-print-2023.2.11.tar.gz",
"platform": null,
"description": "# style-print\r\n\r\nstyle-print is a utility CLI for formatting and printing text in different styles. It uses the ``printy`` library for color and formatting options.\r\n\r\n## Installation\r\n\r\n- Install the package using pip:\r\n\r\n ```bash\r\n pip install style-print\r\n ```\r\n\r\n- Pre-commit hook:\r\n\r\n ```yaml\r\n repos:\r\n - repo: local\r\n hooks:\r\n - id: style-print\r\n name: style-print\r\n entry: style-print \"This is a test\" \"r>UBI{b}\"\r\n language: python\r\n additional_dependencies: [\"style-print\"]\r\n pass_filenames: false\r\n verbose: true\r\n ```\r\n\r\n## Usage\r\n\r\n### Command line usage\r\n\r\nstyle-print can be used from the command line using the ``style-print`` command. The script takes three arguments:\r\n- *positional* ``text``: The text to be printed, or the ``?gimme`` command\r\n- *optional* ``options``: The options for formatting the text\r\n- *info* ``?gimme``: A special text that prints the available colors and formats\r\n- *optional* ``-d`` or ``--disable-gimme``: A flag that disables the default behavior when the ``text`` is equal to ``\"?gimme\"``.\r\n\r\n#### *Text*\r\n\r\nThe text argument is the text to be printed. If the text is equal to ``\"?gimme\"``, then the available colors and formats are printed. This behavior can be disabled by passing the ``-d`` or ``--disable-gimme`` flag. You must use double quotes if you want to print a string that contains spaces.\r\n\r\n#### *Options*\r\n\r\nThe options argument is used to pass the formatting options to ``printy``. The options are passed in a string format. You must use double quotes if you want to use background colors or colors with greater than or smaller than signs. For example, to set the text color to light red and background color to blue and underlined-bold-italic, you can pass the option ``\"r>UBI{b}\"``.\r\n\r\nFor more information on the options available, see the ``printy`` library documentation: https://github.com/edraobdu/printy#list-1-flags\r\n\r\n### In code usage\r\n\r\nJust use the ``printy`` library itself. The ``style-print`` package is just a wrapper around the ``printy`` library for command line usage.\r\n\r\n## Issues\r\n\r\nIf you run into any issues, please open an issue on the GitHub repository: https://github.com/egeakman/style-print/issues\r\n\r\n## License\r\n\r\nThis project is licensed under the AGPL-3.0 License - see the [LICENSE](LICENSE) file for details\r\n",
"bugtrack_url": null,
"license": "AGPLv3",
"summary": "Print with style from the command line!",
"version": "2023.2.11",
"split_keywords": [
"print",
"console",
"terminal",
"style",
"color",
"printy",
"utility"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "61d7018876e7ec17569bfe1b59d6f7ecfed28470c11f8e1e90ba08457c77f997",
"md5": "7de8d0714fba746f74cf98ded0fe6cef",
"sha256": "9b17e5aefc9a83d45b1268bb45f96ec2f4792dbbcf2fe967ad1065e99cf400a2"
},
"downloads": -1,
"filename": "style-print-2023.2.11.tar.gz",
"has_sig": false,
"md5_digest": "7de8d0714fba746f74cf98ded0fe6cef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 15008,
"upload_time": "2023-02-11T06:26:15",
"upload_time_iso_8601": "2023-02-11T06:26:15.766270Z",
"url": "https://files.pythonhosted.org/packages/61/d7/018876e7ec17569bfe1b59d6f7ecfed28470c11f8e1e90ba08457c77f997/style-print-2023.2.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-11 06:26:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "egeakman",
"github_project": "style-print",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "style-print"
}