cmd2s

command module
v0.0.0-...-39bea59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

README

cmd2s

Operate Google Chrome to automatically send a message to Slack.

Description

  • Reads the specified file and sends the string to Slack.
  • You can automatically send using Google Chrome.
  • This time, it is written assuming the format of /feed subscribe [RSS Feed URL].
  • If you want to use it for general purposes, please modify the source code.

see also:

Features

  • It is made by golang so it supports multi form.
  • You can automatically send using Google Chrome.
  • It simply sends the string in the file, so you can also send and run Slack slash command.
    • This source is specialized for /feed subscribe [RSS Feed URL].
    • If you want to generalize, modify the source

Requirement

Usage

Just run the only one command.

$ ./cmd2s

However, setting is necessary to execute.

Setting Example
  1. In the same place as the binary file create execution settings file.

  2. Execution settings are done with config.json file.

{
	"LoginURL": "https://xxxxx.slack.com/sso/saml/start?redir=%2Fmessages",
	"LoginID": "YOUR_EMAIL",
	"LoginPass": "YOUR_PASSWORD",
	"ChannelURL": "https://app.slack.com/client/XXXXXXX/XXXXXXX",
	"CmdFile": "/cmd2s/_region_feed.txt"
}
  • About setting items
    • LoginURL: String
      • Specify the URL to log in to Slack (This source is SMAL login in Azure AD)
    • LoginID: String
      • Specify the ID for logging in to Slack (This source is SMAL login in Azure AD)
    • LoginPass: String
      • Specify password to log in to Slack (This source is SMAL login in Azure AD).
    • ChannelURL: String
      • Specify the URL of the Slack channel to send the string to.
    • CmdFile: String
      • Specify the full path of the file that describes the transmission contents.

Installation

If you build from source yourself.

$ go get -u github.com/uchimanajet7/cmd2s
$ go build
When you want to know the execution result of the slash command.

This source does not acquire the sequential execution result, but it can be dealt with if changed.

In this source, we get the result of /feed list and confirm the execution.

Only visible to you
Slackbot  8:28 PM
ID: 1210548705408 - Title: Amazon Virtual Private Cloud (Osaka-Local) Service Status
URL: https://status.aws.amazon.com/rss/vpc-ap-northeast-3.rss
ID: 1186712303954 - Title: Amazon Simple Workflow Service (Osaka-Local) Service Status
URL: https://status.aws.amazon.com/rss/swf-ap-northeast-3.rss
ID: 1185333543893 - Title: Amazon Simple Queue Service (Osaka-Local) Service Status
URL: https://status.aws.amazon.com/rss/sqs-ap-northeast-3.rss
... more

Author

uchimanajet7

Licence

Apache License 2.0

As reference information

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL