项目作者: gumieri

项目描述 :
act - Activity Continuous Tracking
高级语言: Go
项目地址: git://github.com/gumieri/act.git
创建时间: 2017-09-25T00:17:19Z
项目社区:https://github.com/gumieri/act

开源协议:MIT License

下载


act - Activity Continuous Tracking

A tool for timekeeping and tracking. For now only for Redmine.

Code status

Go Report Card Build Status

Configuration file

The configuration file need to be named .act.yaml and placed on the user’s home directory.

On Windows it is the %userprofile%, on any Unix like it is the ~ path.

An example of configuration:

  1. redmine:
  2. url: 192.168.3.41
  3. access_key: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
  4. default:
  5. activity_id: 24
  6. activities:
  7. dev: 24
  8. cr: 25
  9. git:
  10. path: /usr/bin/git
  11. regex: '[0-9]*'
  12. editor: vim

How to track an activity

The commands to manage the tracking are start, stop, status, push and rm.
A very simple workflow example:

  1. act start
  1. 2017/10/19 20:17:01 Activity 1234 started.
  1. act status
  1. Issue Started At Stopped At Spent Comment
  2. {0} #1234 8:17PM - 5m40.367443079s ""
  1. act stop
  1. 2017/10/19 20:22:47 Activity 1234 stopped. Time elapsed 0.10 (5m45.347366369s)
  1. act status
  1. Issue Started At Stopped At Spent Comment
  2. {0} #1234 8:17PM 8:22PM 5m45.347366369s ""
  1. act push
  1. Added 0.10 hour(s) to the Issue #1234.

Commands

spent

  1. act spent 5.67 -i 12345 -a dev -d 2017-09-15 -m 'Making the world a better place for humans'

Parameters/Arguments:

  1. time — it can be informed as:
    • 1.5 — (1 hour 30 minutes) As a fraction of hour
    • 1:45 — (1 hour 45 minutes) As time with hour and minute

Options/Flags:

  • -i —issue_id — If not informed it will try retrieve it from the git branch name using the regex config
  • -d —date — It can be informed as:
    • 2017-09-22 — Complete date
    • 09-22 — Only the month and day. The year will be the current one
    • 22 — Only the day. The year and month will be the current ones
    • -1 — Informing how many days back from the current date
    • And if not informed, it will use the current date
  • -m —comment — If not informed it will try to use the defined text editor
  • -a —activity — The name of an activity ID defined on the configuration file under activities
  • —activity_id — The activity ID. It Can be defined a default value to be used at the configuration file

log

  1. act log -i 12345

Options/Flags:

  • -i —issue_id
  1. act link -i 12345

Options/Flags:

  • -i —issue_id

start

  1. act start -i 12345

Options/Flags:

  • -i —issue_id — If not informed it will try retrieve it from the git branch name using the regex config

stop

  1. act stop

push

  1. act push

status

  1. act status

rm

  1. act rm 0

Parameters/Arguments:

  1. activity index on status list (without the curly brackets).

note

  1. act note -i 12345 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec varius eu purus in aliquam. Ut pellentesque magna purus, eu imperdiet justo convallis ac."
  1. act note -i 12345 -t mr

Parameters/Arguments:

  1. note — The string note. If not informed it will try open the configured editor.

Options/Flags:

  • -i —issue_id — If not informed it will try retrieve it from the git branch name using the regex config
  • -t —template — The name of a template file to be loaded to be edited. These template files need to be stored in templates inside .act in the home directory (~/.act/templates/text_file)

License

Act is released under the MIT License.