ers-terminal-utils


Nameers-terminal-utils JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryA python package for UNIX terminal utilities
upload_time2024-02-05 14:27:29
maintainer
docs_urlNone
author
requires_python>=2.7
licenseMIT License Copyright (c) 2024 eliaquimrs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords terminal shell python bash choices terminal choices
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # terminal-utils

<p align="center">A python package for UNIX terminal utilities</p>

# Menu
- [Getting started](#getting-started)
    - [Instalation](#installationuninstallation)
        - [With public pip repository](#with-public-pip-repository)
        - [Local installation](#local-installation)
    - [Uninstallation](#uninstallation)
    - [Usage](#usage)
        - [Dynamic choices](#dynamic-choices-via-terminal)
            - [Mode: One choice](#mode-one-choice-source-code)
            - [Mode: Multiple choices](#mode-multiple-choices-source-code)
- [LICENSE](#license)


# Getting started
## Installation

### With public pip repository
```shell
pip install ers-terminal-utils
```

## Uninstallation
```shell
pip uninstall ers-terminal-utils
```

## Usage
### Dynamic choices via terminal

#### Mode: one choice [(Source Code)](./examples/one_choice_example_1.py)
```python
from terminal_utils.choices_via_terminal import ChoicesViaTerminal

LIST_OF_CHOICES = [
    'Option 1',
    'Option 2',
    'Option 3',
    'Option 4',
    'Option 5'
]
TITTLE = 'Choose an option'
response = ChoicesViaTerminal(TITTLE, LIST_OF_CHOICES).main()
chosen_option_index, chosen_option_text = response[0]

print()
print('Chosen option index: {}\n'
      'Chosen option text: {}'.format(chosen_option_index, chosen_option_text))
```
<p align="center"><img width="800" src="md_files/example_1.gif" /></p>

#### Mode: Multiple choices [(Source Code)](./examples/multiple_choice_example_1.py)
```python
from terminal_utils.choices_via_terminal import ChoicesViaTerminal

LIST_OF_CHOICES = [
    'Option 1',
    'Option 2',
    'Option 3',
    'Option 4',
    'Option 5'
]
TITTLE = 'Choose one or more options'
response = ChoicesViaTerminal(TITTLE, LIST_OF_CHOICES,
                              mode='multiple_choices').main()

print('')
for chosen_option_index, chosen_option_text in response:
    print(
        '- Chosen option index: {}|Chosen option text: {}'.format(chosen_option_index,
                                                                  chosen_option_text)
    )
```
<p align="center"><img width="800" src="md_files/example_2.gif" /></p>

# LICENSE
<p align=center>This project is licensed under the MIT License - see the <a href="https://opensource.org/licenses/MIT">LICENSE</a> page for details.</p>
<p align="center">
  <a href="https://opensource.org/licenses/MIT">
    <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License MIT">
  </a>
</p>

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "ers-terminal-utils",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=2.7",
    "maintainer_email": "Eliaquim Souza <eliaquim.rsv@gmail.com>",
    "keywords": "terminal,shell,python,bash,choices,terminal choices",
    "author": "",
    "author_email": "Eliaquim Souza <eliaquim.rsv@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/70/9e/1b11863631349daa270621048ea22025120a12365d63ab66352f66d63923/ers-terminal-utils-0.0.2.tar.gz",
    "platform": null,
    "description": "# terminal-utils\n\n<p align=\"center\">A python package for UNIX terminal utilities</p>\n\n# Menu\n- [Getting started](#getting-started)\n    - [Instalation](#installationuninstallation)\n        - [With public pip repository](#with-public-pip-repository)\n        - [Local installation](#local-installation)\n    - [Uninstallation](#uninstallation)\n    - [Usage](#usage)\n        - [Dynamic choices](#dynamic-choices-via-terminal)\n            - [Mode: One choice](#mode-one-choice-source-code)\n            - [Mode: Multiple choices](#mode-multiple-choices-source-code)\n- [LICENSE](#license)\n\n\n# Getting started\n## Installation\n\n### With public pip repository\n```shell\npip install ers-terminal-utils\n```\n\n## Uninstallation\n```shell\npip uninstall ers-terminal-utils\n```\n\n## Usage\n### Dynamic choices via terminal\n\n#### Mode: one choice [(Source Code)](./examples/one_choice_example_1.py)\n```python\nfrom terminal_utils.choices_via_terminal import ChoicesViaTerminal\n\nLIST_OF_CHOICES = [\n    'Option 1',\n    'Option 2',\n    'Option 3',\n    'Option 4',\n    'Option 5'\n]\nTITTLE = 'Choose an option'\nresponse = ChoicesViaTerminal(TITTLE, LIST_OF_CHOICES).main()\nchosen_option_index, chosen_option_text = response[0]\n\nprint()\nprint('Chosen option index: {}\\n'\n      'Chosen option text: {}'.format(chosen_option_index, chosen_option_text))\n```\n<p align=\"center\"><img width=\"800\" src=\"md_files/example_1.gif\" /></p>\n\n#### Mode: Multiple choices [(Source Code)](./examples/multiple_choice_example_1.py)\n```python\nfrom terminal_utils.choices_via_terminal import ChoicesViaTerminal\n\nLIST_OF_CHOICES = [\n    'Option 1',\n    'Option 2',\n    'Option 3',\n    'Option 4',\n    'Option 5'\n]\nTITTLE = 'Choose one or more options'\nresponse = ChoicesViaTerminal(TITTLE, LIST_OF_CHOICES,\n                              mode='multiple_choices').main()\n\nprint('')\nfor chosen_option_index, chosen_option_text in response:\n    print(\n        '- Chosen option index: {}|Chosen option text: {}'.format(chosen_option_index,\n                                                                  chosen_option_text)\n    )\n```\n<p align=\"center\"><img width=\"800\" src=\"md_files/example_2.gif\" /></p>\n\n# LICENSE\n<p align=center>This project is licensed under the MIT License - see the <a href=\"https://opensource.org/licenses/MIT\">LICENSE</a> page for details.</p>\n<p align=\"center\">\n  <a href=\"https://opensource.org/licenses/MIT\">\n    <img src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"License MIT\">\n  </a>\n</p>\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 eliaquimrs  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A python package for UNIX terminal utilities",
    "version": "0.0.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/eliaquimrs/terminal-utils/issues",
        "Documentation": "https://github.com/eliaquimrs/terminal-utils?tab=readme-ov-file#readme",
        "Homepage": "https://github.com/eliaquimrs/terminal-utils",
        "Repository": "https://github.com/eliaquimrs/terminal-utils.git"
    },
    "split_keywords": [
        "terminal",
        "shell",
        "python",
        "bash",
        "choices",
        "terminal choices"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e7035619469258f2fd71d97c699a8df013d1d713e647187109449776d57a83a3",
                "md5": "18a09db415951764ffc4c1273ee15a92",
                "sha256": "8610e5f437c41bed38d931b98a55e821b5ee2e6f4dc5ee3b9ea3f4ffb0dcf86d"
            },
            "downloads": -1,
            "filename": "ers_terminal_utils-0.0.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "18a09db415951764ffc4c1273ee15a92",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=2.7",
            "size": 9848,
            "upload_time": "2024-02-05T14:27:27",
            "upload_time_iso_8601": "2024-02-05T14:27:27.836703Z",
            "url": "https://files.pythonhosted.org/packages/e7/03/5619469258f2fd71d97c699a8df013d1d713e647187109449776d57a83a3/ers_terminal_utils-0.0.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "709e1b11863631349daa270621048ea22025120a12365d63ab66352f66d63923",
                "md5": "c2e0c2bddc3e624437d59c2e8e55381c",
                "sha256": "b9db69a6e199ada690e3dcfd93a45fee638a3f398f0907221ff539c9bceec286"
            },
            "downloads": -1,
            "filename": "ers-terminal-utils-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c2e0c2bddc3e624437d59c2e8e55381c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.7",
            "size": 8094,
            "upload_time": "2024-02-05T14:27:29",
            "upload_time_iso_8601": "2024-02-05T14:27:29.007817Z",
            "url": "https://files.pythonhosted.org/packages/70/9e/1b11863631349daa270621048ea22025120a12365d63ab66352f66d63923/ers-terminal-utils-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-05 14:27:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "eliaquimrs",
    "github_project": "terminal-utils",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ers-terminal-utils"
}
        
Elapsed time: 0.18311s