Metadata-Version: 2.4
Name: chatmail2mastodon
Version: 0.9.1
Summary: Mastodon/DeltaChat bridge
Author-email: adbenitez <adb@arcanechat.me>
Project-URL: Homepage, https://github.com/deltachat-bot/chatmail2mastodon
Keywords: deltachat,bot,mastodon,chatmail
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: deltabot-cli<9.0,>=8.1.0
Requires-Dist: Mastodon.py>=2.1.4
Requires-Dist: html2text>=2025.4.15
Requires-Dist: beautifulsoup4<5.0,>=4.14.2
Requires-Dist: requests<3.0,>=2.32.4
Requires-Dist: pydub>=0.25.1
Requires-Dist: SQLAlchemy<3.0,>=2.0.43
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: prospector[with-mypy]; extra == "dev"
Requires-Dist: types-requests; extra == "dev"
Dynamic: license-file

# Mastodon Bridge

[![Latest Release](https://img.shields.io/pypi/v/chatmail2mastodon.svg)](https://pypi.org/project/chatmail2mastodon)
[![CI](https://github.com/deltachat-bot/chatmail2mastodon/actions/workflows/python-ci.yml/badge.svg)](https://github.com/deltachat-bot/chatmail2mastodon/actions/workflows/python-ci.yml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

A Mastodon ↔️ Chatmail bridge.

## Install

To install run:

```
pip install chatmail2mastodon
```

## Configuration

To configure the bot:

```sh
chatmail2mastodon init dcaccount:nine.testrun.org
```

**(Optional)** To customize the bot name, avatar and status/signature:

```sh
chatmail2mastodon config selfavatar "/path/to/avatar.png"
chatmail2mastodon config displayname "My Bot"
chatmail2mastodon config selfstatus "Hi, I am a bot!"
```

Finally you can start the bot with:

```sh
chatmail2mastodon serve
```

To see the available options, run in the command line:

```
chatmail2mastodon --help
```

## User Guide

To log in with OAuth, send a message to the bot:

```
/login mastodon.social
```

replace "mastodon.social" with your instance, the bot will reply with an URL that you should open to grant access to your account, copy the code you will receive and send it to the bot.

To log in with your user and password directly(not recommended):

```
/login mastodon.social me@example.com myPassw0rd
```

Once you log in, A "Home" and "Notifications" chats will appear, in the Home chat you will receive your Home timeline and any message you send there will be published on Mastodon. In the Notifications chat you will receive all the notifications for your account.

If someone sends you a direct message in a private 1:1 conversation, it will be shown as a new chat where you can chat in private with that person, to start a private chat with some Mastodon user, send:

```
/dm friend@example.com
```

and the chat with "friend@example.com" will pop up.

To logout from your account:

```
/logout
```

For more info and all the available commands(follow, block, mute, etc), send this message to the bot:

```
/help
```
