UNPKG

4.43 kBMarkdownView Raw
1# standup-boy [![install size](https://flat.badgen.net/packagephobia/install/standup-boy)](https://packagephobia.now.sh/result?p=standup-boy) [![Build Status](https://flat.badgen.net/travis/vikepic/standup-boy)](https://travis-ci.org/vikepic/standup-boy) [![XO code style](https://flat.badgen.net/xo/status/standup-boy)](https://github.com/xojs/xo)
2
3> A simple module to create daily standup texts :clock10:
4
5`standup-boy` helps you create daily standup texts fast and easy.
6It prompts you the usual stuff for a daily standup, then outputs a nicely-formatted, emoji-ready text for you to use in whatever platform you desire.
7Assumes markdown formatting.
8
9## Install
10
11```
12$ npm install --global standup-boy
13```
14
15```
16$ standup-boy --help
17
18 Usage
19 standup-boy [--path | -p | --project projectName]
20
21 Examples
22 $ standup-boy
23 ? What did I accomplish yesterday? Something!
24 ? What will I do today? Something Else!
25 ? What obstacles are impeding my progress? Any info I need or want to share? Not much...
26
27 :triumph: **`What did I accomplish yesterday`**
28 Something!
29 :scream_cat: **`What will I do today`**
30 Something Else!
31 :cry: **`What obstacles are impeding my progress? Any info I need or want to share?`**
32 Not much...
33 Copied the result to the clipboard!
34
35 Options
36 --log Display the message history.
37 --path -p Get the path to the configuration file (read-only).
38 --project Specify the name of the project you want to send the message to.
39```
40
41## Configuration
42
43You can obtain the path to the configuration file by simply running `standup-boy --path` (read-only). Edit the resulting file to override the defaults.
44
45Mind that this configuration only alters the final text that gets copied into your clipboard.
46
47### Templates
48
49One can configure `standup-boy` to replace the default templates for the resulting standup text.
50
51An example of an alternative configuration, written in JSON format:
52
53```json
54{
55 "yesterday": "Hey, you! What did you do yesterday?",
56
57 "today": "Oh really? And what are you gonna do today?",
58
59 "obstacles": "Did you find any obstacles along the way, tho?"
60}
61```
62
63### Replace words
64
65`standup-boy` can also be configured to search and replace certain keywords for, for example, automatically link to JIRA tasks. RegExp syntax is supported.
66
67If you want to introduce the matched string into the replaced value, you can add the `%VAL%` keyword anywhere in your resulting text to interpolate the matched variable into it.
68
69An example of an alternative configuration, written in JSON format:
70
71```json
72{
73 "replace" :
74 {
75 "JIRA-[0-9]*": "[%VAL%](https://your-jira.url/%VAL%)"
76 }
77}
78```
79
80This results in this text:
81
82```
83I completed JIRA-220 today!
84```
85
86Being replaced by:
87
88```
89I completed [JIRA-220](https://your-jira.url/JIRA-220) today!
90```
91
92If translated to markdown, a nice link appears in place of the old, lame, jira task name.
93
94### Slack / Mattermost integration
95
96This module can also be configured to automatically send the resulting message to your desired slack / mattermost channel once you've answered all the questions.
97
98If your configuration is valid, a prompt should appear once your message has been written:
99
100```
101? Slack / Mattermost integration details found. Do you want to send the message? (Y/n)
102```
103
104On confirmation, the message will be sent to the destination specified by your configuration.
105
106An example of a valid configuration, written in JSON format:
107
108```json
109{
110 "username" : "vikepic",
111 "channel" : "daily-standup",
112 "url" : "https://your-slack-url"
113}
114```
115
116Alternatively, you can have more than one project on your configuration file:
117
118```json
119{
120 "projects" :
121 {
122 "project-turnip":
123 {
124 "username" : "vikepic",
125 "channel" : "daily-standup-turnip",
126 "url" : "https://your-slack-url"
127 },
128 "project-avocado":
129 {
130 "username" : "vikepic",
131 "channel" : "daily-standup-avocado",
132 "url" : "https://your-slack-url"
133 }
134 }
135}
136```
137
138If that is the case, you can specify with the `--project` flag which one will you send the message to. If not specified, the program will prompt to you which of the existing projects you want to use to send your message:
139
140```
141? Multiple projects found. Please, select the project you want to send the results to. (Use arrow keys)
142❯ project-turnip
143 project-avocado
144```
145
146Once selected, `standup-boy` will send the message to the project of your choice.
147
148## License
149
150MIT © [vikepic](https://vikepic.github.io)