phi-hippo 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- phi_hippo/__init__.py +12 -0
- phi_hippo/cli.py +66 -0
- phi_hippo/colors.py +42 -0
- phi_hippo/greetings.py +131 -0
- phi_hippo-0.1.0.dist-info/METADATA +93 -0
- phi_hippo-0.1.0.dist-info/RECORD +10 -0
- phi_hippo-0.1.0.dist-info/WHEEL +5 -0
- phi_hippo-0.1.0.dist-info/entry_points.txt +2 -0
- phi_hippo-0.1.0.dist-info/licenses/LICENSE +21 -0
- phi_hippo-0.1.0.dist-info/top_level.txt +1 -0
phi_hippo/__init__.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""
|
|
2
|
+
phi_hippo - A fun greeting utility package.
|
|
3
|
+
|
|
4
|
+
Generate personalized greetings, motivational quotes, and ASCII art banners.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from .greetings import greet, motivate, banner, random_greeting
|
|
8
|
+
from .colors import colorize
|
|
9
|
+
|
|
10
|
+
__version__ = "0.1.0"
|
|
11
|
+
__author__ = "Your Name"
|
|
12
|
+
__all__ = ["greet", "motivate", "banner", "random_greeting", "colorize"]
|
phi_hippo/cli.py
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""Command-line interface for phi_hippo."""
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
from . import greet, motivate, banner, colorize, __version__
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def main():
|
|
8
|
+
"""Entry point for the phi_hippo CLI."""
|
|
9
|
+
parser = argparse.ArgumentParser(
|
|
10
|
+
prog="phi_hippo",
|
|
11
|
+
description="🎉 phi_hippo - Generate fun greetings from your terminal!",
|
|
12
|
+
)
|
|
13
|
+
parser.add_argument(
|
|
14
|
+
"-v", "--version", action="version", version=f"phi_hippo {__version__}"
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
subparsers = parser.add_subparsers(dest="command", help="Available commands")
|
|
18
|
+
|
|
19
|
+
# greet command
|
|
20
|
+
greet_parser = subparsers.add_parser("hello", help="Greet someone")
|
|
21
|
+
greet_parser.add_argument("name", help="Name of the person to greet")
|
|
22
|
+
greet_parser.add_argument(
|
|
23
|
+
"-s",
|
|
24
|
+
"--style",
|
|
25
|
+
choices=["friendly", "formal", "enthusiastic", "pirate"],
|
|
26
|
+
default="friendly",
|
|
27
|
+
help="Greeting style (default: friendly)",
|
|
28
|
+
)
|
|
29
|
+
greet_parser.add_argument(
|
|
30
|
+
"-c", "--color", default=None, help="Colorize the output"
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
# motivate command
|
|
34
|
+
subparsers.add_parser("motivate", help="Get a motivational quote")
|
|
35
|
+
|
|
36
|
+
# banner command
|
|
37
|
+
banner_parser = subparsers.add_parser("banner", help="Create an ASCII banner")
|
|
38
|
+
banner_parser.add_argument("text", help="Text for the banner")
|
|
39
|
+
banner_parser.add_argument(
|
|
40
|
+
"-w", "--width", type=int, default=50, help="Banner width (default: 50)"
|
|
41
|
+
)
|
|
42
|
+
banner_parser.add_argument(
|
|
43
|
+
"--char", default="=", help="Border character (default: =)"
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
args = parser.parse_args()
|
|
47
|
+
|
|
48
|
+
if args.command is None:
|
|
49
|
+
parser.print_help()
|
|
50
|
+
return
|
|
51
|
+
|
|
52
|
+
if args.command == "hello":
|
|
53
|
+
result = greet(args.name, args.style)
|
|
54
|
+
if args.color:
|
|
55
|
+
result = colorize(result, args.color)
|
|
56
|
+
print(result)
|
|
57
|
+
|
|
58
|
+
elif args.command == "motivate":
|
|
59
|
+
print(motivate())
|
|
60
|
+
|
|
61
|
+
elif args.command == "banner":
|
|
62
|
+
print(banner(args.text, char=args.char, width=args.width))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
if __name__ == "__main__":
|
|
66
|
+
main()
|
phi_hippo/colors.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""Terminal color utilities for greetify."""
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# ANSI escape codes for terminal colors
|
|
5
|
+
COLORS = {
|
|
6
|
+
"red": "\033[91m",
|
|
7
|
+
"green": "\033[92m",
|
|
8
|
+
"yellow": "\033[93m",
|
|
9
|
+
"blue": "\033[94m",
|
|
10
|
+
"magenta": "\033[95m",
|
|
11
|
+
"cyan": "\033[96m",
|
|
12
|
+
"white": "\033[97m",
|
|
13
|
+
"reset": "\033[0m",
|
|
14
|
+
"bold": "\033[1m",
|
|
15
|
+
"dim": "\033[2m",
|
|
16
|
+
"underline": "\033[4m",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def colorize(text: str, color: str = "green", bold: bool = False) -> str:
|
|
21
|
+
"""
|
|
22
|
+
Add terminal color to text using ANSI escape codes.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
text: The text to colorize.
|
|
26
|
+
color: The color name. Options: red, green, yellow, blue, magenta, cyan, white.
|
|
27
|
+
bold: If True, make the text bold.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
The text wrapped in ANSI color codes.
|
|
31
|
+
|
|
32
|
+
Example:
|
|
33
|
+
>>> from greetify import colorize
|
|
34
|
+
>>> print(colorize("Hello!", "cyan", bold=True))
|
|
35
|
+
"""
|
|
36
|
+
if color not in COLORS:
|
|
37
|
+
raise ValueError(
|
|
38
|
+
f"Unknown color '{color}'. Choose from: {', '.join(c for c in COLORS if c not in ('reset', 'bold', 'dim', 'underline'))}"
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
prefix = COLORS.get("bold", "") if bold else ""
|
|
42
|
+
return f"{prefix}{COLORS[color]}{text}{COLORS['reset']}"
|
phi_hippo/greetings.py
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"""Core greeting functions for the greetify package."""
|
|
2
|
+
|
|
3
|
+
import random
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def greet(name: str, style: str = "friendly") -> str:
|
|
8
|
+
"""
|
|
9
|
+
Generate a personalized greeting.
|
|
10
|
+
|
|
11
|
+
Args:
|
|
12
|
+
name: The name of the person to greet.
|
|
13
|
+
style: The style of greeting. Options: 'friendly', 'formal', 'enthusiastic', 'pirate'.
|
|
14
|
+
|
|
15
|
+
Returns:
|
|
16
|
+
A greeting string.
|
|
17
|
+
|
|
18
|
+
Example:
|
|
19
|
+
>>> from greetify import greet
|
|
20
|
+
>>> greet("Alice")
|
|
21
|
+
'Hey Alice! 👋 Hope you're having an awesome day!'
|
|
22
|
+
"""
|
|
23
|
+
styles = {
|
|
24
|
+
"friendly": f"Hey {name}! 👋 Hope you're having an awesome day!",
|
|
25
|
+
"formal": f"Good day, {name}. It is a pleasure to make your acquaintance.",
|
|
26
|
+
"enthusiastic": f"OMG {name}!!! 🎉🎉🎉 SO GREAT TO SEE YOU!!!",
|
|
27
|
+
"pirate": f"Ahoy, {name}! 🏴☠️ Welcome aboard, ye scallywag!",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if style not in styles:
|
|
31
|
+
raise ValueError(
|
|
32
|
+
f"Unknown style '{style}'. Choose from: {', '.join(styles.keys())}"
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
return styles[style]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def random_greeting(name: str) -> str:
|
|
39
|
+
"""
|
|
40
|
+
Generate a random-style greeting.
|
|
41
|
+
|
|
42
|
+
Args:
|
|
43
|
+
name: The name of the person to greet.
|
|
44
|
+
|
|
45
|
+
Returns:
|
|
46
|
+
A randomly styled greeting string.
|
|
47
|
+
"""
|
|
48
|
+
style = random.choice(["friendly", "formal", "enthusiastic", "pirate"])
|
|
49
|
+
return greet(name, style)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def motivate() -> str:
|
|
53
|
+
"""
|
|
54
|
+
Get a random motivational quote.
|
|
55
|
+
|
|
56
|
+
Returns:
|
|
57
|
+
A motivational quote string.
|
|
58
|
+
|
|
59
|
+
Example:
|
|
60
|
+
>>> from greetify import motivate
|
|
61
|
+
>>> print(motivate())
|
|
62
|
+
"""
|
|
63
|
+
quotes = [
|
|
64
|
+
"🚀 You're capable of amazing things!",
|
|
65
|
+
"💪 Every expert was once a beginner. Keep going!",
|
|
66
|
+
"🌟 The only limit is the one you set yourself.",
|
|
67
|
+
"🔥 Code like nobody's watching, deploy like everybody is.",
|
|
68
|
+
"✨ Bugs are just features waiting to be understood.",
|
|
69
|
+
"🎯 One commit at a time, you'll build something incredible.",
|
|
70
|
+
"🧠 Your potential is infinite. Compile and run!",
|
|
71
|
+
"🌈 Every error message is a step closer to success.",
|
|
72
|
+
]
|
|
73
|
+
return random.choice(quotes)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def banner(text: str, char: str = "=", width: int = 50) -> str:
|
|
77
|
+
"""
|
|
78
|
+
Create an ASCII art banner around text.
|
|
79
|
+
|
|
80
|
+
Args:
|
|
81
|
+
text: The text to display in the banner.
|
|
82
|
+
char: The character to use for the border (default: '=').
|
|
83
|
+
width: The width of the banner (default: 50).
|
|
84
|
+
|
|
85
|
+
Returns:
|
|
86
|
+
A formatted banner string.
|
|
87
|
+
|
|
88
|
+
Example:
|
|
89
|
+
>>> from greetify import banner
|
|
90
|
+
>>> print(banner("Hello World"))
|
|
91
|
+
"""
|
|
92
|
+
if width < len(text) + 4:
|
|
93
|
+
width = len(text) + 4
|
|
94
|
+
|
|
95
|
+
border = char * width
|
|
96
|
+
padding = width - 2
|
|
97
|
+
centered_text = text.center(padding)
|
|
98
|
+
|
|
99
|
+
return f"""
|
|
100
|
+
{border}
|
|
101
|
+
{char}{centered_text}{char}
|
|
102
|
+
{border}
|
|
103
|
+
""".strip()
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def time_greeting(name: str) -> str:
|
|
107
|
+
"""
|
|
108
|
+
Generate a time-appropriate greeting.
|
|
109
|
+
|
|
110
|
+
Args:
|
|
111
|
+
name: The name of the person to greet.
|
|
112
|
+
|
|
113
|
+
Returns:
|
|
114
|
+
A greeting based on the current time of day.
|
|
115
|
+
"""
|
|
116
|
+
hour = datetime.now().hour
|
|
117
|
+
|
|
118
|
+
if 5 <= hour < 12:
|
|
119
|
+
period = "Good morning"
|
|
120
|
+
emoji = "🌅"
|
|
121
|
+
elif 12 <= hour < 17:
|
|
122
|
+
period = "Good afternoon"
|
|
123
|
+
emoji = "☀️"
|
|
124
|
+
elif 17 <= hour < 21:
|
|
125
|
+
period = "Good evening"
|
|
126
|
+
emoji = "🌆"
|
|
127
|
+
else:
|
|
128
|
+
period = "Hello, night owl"
|
|
129
|
+
emoji = "🌙"
|
|
130
|
+
|
|
131
|
+
return f"{emoji} {period}, {name}!"
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: phi_hippo
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A fun greeting utility — generate personalized greetings, motivational quotes, and ASCII banners!
|
|
5
|
+
Author-email: Your Name <your.email@example.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/yourusername/phi_hippo
|
|
8
|
+
Project-URL: Issues, https://github.com/yourusername/phi_hippo/issues
|
|
9
|
+
Keywords: greetings,fun,cli,utility,motivation
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Utilities
|
|
20
|
+
Requires-Python: >=3.8
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
|
|
25
|
+
# 🦛 phi_hippo
|
|
26
|
+
|
|
27
|
+
A fun Python package that generates personalized greetings, motivational quotes, and ASCII art banners!
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install phi_hippo
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
### Python API
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from phi_hippo import greet, motivate, banner, colorize
|
|
41
|
+
|
|
42
|
+
# Generate a greeting
|
|
43
|
+
print(greet("Alice"))
|
|
44
|
+
# Hey Alice! 👋 Hope you're having an awesome day!
|
|
45
|
+
|
|
46
|
+
# Try different styles
|
|
47
|
+
print(greet("Bob", style="pirate"))
|
|
48
|
+
# Ahoy, Bob! 🏴☠️ Welcome aboard, ye scallywag!
|
|
49
|
+
|
|
50
|
+
# Get motivated
|
|
51
|
+
print(motivate())
|
|
52
|
+
# 🚀 You're capable of amazing things!
|
|
53
|
+
|
|
54
|
+
# Create a banner
|
|
55
|
+
print(banner("Hello World"))
|
|
56
|
+
# ==================================================
|
|
57
|
+
# = Hello World =
|
|
58
|
+
# ==================================================
|
|
59
|
+
|
|
60
|
+
# Add color to terminal output
|
|
61
|
+
print(colorize("Success!", "green", bold=True))
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Command Line
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Greet someone
|
|
68
|
+
phi_hippo hello Alice
|
|
69
|
+
phi_hippo hello Bob --style pirate --color cyan
|
|
70
|
+
|
|
71
|
+
# Get a motivational quote
|
|
72
|
+
phi_hippo motivate
|
|
73
|
+
|
|
74
|
+
# Create a banner
|
|
75
|
+
phi_hippo banner "My Project" --width 60 --char "*"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Available Greeting Styles
|
|
79
|
+
|
|
80
|
+
| Style | Example |
|
|
81
|
+
|----------------|------------------------------------------------------|
|
|
82
|
+
| `friendly` | Hey Alice! 👋 Hope you're having an awesome day! |
|
|
83
|
+
| `formal` | Good day, Alice. It is a pleasure to make your acquaintance. |
|
|
84
|
+
| `enthusiastic` | OMG Alice!!! 🎉🎉🎉 SO GREAT TO SEE YOU!!! |
|
|
85
|
+
| `pirate` | Ahoy, Alice! 🏴☠️ Welcome aboard, ye scallywag! |
|
|
86
|
+
|
|
87
|
+
## Available Colors
|
|
88
|
+
|
|
89
|
+
`red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`
|
|
90
|
+
|
|
91
|
+
## License
|
|
92
|
+
|
|
93
|
+
MIT License — see [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
phi_hippo/__init__.py,sha256=Sy3kbrW6V7jO80ztlHpAhEEOls_OfkwvMwBNjEfgyg0,345
|
|
2
|
+
phi_hippo/cli.py,sha256=TDApmibjiGIdMGsn9PNByrIyvR6ca1MYRDNorgSn7sQ,1991
|
|
3
|
+
phi_hippo/colors.py,sha256=S9ceGODOYrvLFMf1QSpHJDIZXQgttIYV4RxiPE32NTU,1182
|
|
4
|
+
phi_hippo/greetings.py,sha256=TYsuEruTmwbjX1dOags8UF9M2cTvyFM6gTBNNRe3NgY,3432
|
|
5
|
+
phi_hippo-0.1.0.dist-info/licenses/LICENSE,sha256=v2spsd7N1pKFFh2G8wGP_45iwe5S0DYiJzG4im8Rupc,1066
|
|
6
|
+
phi_hippo-0.1.0.dist-info/METADATA,sha256=EnERy0WBCv1zedXM5Kw8OIg6R6lN5jX91DrPy46YUEw,2812
|
|
7
|
+
phi_hippo-0.1.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
8
|
+
phi_hippo-0.1.0.dist-info/entry_points.txt,sha256=rgIbrtsHBChrMSD5k33bB0u0RPOhixGxDdO0qILcd1g,49
|
|
9
|
+
phi_hippo-0.1.0.dist-info/top_level.txt,sha256=z0Z6UXhZKQWL24XdSt2Ly9P7byZaBJZc-2_RMyho3Hk,10
|
|
10
|
+
phi_hippo-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Your Name
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
phi_hippo
|