Skip to content

Julien-cpsn/Mayday

Repository files navigation

MAYDAY 🗣️✉️

License: MIT GitHub Release Crates.io

A multi-messaging-sevice aggregator into an all-in-one application (android's app beeper-like). The goal is to extend the supported messaging services by writing and sharing your drivers!

Please fully read How to use

Currently supported:

  • loopback
  • IRC
  • ChatGPT
  • Telegram
  • Messenger
  • Matrix
  • ...add yours! see contribute

demo

How to use

The app is splat in two:

  • a TUI client which displays messages
  • a worker which receive messages

Install

cargo install mayday

Compile

cargo build
cargo build --release

Run

You can replace mayday with cargo run --

TUI client

mayday

worker

mayday worker

Using messaging services

After the first usage, mayday will create a config repository which stores messaging service drivers:

  • Linux: /home/$USER/.config/mayday
  • Windows: C:\Users\$USER\AppData\Roaming\Julien-cpsn\mayday
  • macOS: Users/$USER/Library/Application Support/com.Julien-cpsn.mayday

Add your desired messing service configuration file in this folder. Each service template is available in example_resources.

E.g. for IRC

uuid = "60de91cf-41fc-48ab-893e-b50ff514a706"
discussion_name = "IRC freenode"

[driver]
type = "irc"
channel = "#rust"
server = "chat.freenode.net"
#port = 6697
nickname = "mayday user"
alt_nicks = ["[mayday-user]"]

Cleaning conversations

After the first usage, mayday will create a cache repository which stores messages history:

  • Linux: /home/$USER/.config/mayday
  • Windows: C:\Users\$USER\AppData\Roaming\Julien-cpsn\mayday
  • macOS: Users/$USER/Library/Application Support/com.Julien-cpsn.mayday

Erasing a file will reset the history.

Contribute

You can develop a new messaging service driver as follows.

  1. Copy loopback.rs from src/drivers to src/drivers/<my_awesome_driver>.rs
  2. Add your driver to the MessagingDriverConfigs enum in src/drivers/mod.rs
  3. Fill the copied driver with your code. Keep in mind that:
    • active_poll_received_messages is called by the client (so when you are using the app)
    • passive_poll_received_messages is called by the background worker
  4. Update this README
  5. Add a configuration example in example_resources
  6. Create a pull request!

Star history

Star History Chart

License

The MIT license for this project can be seen here

About

A multi-messaging-sevice aggregator into an all-in-one application (android's app beeper-like)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages