An open API service indexing awesome lists of open source software.

https://github.com/mmiller42/idt-slack-goals

CLI tool for IDoneThis with ability to post your list of goals to Slack.
https://github.com/mmiller42/idt-slack-goals

Last synced: 3 months ago
JSON representation

CLI tool for IDoneThis with ability to post your list of goals to Slack.

Awesome Lists containing this project

README

        

# idt-slack-goals

CLI tool for IDoneThis with ability to post your list of goals to Slack.

```
> idt --help

Usage: idt-slack-goals [options] [command]

Commands:

complete Marks the first goal matched by the search as complete.
done Adds an item to your list of accomplishments in IDoneThis.
goal Adds an item to your list of goals in IDoneThis.
slack [type] Posts your list of IDoneThis goals for today in Slack.
list Lists your goals and accomplishments in IDoneThis for today.

Options:

-h, --help output usage information
-V, --version output the version number

> idt goal 'Standup'
◻️ Standup

> idt goal 'Sync up with Jordan re bug'
◻️ Sync up with Jordan re bug
◻️ Standup

> idt goal 'Review all assigned PRs'
◻️ Review all assigned PRs
◻️ Sync up with Jordan re bug
◻️ Standup

> idt goal 'Refactor repo'
◻️ Refactor repo
◻️ Review all assigned PRs
◻️ Sync up with Jordan re bug
◻️ Standup

> idt list
◻️ Refactor repo
◻️ Review all assigned PRs
◻️ Sync up with Jordan re bug
◻️ Standup

> idt complete 'jordan'
◻️ Refactor repo
◻️ Review all assigned PRs
☑️ Sync up Jordan re bug
◻️ Standup

> idt done 'Make coffee'
☑️ Make coffee
◻️ Refactor repo
◻️ Review all assigned PRs
☑️ Sync up Jordan re bug
◻️ Standup

> idt slack
☑️ Make coffee
◻️ Refactor repo
◻️ Review all assigned PRs
☑️ Sync up Jordan re bug
◻️ Standup
```

## Installation
```sh
npm install -g idt-slack-goals
```

## Environment Setup
Define the following environment variables in your shell profile.

##### `IDT_TEAM_ID`

In order to obtain your team ID in IDoneThis:

1. Log into IDoneThis.

1. You should be directed to a screen where you can see your and your teammates' tasks.

1. Your team ID is the last parameter in the URL.

For example, if the URL is:

```
https://beta.idonethis.com/t/123456789
```

Then your team ID is `123456789`.

##### `IDT_USER_ID`

In order to obtain your user ID in IDoneThis:

1. Log into IDoneThis.

1. You should be directed to a screen where you can see your and your teammates' tasks.

1. Click on your avatar to visit your profile.

1. Your user ID is the last parameter in the URL.

For example, if the URL is:

```
https://beta.idonethis.com/o/123456789/u/987654321
```

Then your user ID is `987654321`.

##### `IDT_TOKEN`

To obtain your IDoneThis API token:

1. Log into IDoneThis.

1. Click *Account settings* in the navigation on the left.

1. Scroll to the *API Token* section.

1. Your API token appears in a text field.

##### `IDT_SLACK_HOOK`

To obtain a Slack WebHook URL:

1. Log into the Slack web interface.

1. Visit the [Incoming WebHooks](https://brightbytes.slack.com/apps/A0F7XDUAZ-incoming-webhooks) app page.

1. Click _Add Configuration_.

1. Choose a channel to post your IDoneThis update into.

1. Your Slack hook will be the part of the *Webhook URL* **after** `https://hooks.slack.com/services/`.

For example, if your Webhook URL is:

```
https://hooks.slack.com/services/ABCD123456/DEFG789012/HIJK345678
```

Then your Slack hook is `ABCD123456/DEFG789012/HIJK345678`.

## Usage

For brevity, you may want to add this to your shell profile:

```sh
alias idt="idt-slack-goals"
```

The examples below will assume you are using the alias; if not, replace `idt` with `idt-slack-goals`.

### List all goals and accomplishments

This will print all incomplete goals as well as entries you've accomplished today to the console.

```sh
idt list
```

### Post your list of goals and accomplishments on Slack

This will post your goals and accomplishments in Slack.

```sh
idt slack
```

### Post only goals on Slack

You may pass `goal` or `done` to the Slack command to only post goals or accomplishments in the Slack channel, respectively.

```sh
idt slack goal
```

### Add a goal

Add a goal for today.

```sh
idt goal 'Write unit tests'
```

### Add a task you've already completed

Add an entry that is already done.

```sh
idt done 'Fixed bug on autocomplete widget'
```

### Mark an existing task as completed

This will locate the first goal for today that contains the given string and mark it as completed.

```sh
idt complete 'unit test'
```