Metadata-Version: 2.4
Name: cozy-kit
Version: 0.2.7
Summary: The basic library for coding
Author: youssefahmed2017
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# cozy-kit

> A cozy Python package with greetings, quotes, bedtime stories, timers, and text utilities.

Created by **Youssef**

---

# Features

<details>
<summary>Open Section</summary>

## Greeting
- Welcome messages
- Goodbye messages
- Morning greetings
- Afternoon greetings
- Evening greetings
- Bedtime stories
- Motivational quotes
- Fun facts
- Automatic greetings based on time & season

## Timer
- Countdown timers
- Pomodoro timers
- Stopwatch support
- Time waiting utilities
- Current time utilities

## TextStudio
- Morse code conversion
- Caesar cipher
- Text formatting utilities
- Word & character counting
- Punctuation removal
- Snake case conversion
- Letter spacing utilities

</details>

---

# Requirements

- Python +3.11

---

# Installation

## Install

```bash
pip install cozy-kit
```

## Upgrade

```bash
pip install --upgrade cozy-kit
```

---

# Quick Example

```python
from cozy_kit import Greeting

user = Greeting(
    name="Youssef",
    nickname="Yoyo"
)

print(user.welcome())
```

## Output

```text
Welcome Youssef!
Or welcome Yoyo!
```

---

# Greeting Class

## Import

```python
from cozy_kit import Greeting
```

## Create an object

```python
person = Greeting(
    name='Example',
    age=12,
    gender='male',
    nickname='Example.Nickname'
)
```

---

## Available Functions

| Function           | Description                      |
|--------------------|----------------------------------|
| `welcome()`        | Welcomes the user                |
| `bye(destination)` | Says goodbye                     |
| `good_morning()`   | Returns a morning quote          |
| `good_afternoon()` | Returns an afternoon quote       |
| `good_evening()`   | Returns an evening quote         |
| `good_night()`     | Returns a bedtime story          |
| `auto_greet()`     | Automatically selects a greeting |
| `motivate()`       | Returns a motivational quote     |
| `fun_facts()`      | Returns a random fun fact        |

---

# Greeting Examples

## Usage

```python
from cozy_kit import Greeting

user = Greeting(
    name="youssef",
    age=16,
    gender="male",
    nickname="joe"
)

print(user.welcome())

print(user.bye("school"))

print(user.good_morning())

print(user.fun_facts())

print(user.auto_greet())
```

---

## Example Output

### welcome()

```text
Welcome Youssef!
Or welcome Joe!
```

### bye()

```text
Bye Youssef! Have a nice day at school!
Or bye Joe!
```

### good_morning()

```text
Good Morning Youssef!
Or good morning Joe!

Anyways, here's a quick morning quote.

Albert Einstein

Life is like riding a bicycle.
To keep your balance, you must keep moving.
```

### fun_facts()

```text
Space Facts

A day on Venus is longer than a year on Venus.
```

### auto_greet()

```text
Good Afternoon Youssef!
Or good afternoon Joe!

Steve Jobs

The only way to do great work is to love what you do.
```

---

# Timer Class

## Import

```python
from cozy_kit import Timer
```

## Create an object

```python
timer = Timer()
```

---

## Available Functions

| Function                                                 | Description                    |
|----------------------------------------------------------|--------------------------------|
| `countdown(count, time_type, show)`                      | Starts a countdown             |
| `pomodoro(work_time, break_time, long_break_time, show)` | Starts a Pomodoro timer        |
| `wait(count, time_type)`                                 | Sleeps for a specific duration |
| `get_time()`                                             | Returns the current time       |
| `start_stopwatch()`                                      | Starts the stopwatch           |
| `end_stopwatch()`                                        | Stops the stopwatch            |

---

## Supported Time Types

| Type   | Meaning |
|--------|---------|
| `sec`  | Seconds |
| `min`  | Minutes |
| `hour` | Hours   |

---

# Countdown Example

## Usage

```python
from cozy_kit import Timer

timer = Timer()

timer.countdown(
    count=5,
    time_type='sec',
    show=print
)
```

## Output

```text
00:05
00:04
00:03
00:02
00:01
⏰ Time's up!
```

---

# Stopwatch Example

## Usage

```python
from cozy_kit import Timer
import time

timer = Timer()

timer.start_stopwatch()

time.sleep(3)

elapsed = timer.end_stopwatch()

print(elapsed)
```

