Code Monkey home page Code Monkey logo

otsubot's Introduction

otsubot

the timecard bot for Hubot and slack

Description:

タイムカード(勤務表)コマンドです。勤務開始/終了時刻の記録と勤務表の表示ができます。

Commands:

  • hi [-u <user>] [[<date>] <from time>[-<to time>]] - 勤務開始時刻を記録します。
  • bye [-u <user>] [[<date>] [<from time>-]<to time>] - 勤務終了時刻を記録します。
  • bye [-u <user>] <date> - 勤務記録を削除します。
  • list [-u <user>] [<month>] - 勤務表を表示します。

Formatting

  • <date> is YYYY/MM/DD, YYYYMMDD, YY/MM/DD, YYMMDD, MM/DD, M/D or MDD
  • <time> is HH:MM, HHMM, H:MM, HMM, HH or H
  • <month> is YYYY/MM, YYYYMM, YY/MM, YYMM, MM or M

Examples:

Basics

  • hi - 今、会社に着いた。
  • bye - 今、会社を出る。
  • list - 今月の勤務表を見たい。

Advanced

  • hi 9 - 今朝は9:00に出社した。
  • bye 1730 - 今日は17:30に退社した。
  • hi 12/24 9-1730 - 12月24日は9:00~17:30まで勤務した。
  • bye 12/24 9-1730 - 同上
  • bye -u rotsuya - rotsuyaが会社を出たので代わりに記録してあげる。
  • list 201412 - 2014年12月の勤務表を見たい。
  • list -u rotsuya 201412 - rotsuyaの2014年12月の勤務表を見たい。
  • rm 12/24 - 間違えて登録した12月24日の記録を削除する。

Usage:

https://github.com/rotsuya/otsubot/wiki

Future Work:

https://github.com/rotsuya/otsubot/issues

otsubot's People

Contributors

blockgiven avatar mizuman avatar rotsuya avatar shinyafukumoto avatar

Watchers

 avatar

otsubot's Issues

超勤時間を自動計算する

$ list
otsubot> date, recorded from, to, calculated from, to, overtime
2014/09/11, 08:55, 17:55, 09:00, 17:45, 00:15
2014/09/16, 09:00, 19:05, 09:15, 19:00, 01:30
2014/09/17, 08:38, 20:01, 08:45, 20:00, 02:45
month, overtime
2014/09, 04:30

自動で15分刻みに補正する

現状

$ list
otsubot> date, from, to
2014/09/11, 09:00, 17:55
2014/09/16, 09:00, 19:05
2014/09/17, 08:58, 20:01

理想

$ list
otsubot> date, recorded from, to, calculated from, to
2014/09/11, 08:55, 17:55, 09:00, 17:45
2014/09/16, 09:00, 19:05, 09:15, 19:00
2014/09/17, 08:58, 20:01, 09:00, 20:00

listコマンドで2月の勤務表が見られない

大津谷さん、些細なことですが、Otsubotちゃんの挙動がすこしおかしいようです。具体的には、「list 1」「list 3」「list 4」などと打つとそれぞれ1月、3月、4月の勤務表がかえって来るのですが、「list 2」と打ったときだけ、3月の勤務表が返ってきてしまいます…

hiコマンドの応答が2回返ることがあるので、ログを取ってみる

11/25と11/27に発生した。

11/25

komasshu [8:48 AM] 
hi

otsubot [8:48 AM] 
おはようございます。komasshuの2014/11/25の勤務時間は08:48~だね。

alaniida [9:00 AM] 
hi

otsubot [9:00 AM] 
おはようございます。alaniidaの2014/11/25の勤務時間は09:00~だね。

rotsuya [9:09 AM] 
hi 9

otsubot [9:10 AM] 
おはようございます。rotsuyaの2014/11/25の勤務時間は09:00~だね。

yuuki.nkhr [9:12 AM] 
hi 9

otsubot [9:12 AM] 
おはようございます。yuuki.nkhrの2014/11/25の勤務時間は09:00~だね。

iwashi [9:22 AM] 
hi 9

otsubot [9:22 AM] 
おはようございます。iwashiの2014/11/25の勤務時間は09:00~だね。

otsubot [9:29 AM] 
おはようございます。panpanの2014/11/25の勤務時間は09:00~だね。

otsubot [9:29 AM]
おはようございます。komasshuの2014/11/25の勤務時間は09:29~だね。

otsubot [9:39 AM] 
おはようございます。alaniidaの2014/11/25の勤務時間は09:39~だね。

11/27

yuuki.nkhr [9:18 AM] 
hi 9

otsubot [9:18 AM] 
おはようございます。yuuki.nkhrの2014/11/27の勤務時間は09:00~だね。

komasshu [9:18 AM] 
Bye 1126 0145

otsubot [9:18 AM] 
お疲れさま。komasshuの2014/11/26の勤務時間は~01:45だね。

komasshu [9:18 AM] 
List

otsubot [9:18 AM] 
komasshuの11月の勤務表だね。

otsubot [9:18 AM]
…

otsubot [9:19 AM]
おはようございます。yuuki.nkhrの2014/11/27の勤務時間は09:00~だね。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.