TextPlay
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
pip install textPlay
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.
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.
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.
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.
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.
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.
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.
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%.
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.
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.
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.
from textPlay import files
files = files.list_dir(USER)
print(files)
🛠️ Backend: Executes the given command in the background using the subprocess module.
from textPlay import backend
list_dir = backend.backend_exec("ls")
print(list_dir)
- CLI: A command line interface (CLI) for textPlay.
Help
textPlay --help
or
textPlay -h
To display all the CLI options
Version
textPlay --version
or
textPlay -v
To display the version of textPlay.
Menu
textPlay --menu
or
textPlay -m
To display the menu of textPlay.
Contact
textPlay --contact
or
textPlay -c
To display the contact details of textPlay.
Update
textPlay --update
or
textPlay -U
To update the textPlay module.
Installation
To install the TextPlay module, you can download it directly by using pip
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
- PYPI LIBRARY: https://pypi.org/project/textPlay
- GITHUB LIBRARY: https://github.com/rakeshkanna-rk/textPlay
- GITHUB PROFILE: https://github.com/rakeshkanna-rk
Metadata
Release files for textPlay 1.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| textplay-1.1.5.tar.gz | 22.3 kB | Without provenance | Details for textplay-1.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| textPlay-1.1.5-py3-none-any.whl | Python 3 | none | any | Details for textPlay-1.1.5-py3-none-any.whl |
Total release size: 56.8 kB
Release files / textplay-1.1.5.tar.gz
| Download URL | textplay-1.1.5.tar.gz |
|---|---|
| Size | 22.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1abdd6022701fec8f566edfb19d0bec9041af90e03b113516b3eede95de725b9
|
|
BLAKE2b-256 checksum How to use checksums |
bb46e070fd4f8564d4f36d2b8ee37d3c8267819ba30d3b10e01d0c558fe2dfe6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.2
|
Release files / textPlay-1.1.5-py3-none-any.whl
| Download URL | textPlay-1.1.5-py3-none-any.whl |
|---|---|
| Size | 34.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7be5610dab5a249c7acecaaf4b7a08acab3f4dc6c3dd0319b511ffde26de044b
|
|
BLAKE2b-256 checksum How to use checksums |
aeb99e5cc8c2534f8dfd8e28e271b7431b3c6e5f2185b28929b87afc5c1ea868
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.2
|
Security for textPlay 1.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.