Giter VIP home page Giter VIP logo

skill-shell's Introduction

opsdroid skill shell

A skill for opsdroid to respond to Please run messages. With this skill you will be able to run shell scripts from a specific folder you can configure. And the standard output and error messages will sent back to the chat.

Requirements

None.

Configuration

You can configure:

  • scriptdir - where the skill will search for shell scripts, default: ~/.opsdroid/modules/opsdroid-modules/skill/shell/script/
  • initialtalkbacktimeout - the timeout in seconds for sending the first stdout lines from the script back to the chat, default: 5
  • talkbacktimeout - the maximum time in seconds the skill will wait until the gathered stdout lines are sent back to the chat, default: 15
  • argumentumseparator - if the script is able to accept argumentums this will be the separator between the args; default: ;

Usage

Place a shell scipt like this:

#!/bin/bash
ls . | grep -v "*.lib"

in the scriptdir and then you can tell opsdroid: Please run ls

opsdroid will run the script ls in the scriptdir and answer with the output of the script.

The output will be like:

Starting the script named ls on 2018-06-17 11:42:54.705303... Please be patient...

ls

The command ls ended with the return code of 0 on 2018-06-17 11:42:54.905555 and was running 0:00:00.205305 seconds long.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.