- 授权协议: MIT
- 开发语言: Google Go
- 操作系统: 跨平台
- 软件首页: https://github.com/sourcegraph/thyme
- 软件文档: https://github.com/sourcegraph/thyme/blob/master/README.md
- 官方下载: https://github.com/sourcegraph/thyme/archive/master.zip
软件介绍
Thyme 可以自动追踪你使用应用程序的时间。
特性:
简单的命令行界面:
每 30s 记录一次你使用的应用
$ while true; do thyme track -o thyme.json; sleep 30s; done;
在新窗口创建图表以显示应用使用时间
$ thyme show -i thyme.json -w stats > thyme.html
安装:
安装 Go:
$ go get -u github.com/sourcegraph/thyme/cmd/thyme
按照 thyme.dep 打印的说明
$ thyme dep
校验 thyme
$ thyme track
使用示例
var trackCmd TrackCmd
func (c *TrackCmd) Execute(args []string) error {
t, err := getTracker()
if err != nil {
return err
}
snap, err := t.Snap()
if err != nil {
return err
}
if c.Out == "" {
out, err := json.MarshalIndent(snap, "", " ")
if err != nil {
return err
}
fmt.Println(string(out))
} else {
var stream thyme.Stream
if _, err := os.Stat(c.Out); err == nil {
if err := func() error {
f, err := os.Open(c.Out)
if err != nil {
return err
}
defer f.Close()
if err := json.NewDecoder(f).Decode(&stream); err != nil {
return err
}
return nil
}(); err != nil {
return err
}
} else if !os.IsNotExist(err) {
return err
}
stream.Snapshots = append(stream.Snapshots, snap)
f, err := os.Create(c.Out)
if err != nil {
return err
}
if err := json.NewEncoder(f).Encode(stream); err != nil {
return err
}
}
return nil
}
The Everything Store
Brad Stone / Little, Brown and Company / 2013-10-22 / USD 28.00
The definitive story of Amazon.com, one of the most successful companies in the world, and of its driven, brilliant founder, Jeff Bezos. Amazon.com started off delivering books through the mail. Bu......一起来看看 《The Everything Store》 这本书的介绍吧!
