<p align="center"><img src="https://raw.githubusercontent.com/rakeshkanna-rk/textPlay/main/textplay_logo.png" alt="TextPlay Logo" width="200"></p>
<br>
<H1 align="center">TextPlay</H1>
**Welcome to the TextPlay repository! 👋**
This versatile Python module provides a range of text-related functions and tools to enhance your text analysis, summarization, translation, Morse code encoding/decoding, Google search, and more.
### To use my module
```bash
pip install textPlay
```
```python
import textPlay
```
## Features
### **🔍 Google Search:** This tool will search Google for a query and display the results. you can specify the number of results to display.
```python
from textPlay import google_search
search_query = "Python programming"
top_results = google_search(search_query, num_results=3)
print(top_results)
```
---
### **📣 Morse Code Encoder/Decoder:** This tool will encode and decode a message using the morse code. It will automatically detect if the input is morse code or text.
```python
from textPlay import morse
morse = Morse()
encoded_text = morse.coder("Hello, World!")
print("Encoded Text:", encoded_text)
decoded_text = morse.decoder(encoded_text)
print("Decoded Text:", decoded_text)
```
---
### **📦 Box:** This tool will print a box with a message and a title with specified length.
```python
from textPlay import box
title = "Title"
content = ["word 1", "word 2"]
width_percentage = 99 # Adjust as needed
box_with_title = create_box(title, content, width_percentage)
print(box_with_title)
```
---
### **🎨 Colors**: This tool will print text in different colors and styles.
```python
from textPlay import colors
print(f"{RED}This is red text{RESET}")
print(f"{BG_GREEN}This has a green background{RESET}")
print(f"{BOLD}This is bold text{RESET}")
```
---
### **📚 Options**: This tool will display a menu with options and handle user input for navigation and selection. Main function to display a menu with options and handle user input for navigation and selection.
```python
from textPlay import options
options(options=[('Option A', lambda: print("Option A selected")),
('Option B', lambda: print("Option B selected")),
('Option C', lambda: print("Option C selected")),
('Option D', lambda: print("Option D selected"))],
index=">",
head="Select an option:",
delay=0.2,
exit_msg="Exiting...")
```
---
### **🔑 Password Generator**: This tool will generate a random password with the specified length.
```python
from textPlay import password_generator
password = password_generator(length=12)
print(password)
```
---
### **🔐 Encryption Animation**: Simulate the encryption process by displaying random special characters before revealing the actual word.
```python
from textPlay import encrypt_animation
encrypted("Hello", sleep_time=0.1, end_color=BLUE, special_characters="!@#$%^&*()_+-=[]{}|;:,.<>?/")
```
---
### **🔃 Loader**: This tool will display a progress bar with a loading animation.
- **Progress Bar**: Simulate and display a progress bar incrementing from 0% to 100%.
```python
from textPlay import ProgressBar
if __name__ == "__main__":
progress_bar = ProgressBar()
try:
progress_bar.start()
time.sleep(3) # Simulate a long-running task
finally:
progress_bar.stop()
```
- **Spinner**: Simulate and display a spinner animation.
```python
from textPlay import Spinner
if __name__ == "__main__":
spinner = Spinner()
try:
spinner.start()
time.sleep(3) # Simulate a long-running task
finally:
spinner.stop()
```
- **Module Compiler**: Simulate and display a module compiling animation with active functioning.
```python
from textPlay import progressCompile
def func1(param1):
time.sleep(1) # Simulate processing
print(f"\nProcessed with param1: {param1}")
def func2(param1, param2):
time.sleep(2) # Simulate processing
print(f"\nProcessed with param1: {param1}, param2: {param2}")
def func3():
time.sleep(1.5) # Simulate processing
print("\nProcessed with no params")
# Example usage with arguments
progressCompile(
"Processing",
["Module A", "Module B", "Module C"],
[func1, func2, func3],
[(42,), ("Hello", "World"), ()]
)
# Example usage without arguments
progressCompile(
"Processing",
["Module D", "Module E", "Module F"],
[func3, func3, func3]
)
```
### **📁 Files**: This tool will list, delete, rename, and move files and folders.
```python
from textPlay import files
files = files.list_dir(USER)
print(files)
```
---
### **🛠️ Backend**: Executes the given command in the background using the subprocess module.
```python
from textPlay import backend
list_dir = backend.backend_exec("ls")
print(list_dir)
```
---
---
- **CLI**: A command line interface (CLI) for textPlay.
**Help**
```bash
textPlay --help
```
or
```bash
textPlay -h
```
To display all the CLI options
---
**Version**
```bash
textPlay --version
```
or
```bash
textPlay -v
```
To display the version of textPlay.
---
**Menu**
```bash
textPlay --menu
```
or
```bash
textPlay -m
```
To display the menu of textPlay.
---
**Contact**
```bash
textPlay --contact
```
or
```bash
textPlay -c
```
To display the contact details of textPlay.
---
**Update**
```bash
textPlay --update
```
or
```bash
textPlay -U
```
To update the textPlay module.
## Installation
To install the TextPlay module, you can download it directly by using `pip`
```bash
pip install textPlay
```
## Module Detials
- **VERSION:** `0.1.4`
- **TITLE:** `textPlay`
- **LICENSE:** `Apache License Version 2.0`
- **AUTHOR:** `Rakesh Kanna S`
- **AUTHOR EMAIL:** [rakeshkanna0108@gmail.com](mailto:rakeshkanna0108@gmail.com)
- **PYPI LIBRARY:** https://pypi.org/project/textPlay
- **GITHUB LIBRARY:** https://github.com/rakeshkanna-rk/textPlay
- **GITHUB PROFILE:** https://github.com/rakeshkanna-rk
Raw data
{
"_id": null,
"home_page": "https://github.com/rakeshkanna-rk/textPlay",
"name": "textPlay",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "text tools, cli, terminal, google search, web search, morse code, decode, encode, box, colors, options, password generator, progress bar, encryption animation, files, backend, source code",
"author": "Rakesh Kanna S",
"author_email": "rakeshkanna0108@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/bb/46/e070fd4f8564d4f36d2b8ee37d3c8267819ba30d3b10e01d0c558fe2dfe6/textplay-1.1.5.tar.gz",
"platform": null,
"description": "<p align=\"center\"><img src=\"https://raw.githubusercontent.com/rakeshkanna-rk/textPlay/main/textplay_logo.png\" alt=\"TextPlay Logo\" width=\"200\"></p>\r\n\r\n<br>\r\n\r\n<H1 align=\"center\">TextPlay</H1>\r\n\r\n**Welcome to the TextPlay repository! \ud83d\udc4b** \r\nThis versatile Python module provides a range of text-related functions and tools to enhance your text analysis, summarization, translation, Morse code encoding/decoding, Google search, and more.\r\n\r\n### To use my module\r\n\r\n```bash\r\npip install textPlay\r\n```\r\n\r\n```python\r\nimport textPlay\r\n```\r\n\r\n## Features\r\n\r\n### **\ud83d\udd0d Google Search:** This tool will search Google for a query and display the results. you can specify the number of results to display.\r\n\r\n```python\r\nfrom textPlay import google_search\r\n\r\nsearch_query = \"Python programming\"\r\ntop_results = google_search(search_query, num_results=3)\r\nprint(top_results)\r\n```\r\n\r\n---\r\n\r\n### **\ud83d\udce3 Morse Code Encoder/Decoder:** This tool will encode and decode a message using the morse code. It will automatically detect if the input is morse code or text.\r\n\r\n```python\r\nfrom textPlay import morse\r\n\r\nmorse = Morse()\r\n\r\nencoded_text = morse.coder(\"Hello, World!\")\r\nprint(\"Encoded Text:\", encoded_text)\r\n\r\ndecoded_text = morse.decoder(encoded_text)\r\nprint(\"Decoded Text:\", decoded_text)\r\n```\r\n\r\n---\r\n\r\n### **\ud83d\udce6 Box:** This tool will print a box with a message and a title with specified length.\r\n\r\n```python\r\nfrom textPlay import box\r\n\r\ntitle = \"Title\"\r\ncontent = [\"word 1\", \"word 2\"]\r\nwidth_percentage = 99 # Adjust as needed\r\nbox_with_title = create_box(title, content, width_percentage)\r\nprint(box_with_title)\r\n```\r\n\r\n---\r\n\r\n### **\ud83c\udfa8 Colors**: This tool will print text in different colors and styles.\r\n\r\n```python\r\nfrom textPlay import colors\r\n\r\nprint(f\"{RED}This is red text{RESET}\")\r\nprint(f\"{BG_GREEN}This has a green background{RESET}\")\r\nprint(f\"{BOLD}This is bold text{RESET}\")\r\n```\r\n\r\n---\r\n\r\n### **\ud83d\udcda Options**: This tool will display a menu with options and handle user input for navigation and selection. Main function to display a menu with options and handle user input for navigation and selection.\r\n\r\n```python\r\nfrom textPlay import options\r\n\r\noptions(options=[('Option A', lambda: print(\"Option A selected\")),\r\n ('Option B', lambda: print(\"Option B selected\")),\r\n ('Option C', lambda: print(\"Option C selected\")),\r\n ('Option D', lambda: print(\"Option D selected\"))],\r\n index=\">\",\r\n head=\"Select an option:\",\r\n delay=0.2,\r\n exit_msg=\"Exiting...\")\r\n```\r\n\r\n---\r\n\r\n### **\ud83d\udd11 Password Generator**: This tool will generate a random password with the specified length.\r\n\r\n```python\r\nfrom textPlay import password_generator\r\n\r\npassword = password_generator(length=12)\r\nprint(password)\r\n```\r\n\r\n---\r\n\r\n### **\ud83d\udd10 Encryption Animation**: Simulate the encryption process by displaying random special characters before revealing the actual word.\r\n\r\n```python\r\nfrom textPlay import encrypt_animation\r\n\r\nencrypted(\"Hello\", sleep_time=0.1, end_color=BLUE, special_characters=\"!@#$%^&*()_+-=[]{}|;:,.<>?/\")\r\n```\r\n\r\n---\r\n\r\n### **\ud83d\udd03 Loader**: This tool will display a progress bar with a loading animation.\r\n\r\n- **Progress Bar**: Simulate and display a progress bar incrementing from 0% to 100%.\r\n\r\n```python\r\nfrom textPlay import ProgressBar\r\n\r\nif __name__ == \"__main__\":\r\n progress_bar = ProgressBar()\r\n try:\r\n progress_bar.start()\r\n time.sleep(3) # Simulate a long-running task\r\n finally:\r\n progress_bar.stop()\r\n```\r\n\r\n- **Spinner**: Simulate and display a spinner animation.\r\n\r\n```python\r\nfrom textPlay import Spinner\r\n\r\nif __name__ == \"__main__\":\r\n spinner = Spinner()\r\n try:\r\n spinner.start()\r\n time.sleep(3) # Simulate a long-running task\r\n finally:\r\n spinner.stop()\r\n```\r\n\r\n- **Module Compiler**: Simulate and display a module compiling animation with active functioning.\r\n\r\n```python\r\nfrom textPlay import progressCompile\r\n\r\ndef func1(param1):\r\n time.sleep(1) # Simulate processing\r\n print(f\"\\nProcessed with param1: {param1}\")\r\n\r\ndef func2(param1, param2):\r\n time.sleep(2) # Simulate processing\r\n print(f\"\\nProcessed with param1: {param1}, param2: {param2}\")\r\n\r\ndef func3():\r\n time.sleep(1.5) # Simulate processing\r\n print(\"\\nProcessed with no params\")\r\n\r\n\r\n# Example usage with arguments\r\nprogressCompile(\r\n \"Processing\",\r\n [\"Module A\", \"Module B\", \"Module C\"],\r\n [func1, func2, func3],\r\n [(42,), (\"Hello\", \"World\"), ()]\r\n)\r\n\r\n# Example usage without arguments\r\nprogressCompile(\r\n \"Processing\",\r\n [\"Module D\", \"Module E\", \"Module F\"],\r\n [func3, func3, func3]\r\n)\r\n```\r\n\r\n### **\ud83d\udcc1 Files**: This tool will list, delete, rename, and move files and folders.\r\n\r\n```python\r\nfrom textPlay import files\r\n\r\nfiles = files.list_dir(USER)\r\nprint(files)\r\n```\r\n\r\n---\r\n\r\n### **\ud83d\udee0\ufe0f Backend**: Executes the given command in the background using the subprocess module.\r\n\r\n```python\r\nfrom textPlay import backend\r\n\r\nlist_dir = backend.backend_exec(\"ls\")\r\nprint(list_dir)\r\n```\r\n\r\n---\r\n\r\n---\r\n\r\n- **CLI**: A command line interface (CLI) for textPlay.\r\n\r\n**Help**\r\n\r\n```bash\r\ntextPlay --help\r\n```\r\n\r\nor\r\n\r\n```bash\r\ntextPlay -h\r\n```\r\n\r\nTo display all the CLI options\r\n\r\n---\r\n\r\n**Version**\r\n\r\n```bash\r\ntextPlay --version\r\n```\r\n\r\nor\r\n\r\n```bash\r\ntextPlay -v\r\n```\r\n\r\nTo display the version of textPlay.\r\n\r\n---\r\n\r\n**Menu**\r\n\r\n```bash\r\ntextPlay --menu\r\n```\r\n\r\nor\r\n\r\n```bash\r\ntextPlay -m\r\n```\r\n\r\nTo display the menu of textPlay.\r\n\r\n---\r\n\r\n**Contact**\r\n\r\n```bash\r\ntextPlay --contact\r\n```\r\n\r\nor\r\n\r\n```bash\r\ntextPlay -c\r\n```\r\n\r\nTo display the contact details of textPlay.\r\n\r\n---\r\n\r\n**Update**\r\n\r\n```bash\r\ntextPlay --update\r\n```\r\n\r\nor\r\n\r\n```bash\r\ntextPlay -U\r\n```\r\n\r\nTo update the textPlay module.\r\n\r\n## Installation\r\n\r\nTo install the TextPlay module, you can download it directly by using `pip`\r\n\r\n```bash\r\npip install textPlay\r\n```\r\n\r\n## Module Detials\r\n\r\n- **VERSION:** `0.1.4`\r\n- **TITLE:** `textPlay`\r\n- **LICENSE:** `Apache License Version 2.0`\r\n- **AUTHOR:** `Rakesh Kanna S`\r\n- **AUTHOR EMAIL:** [rakeshkanna0108@gmail.com](mailto:rakeshkanna0108@gmail.com)\r\n- **PYPI LIBRARY:** https://pypi.org/project/textPlay\r\n- **GITHUB LIBRARY:** https://github.com/rakeshkanna-rk/textPlay\r\n- **GITHUB PROFILE:** https://github.com/rakeshkanna-rk\r\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "A package for many unique text tools, to make your text beautiful.",
"version": "1.1.5",
"project_urls": {
"GitHub": "https://github.com/rakeshkanna-rk/textPlay",
"Homepage": "https://github.com/rakeshkanna-rk/textPlay",
"Python Package Index": "https://pypi.org/project/textPlay/"
},
"split_keywords": [
"text tools",
" cli",
" terminal",
" google search",
" web search",
" morse code",
" decode",
" encode",
" box",
" colors",
" options",
" password generator",
" progress bar",
" encryption animation",
" files",
" backend",
" source code"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "aeb99e5cc8c2534f8dfd8e28e271b7431b3c6e5f2185b28929b87afc5c1ea868",
"md5": "fb3589ae224cbc8211f1f3d3e0b76e9f",
"sha256": "7be5610dab5a249c7acecaaf4b7a08acab3f4dc6c3dd0319b511ffde26de044b"
},
"downloads": -1,
"filename": "textPlay-1.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fb3589ae224cbc8211f1f3d3e0b76e9f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 34555,
"upload_time": "2025-01-15T15:10:09",
"upload_time_iso_8601": "2025-01-15T15:10:09.083375Z",
"url": "https://files.pythonhosted.org/packages/ae/b9/9e5cc8c2534f8dfd8e28e271b7431b3c6e5f2185b28929b87afc5c1ea868/textPlay-1.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bb46e070fd4f8564d4f36d2b8ee37d3c8267819ba30d3b10e01d0c558fe2dfe6",
"md5": "1bad3d05ca77bddb7ec7c73000f817c4",
"sha256": "1abdd6022701fec8f566edfb19d0bec9041af90e03b113516b3eede95de725b9"
},
"downloads": -1,
"filename": "textplay-1.1.5.tar.gz",
"has_sig": false,
"md5_digest": "1bad3d05ca77bddb7ec7c73000f817c4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 22285,
"upload_time": "2025-01-15T15:10:13",
"upload_time_iso_8601": "2025-01-15T15:10:13.989591Z",
"url": "https://files.pythonhosted.org/packages/bb/46/e070fd4f8564d4f36d2b8ee37d3c8267819ba30d3b10e01d0c558fe2dfe6/textplay-1.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-15 15:10:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "rakeshkanna-rk",
"github_project": "textPlay",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "beautifulsoup4",
"specs": [
[
">=",
"4.12.3"
]
]
},
{
"name": "requests",
"specs": [
[
">=",
"2.31.0"
]
]
},
{
"name": "keyboard",
"specs": [
[
">=",
"0.13.5"
]
]
}
],
"lcname": "textplay"
}