slack-activity-report is a Slackbot that interactively records day-to-day activities and build activity reports that conform to the KCCT D5 format.
- Python3
You can install and upgrade with pip:
pip install -U git+https://github.com/kcct-fujimotolab/slack-activity-report.git
First, you are going to create a new slackbot.
And set some environment variables before running slackbot:
export ACTREP_SLACKBOT_TOKEN=<token of slackbot>
export ACTREP_ROOT=<directory where settings are saved>
export ACTREP_SLACKBOT_INTERVAL=<interval at which the bot confirms input from the user>
ACTREP_SLACKBOT_TOKEN
must be set to a valid token obtained from Slack.
Other environment variables, if not set, will be ACTREP_ROOT
is ~/.actrep
and ACTREP_SLACKBOT_INTERVAL
is 1
.
You can start slackbot from the command line:
slackbot-activity-report start
You can use the following command with a direct message with slackbot:
config
: Configure user datalogin
,in
,i
: Record start timelogout
,out
,o
: Record end timedescription
,d
: Record activitiesbuild
: Build and export the monthly activity report (not implemented yet)help
,h
: Show help message about slackbot commands (not implemented yet)
Me : config user.name 'a KCCT Student'
Bot: @me: ok
Me : i
Bot: @me: logged-in at 2016-11-16 09:00:00
Me : i 'nov 15 07:00'
Bot: @me: logged-in at 2016-11-15 07:00:00
Me : o
Bot: @me: logged-in at 2016-11-16 14:35:00
Me : o '20161116 1700'
Bot: @me: logged-in at 2016-11-16 17:00:00
Me : d test
Bot: @me: Update description at 2016-11-16: test
Me : d 'test 2' 'nov 15'
Bot: @me: Update description at 2016-11-15: test 2
config <key> <value>
key
: The option's keyvalue
: The option's value correspondskey
You can configure following options:
user.name
(required): Your full name (use this value when build activity report)
login [<time>]
time
(optional): Appoint the login time; Default is the time that received thelogin
command
logout [<time>]
time
(optional): Appoint the logout time; Default is the time that received thelogout
command
description <message> [<date>]
message
: Use the givenmessage
as the content of activitiesdate
(optional): Appoint the activity date
build [<month>]
month
: Build themonth
report