Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 1.76 KB

README.md

File metadata and controls

66 lines (47 loc) · 1.76 KB

Typetalk.sh

Typetalk.sh is a simple shell script that allow you to post message to Typetalk.

How to install

curl -L -o typetalk https://raw.githubusercontent.com/mohno007/typetalk.sh/master/typetalk && chmod +x typetalk

Or

  1. Clone this repo: git clone https://github.com/mohno007/typetalk.sh.git
  2. (If you need) Create a bin directory: mkdir -p $HOME/.local/bin/
  3. Create a symbolic link: ln -s PATH_TO_typetalk.sh/typetalk $HOME/.local/bin/typetalk
  4. (If you need) Add a bin directory into PATH: echo 'export PATH="$PATH:$HOME/.local/bin/"' >> ~/.bashrc

Example:

git clone https://github.com/mohno007/typetalk.sh.git "$HOME/.typetalk.sh/"
mkdir -p "$HOME/.local/bin/"
ln -s "$HOME/.typetalk.sh/typetalk" "$HOME/.local/bin/typetalk"
echo 'export PATH="$PATH:$HOME/.local/bin/"' >> ~/.bashrc
exec bash

If you use another shell, not bash, setup .*shrc appropriately.

Usage

Create $HOME/.typetalk_config and put an API token into it.

$HOME/.typetalk_config:

TYPETALK_TOPIC=1234
TYPETALK_TOKEN="xxxxxxxxxxxxxxx"

Example:

# specifying content by command line
typetalk -m "Hello, world!"

# specifying content from command output
date | typetalk

# specifying content from file
typetalk "some_file"

# specifying config via environment variables
TYPETALK_TOPIC=1234 TYPETALK_TOKEN="xxxxxxxxxxxxxxx" typetalk -m "via envvar"

# show help
typetalk -h

How to update

git pull

License

Typetalk.sh by mohno007

To the extent possible under law, the person who associated CC0 with Typetalk.sh has waived all copyright and related or neighboring rights to Typetalk.sh.

You should have received a copy of the CC0 legalcode along with this work. If not, see http://creativecommons.org/publicdomain/zero/1.0/.