## Output

```text
0:00:03.002194
```

---

# Wait Example

## Usage

```python
from cozy_kit import Timer

timer = Timer()

print("Waiting...")

timer.wait(3, "sec")

print("Done!")
```

## Output

```text
Waiting...
Done!
```

---

# Pomodoro Example

## Usage

```python
from cozy_kit import Timer

timer = Timer()

timer.pomodoro(
    work_time=1,
    break_time=1,
    long_break_time=2,
    show=print
)
```

## Output

```text
💻 Work Time
01:00
...

☕ Short Break Time
01:00
...

💻 Work Time
01:00
...

⏰ Long Break Time
02:00
...
```

---

# TextStudio Class

## Import

```python
from cozy_kit import TextStudio
```

## Create an object

```python
text_editor = TextStudio()
```

---

## Available Functions

| Function                                 | Description                     |
|------------------------------------------|---------------------------------|
| `to_morse(text)`                         | Converts text to Morse code     |
| `to_upper(text)`                         | Converts text to uppercase      |
| `to_title(text)`                         | Converts text to title case     |
| `to_lower(text)`                         | Converts text to lowercase      |
| `space_out_letters(text)`                | Adds spaces between letters     |
| `replace_with_spaces(text, replacement)` | Replaces characters with spaces |
| `caesar(text, shift)`                    | Caesar cipher encryption        |
| `reverse(text)`                          | Reverses text                   |
| `word_count(text)`                       | Counts words                    |
| `char_count(text)`                       | Counts characters               |
| `remove_spaces(text)`                    | Removes spaces                  |
| `snake(text)`                            | Converts text to snake_case     |
| `remove_punctuation(text)`               | Removes punctuation             |

---

# TextStudio Example

## Usage

```python
from cozy_kit import TextStudio

studio = TextStudio()

text = "Hello World"

print(studio.to_upper(text))
print(studio.to_lower(text))
print(studio.to_title(text))
print(studio.reverse(text))
print(studio.snake(text))
print(studio.space_out_letters(text))
print(studio.to_morse(text))
print(studio.caesar(text, 3))
print(studio.word_count(text))
print(studio.char_count(text))
print(studio.remove_spaces(text))
print(studio.remove_punctuation("Hello, World!"))
```

---

## Output

### to_upper()

```text
HELLO WORLD
```

### to_lower()

```text
hello world
```

### reverse()

```text
dlroW olleH
```

### snake()

```text
hello_world
```

### space_out_letters()

```text
H e l l o   W o r l d
```

### to_morse()

```text
.... . .-.. .-.. --- / .-- --- .-. .-.. -..
```

### caesar()

```text
Khoor Zruog
```

### word_count()

```text
2
```

### char_count()

```text
11
```

### remove_spaces()

```text
HelloWorld
```

### remove_punctuation()

```text
Hello World
```

---

# Full Package Example

<details>
<summary>Open Full Example</summary>

# Usage

```python
from cozy_kit import Greeting, Timer, TextStudio
import time

# Greeting
user = Greeting(
    name="Youssef",
    age=16,
    gender="male",
    nickname="Yoyo"
)

print(user.welcome())
print(user.good_morning())
print(user.fun_facts())

# TextStudio
studio = TextStudio()

text = "Hello World"

print(studio.to_upper(text))
print(studio.reverse(text))
print(studio.to_morse(text))
print(studio.caesar(text, 3))

# Timer
timer = Timer()

timer.countdown(
    count=5,
    time_type='sec',
    show=print
)

timer.start_stopwatch()

time.sleep(2)

print(timer.end_stopwatch())
```

---

# Example Output

```text
Welcome Youssef!
Or welcome Yoyo!

Good Morning Youssef!
Or good morning Yoyo!

Anyways, here's a quick morning quote.

Albert Einstein

Life is like riding a bicycle.
To keep your balance, you must keep moving.

Space Facts

A day on Venus is longer than a year on Venus.

HELLO WORLD

dlroW olleH

.... . .-.. .-.. --- / .-- --- .-. .-.. -..

Khoor Zruog

00:05
00:04
00:03
00:02
00:01

⏰ Time's up!

0:00:02.001392
```

</details>

---

# Notes

- `show` parameters can use:
  - `print`
  - Tkinter labels
  - logging functions
  - speech engines
  - custom output systems

---

