You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5.2 KiB

weechat-slack

https://api.travis-ci.org/bqv/weechat-slack.svg?branch=master">file:https://api.travis-ci.org/bqv/weechat-slack.svg?branch=master https://coveralls.io/repos/github/bqv/weechat-slack/badge.svg?branch=master">file:https://coveralls.io/repos/github/bqv/weechat-slack/badge.svg?branch=master file:<img src=" title="file:https://img.shields.io/github/issues/bqv/weechat-slack.svg" /> file:<img src=" title="file:https://img.shields.io/github/issues-closed/bqv/weechat-slack.svg" /> file:<img src=" title="file:https://img.shields.io/github/license/bqv/weechat-slack.svg" /> file:<img src=" title="file:https://img.shields.io/badge/weechat--extras-slack-blue.svg" />

Status: Under Development
Location: http://github.com/bqv/weechat-slack
Version: 0.1.5
Disclaimer: Slack's API is a thing of horror

Description

A weechat plugin in C to extend the chat client to support Slack workspaces via the RTM and Web APIs.

Usage

  1. Start with /slack register for instructions on how to obtain a token, or if you already have a token, use /slack register <token>.
  2. Use /slack connect <workspace-name> with the name returned by register

Installing

See http://github.com/bqv/weechat-extras for the suite this is part of and a repository/package for your distribution.

Dependencies

  • libwebsockets (static, submodule)
  • json-c (static, submodule)
  • weechat (>= v1.7)

Building

git clone git://github.com/bqv/weechat-slack.git
cd weechat-slack
make
make install

Do NOT run make install as root, it installs the plugin to your local weechat plugins directory

Development

I use emacs for development of this, although I am also a fan of vim. My debug build process involves static analysis with clang and cppcheck, and dynamic analysis with address-sanitizer and leak-sanitizer. My debug evaluation process involves gdb/mi run with the arguments -ex "handle SIGPIPE nostop noprint pass" --args weechat -a 2>asan.log since part of weechat and it's default plugins use SIGPIPE as control.

I have no real requests for style of pull requests besides a wish that you keep vaguely to the style I have adopted for this project.

Happy coding!

Tasks

DONE [A] Implement basic functionality (milestone v0.1)

TODO [A] Implement essential api endpoints and events (milestone v0.2)

  • Implement handling api message message.me_message (see #5)
  • Implement sending request chat.meMessage (see #5)
  • Implement handling api message message.thread_broadcast
  • Implement handling api message message.bot_message (see #2)
  • Implement handling api message message.message_changed
  • Implement handling api message message.message_deleted
  • Implement handling api message message.message_replied
  • Implement handling api message message.file_share
  • Implement sending websocket typing message

TODO [B] Implement completion engine (milestone v0.3)

  • Tab completion for slack emoji (see #3)

    • Support Slack Emoji
    • Support Custom Emoji
  • Tab completion for display/user names (see #1)
  • Sort nick-completion by recent speakers (see #4)

TODO [B] Implement websocket ping and pong (milestone v0.4)

  • Add ping timer and pong handler (see #9)

TODO [C] Implement remaining api endpoints and events (milestone v0.5)

  • Support all channel types

    • Channels
    • Groups
    • MPIMs
    • IMs
  • Complete api endpoint set
  • Complete api event set

TODO [C] Implement full weechat functionality (milestone v0.6)

  • Hook buffer closes
  • Relay compatibility
  • Config Options

    • Emoji translation options (see #11)

TODO [#D] Close all issues (milestone v1.0)

Contributing

Your contributions are always welcome! Please submit a pull request or create an issue to add a new or missing feature.

Appropriating

As there is no C library for Slack at the time of writing, this project implements the APIs from scratch, and as such one could butcher this repository to create a minimal Slack C library. Up to you.

License

weechat-slack is licensed under the Mozilla Public License Version 2.0 available here and in LICENSE.