From de0ce61a11399035b6c5c93b58594ead6b3664f2 Mon Sep 17 00:00:00 2001 From: Charlie Pitkin Date: Fri, 13 Oct 2017 11:06:16 -0700 Subject: [PATCH] reworked CHANGELOG updated README documentation Updated inline commander help message stdout --- CHANGELOG.md | 66 +++++++++++++++++++++++++++++++--------------------- README.md | 12 +++++----- index.js | 2 +- 3 files changed, 46 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f69fd40..33e43de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,40 +1,52 @@ -## v0.3.1 (2017-09-22) +# Changelog +All notable changes to this project will be documented in this file. -* forgot to save the changes ([f799bbc](https://bitbucket.org/wearefine/slack-archivebot/commits/f799bbc913754ecd11e3f0105ec56605c1afccf8)) -* added a -b --basic option so allow for basic stdout for cron and ci - ([ac2e2b0](https://bitbucket.org/wearefine/slack-archivebot/commits/ac2e2b044c70bacbcfaabd00b0e9a535f8932318)) +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## v0.3.0 (2017-09-22) +## [Unreleased] -* refactored the code so requests are throttled to 1 per 2 sec ([96ef01f](https://bitbucket.org/wearefine/slack-archivebot/commits/96ef01f)) +## [v0.3.2] - 2017-10-13 +### Added +- LICENSE +- `-b, --basic` option default setting documentation -## v0.2.4 (2017-08-11) +### Changed +- README and help documentation for the `-b, --basic` option to reflect what the option is used for +- CHANGELOG format +- Updated Yarn and NPM install methods to pull from NPM -* fixed a bug in input name for channel list params ([4fd3ba1](https://bitbucket.org/wearefine/slack-archivebot/commits/4fd3ba1)) +## v0.3.1 - 2017-09-22 +### Added +- added a -b --basic option so allow for basic stdout for cron and task runner tools -## v0.2.3 (2017-08-08) +## v0.3.0 - 2017-09-22 +### Changed + - refactored the code so requests are throttled to 1 per 2 sec -* fixed typo ([acbe2c1](https://bitbucket.org/wearefine/slack-archivebot/commits/acbe2c1)) +## v0.2.4 - 2017-08-11 +### Fixed +- fixed a bug in input name for channel list params -## v0.2.2 (2017-08-08) +## v0.2.3 - 2017-08-08 +### Fixed +- Fix typos in recent README changes -* updated stdout to use console log ([4635696](https://bitbucket.org/wearefine/slack-archivebot/commits/4635696)) +## v0.2.2 - 2017-08-08 +### Changed +- updated stdout to use console log -## v0.2.1 (2017-08-08) +## v0.2.1 - 2017-08-08 +### Changed +- updated error out to use console error -* updated error out to use console error ([bbf6ef6](https://bitbucket.org/wearefine/slack-archivebot/commits/bbf6ef6)) +## v0.1.1 - 2017-07-26 +### Changed +- Fixed typos all over -## v0.1.1 (2017-07-26) +## v0.1.0 - 2017-07-26 +### Added +- All the things -* fixed typos ([d9ed72a](https://bitbucket.org/wearefine/slack-archivebot/commits/d9ed72a)) -* add new release 0.1.1 ([0e451e9](https://bitbucket.org/wearefine/slack-archivebot/commits/0e451e9)) -* fixed typos ([d9ed72a](https://bitbucket.org/wearefine/slack-archivebot/commits/d9ed72a)) -* typos in CHANGELOG.md ([b31d090](https://bitbucket.org/wearefine/slack-archivebot/commits/b31d090)) - -## v0.1.0 (2017-07-26) - -* fixed yarn global install command ([5ea5f31](https://bitbucket.org/wearefine/slack-archivebot/commits/5ea5f31)) -* initial commit of the Slack archivebot ([4ff67cb](https://bitbucket.org/wearefine/slack-archivebot/commits/4ff67cb)) -* refs #68944 added a README.md ([4af2620](https://bitbucket.org/wearefine/slack-archivebot/commits/4af2620)) -* updated bin config ([e17608f](https://bitbucket.org/wearefine/slack-archivebot/commits/e17608f)) -* updated bin reference ([bd7cf78](https://bitbucket.org/wearefine/slack-archivebot/commits/bd7cf78)) +[Unreleased]: https://github.com/wearefine/slack-archive-bot/compare/v0.3.1...HEAD +[v0.3.2]: https://github.com/wearefine/slack-archive-bot/compare/v0.3.1...v0.3.2 diff --git a/README.md b/README.md index 9a57840..e1a6756 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,12 @@ This is a Nodejs cli to archive Slack channels that meet certain criteria. This project is setup to use Yarn but NPM also works. yarn: -``` -yarn global add slack-archivebot@bitbucket.org:wearefine/slack-archivebot.git# +```sh +yarn global add slack-archivebot ``` npm: -``` -npm install -g slack-archivebot@bitbucket.org:wearefine/slack-archivebot.git# +```sh +npm install -g slack-archivebot ``` ## Usage @@ -30,7 +30,7 @@ Usage: slack-archivebot [options] -d, --days [n] Number of days of inactivity. Default: 30 -m, --members [n] Maximum number of members in the channel. Default: 1 -n, --never-archive [list] List of channels to never archive. - -q, --basic Only prints basic log messages. For use the cron or ci systems. + -b, --basic Only prints basic log messages. For use with cron or task runners. Default: false -h, --help output usage information ``` You can provide the values as arguments or env vars (listed below). The cli arguments take precedence. It is highly recommended that you put the token into an environment variable. It is setup to run anytime with a recommended run of once a day or less. @@ -48,4 +48,4 @@ ARCHIVEBOT_BASIC=true || false ## Rate limits -Due to Slack's strict rate limit and given that a several requests need to be made per channel. The script will run each request at a rate of 1 req/2s. This will help avoid the rate limit that Slack imposes of roughly 1 req/s. Don’t run the cli more than once every hour to avoid rate limits. +Due to Slack's strict rate limit and given that several requests need to be made per channel. The script will run each request at a rate of 1 request per 2 seconds. This will help avoid the rate limit that Slack imposes of roughly 1 req/s. Don’t run the cli more than once every hour to avoid rate limits. diff --git a/index.js b/index.js index 3367a3c..69fb321 100755 --- a/index.js +++ b/index.js @@ -37,7 +37,7 @@ program .option('-d, --days [n]', 'Number of days of inactivity. Default: 30', parseInt) .option('-m, --members [n]', 'Maximum number of members in the channel. Default: 1', parseInt) .option('-n, --never-archive [list]', 'List of channels to never archive.', list) - .option('-b, --basic', 'Only prints basic log messages. For use the cron or ci systems.') + .option('-b, --basic', 'Only prints basic log messages. For use with cron or task runners. Default: false') .parse(process.argv); // Sane defaults