semvec/pypi-packages huggingface dataset:
friendly-hash 0.1.1
A tool to rename files with human-readable hashes
Requires Python: >=3.6

# friendly_hash

A tool to rename files with human-readable hashes.

## Installation

```sh
pip3 install friendly_hash
```

add `export PATH=$PATH:~/.local/bin` to your .bashrc or .zshrc

## Usage

To show the resulting filename:
```sh
friendly_hash 2024-07-05-09-15-18.bag
# peaceful-week-2024-07-05-09-15-18.bag
```

To actually rename the file:
```sh
friendly_hash -f 2024-07-05-09-15-18.bag
# peaceful-week-2024-07-05-09-15-18.bag
```

## For Developer

1. **Install the package**:
    ```sh
    pip3 install -r requirements.txt
    pip3 install .
    ```
2. **Run the script** to show the resulting filename:
    ```sh
    friendly_hash 2024-07-05-09-15-18.bag
    ```
3. **Run the script** to rename the file:
    ```sh
    friendly_hash -f 2024-07-05-09-15-18.bag
    ```

4. **Run tests**:
    ```sh
    python -m unittest discover
    ```
 5. **Build Package**:
    ```sh
    pip3 install setuptools wheel
    python3 setup.py sdist bdist_wheel
    pip3 install twine
    twine upload dist/*
    ```
smtp-emailer 6.0.0
Simple utility for sending emails via SMTP.
Requires Python: >=3.9

# smtp-emailer

This is a Python package that provides the function `send`:

    def send(
        host,
        port,
        username,
        password,
        sender,
        recipient,
        subject,
        html,
        attachments=[]
    ):
        msg = MIMEMultipart()
        msg['From'] = sender
        msg['To'] = recipient
        msg['Date'] = formatdate(localtime=True)
        msg['Subject'] = subject
        msg.attach(MIMEText(html, 'html'))
        for attachment in attachments:
            msg.attach(attachment)
        # Send it off via smtp.mail.me.com
        context = create_default_context()
        with SMTP(host, port) as smtp:
            smtp.starttls(context=context)
            smtp.login(username, password)
            smtp.sendmail(sender, recipient, msg.as_string())

## Installation

    pip install smtp-emailer

## Usage

    from email.mime.application import MIMEApplication
    from smtp_emailer import send

    attachment = MIMEApplication(b"File contents", name="filename.txt")
    attachment['Content-Disposition'] = 'attachment; filename="filename.txt"'

    send(
        "smtp.mail.me.com",
        587,
        "username@icloud.com",
        "<app-specific password>",
        "Service Name <no-reply@example.org>",
        "Recipient Name <recipient@example.org>",
        "Re: Example Subject",
        "<h1>Example email</h1><p>This is an example email.</p>",
        [attachment],
    )