Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Latest commit

 

History

History
67 lines (48 loc) · 1.89 KB

README.md

File metadata and controls

67 lines (48 loc) · 1.89 KB

surplus on wheels: whatsapp bridge

This project has been merged into the main project, surplus.

WhatsApp bridge for surplus on wheels (s+ow).

s+ow bridges are defined in a file named $HOME/.s+ow-bridges. each command in the file is ran, and comma-seperated target chat IDs are passed using stdin.

this bridge recognises targets prefixed with wa:.

wa:<chat id>,...

to use the WhatsApp bridge:

  1. install surplus, and surplus on wheels

  2. install spow-whatsapp-bridge:

    pkg install golang git
    git clone https://github.com/markjoshwel/spow-whatsapp-bridge
    (cd spow-whatsapp-bridge; go build)
    mkdir -p $HOME/.local/bin
    mv spow-whatsapp-bridge/spow-whatsapp-bridge $HOME/.local/bin/s+ow-whatsapp-bridge
    
  3. log into WhatsApp:

    s+ow-whatsapp-bridge login
    

    give it a minute or two to sync your history. once the screen stops scrolling, you can safely exit with Ctrl+D or Ctrl+C.

  4. add the following to your $HOME/.s+ow-bridges file:

    s+ow-whatsapp-bridge
    

usage:

  • s+ow-whatsapp-bridge
    normal usage; sends latest message to wa:-prefixed targets given in stdin

  • s+ow-whatsapp-login
    logs into WhatsApp

  • s+ow-whatsapp-bridge logout
    logs out of WhatsApp

  • s+ow-whatsapp-bridge list
    lists all group chats and their IDs
    for sending to individuals: their IDs are their internationalised phone numbers ending in @s.whatsapp.net.

    example: +65 9000 0000 is [email protected]

licence

the s+ow WhatsApp bridge is modified mdtest code, which is licensed under the Mozilla Public License 2.0. for more information, see LICENCE or https://www.mozilla.org/en-US/MPL/2.0/.