Git Product home page Git Product logo

stt's Introduction

stt

Simple Time Tracker

Build & Install

$ make clean stt
# make install

Usage

$ stt -a task       # start task
$ stt -s            # stop task
$ stt [-l [Y-m-d]]  # print report
task: task
started at: Wed Oct  2 19:04:04 2019
ended at: Wed Oct  2 19:05:04 2019
duration(hours): 0.02

task: readme@stt
started at: Wed Oct  2 19:05:04 2019
ended at: Wed Oct  2 19:09:28 2019
duration(hours): 0.07

task: publish@stt
started at: Wed Oct  2 19:09:28 2019
still running
duration(hours): 0.11

total: 0.20

Files

If current working directory contains a .ttimes file it will be used otherwise it will create or use ~/.ttimes.

File format looks like:

<start-unix-timestamp>;<end-unix-timestamp>;<task>

Zero value end timestamp means task is still running.

stt's People

Contributors

mfreeze avatar pips- avatar

Watchers

 avatar  avatar

Forkers

mfreeze sipi

stt's Issues

linux build warnings

$ make stt
CC stt.c
stt.c: In function ‘loadtimes’:
stt.c:95:20: warning: implicit declaration of function ‘getline’ [-Wimplicit-function-declaration]
  while ((linelen = getline(&readline, &linesize, fp)) != -1) {
                    ^~~~~~~
stt.c:96:10: warning: implicit declaration of function ‘strdup’ [-Wimplicit-function-declaration]
   line = strdup(readline);
          ^~~~~~
stt.c:96:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
   line = strdup(readline);
        ^
stt.c:97:9: warning: implicit declaration of function ‘strsep’ [-Wimplicit-function-declaration]
   tmp = strsep(&line, ";");
         ^~~~~~
stt.c:97:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
   tmp = strsep(&line, ";");
       ^
stt.c:103:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
   tmp = strsep(&line, ";");
       ^
stt.c:106:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
   task = strdup(line);
        ^
stt.c: In function ‘writetimes’:
stt.c:124:18: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘time_t {aka long int}’ [-Wformat=]
  fprintf(fp, "%lld;%lld;%s\n", p->starttime, p->endtime, p->task);
                  ^
stt.c:124:23: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘time_t {aka long int}’ [-Wformat=]
  fprintf(fp, "%lld;%lld;%s\n", p->starttime, p->endtime, p->task);
                       ^
stt.c: In function ‘timesnode_add’:
stt.c:200:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
   p->task = strdup(task);
           ^
stt.c: In function ‘main’:
stt.c:353:3: warning: implicit declaration of function ‘localtime_r’ [-Wimplicit-function-declaration]
   localtime_r(nowtime, &today);
   ^~~~~~~~~~~
CC -o stt
stt.o: In function `opentimesfile':
stt.c:(.text+0x4e): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

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.