Coder Social home page Coder Social logo

timecard's Introduction

Timecard

A simple CLI for time tracking.

The command is installed as "tcf" (timecard fast enty) to avoid conflict with "tc" for linux traffic control.

Simplest use:

$ tcf myproj write some documentation
Thu Jul 16 09:00:03 EDT 2020

This records the user, host, timestamp, proj, description. Now, you take a break:

$ tcf break 
Thu Jul 16 09:10:24 EDT 2020

You go back to work, but after a few minutes, realize that you forgot to record this. Looking at some file timestamps, you figure out you started working again around 9:20:

$ tcf 0920 myproj
Thu Jul 16 09:20:45 EDT 2020

Feeling bored, you check how long you've been working today:

$ tcf -l1
myproj             Thu Jul 16 09:00:03 2020     0.17 write some documentation
break              Thu Jul 16 09:10:24 2020     0.17 
myproj             Thu Jul 16 09:20:45 2020     0.62 
None     myproj                 0.80
None     break                  0.17

TOTAL    None                   0.97

A customer calls, a lawn service company, and you switch gears:

$ tcf lawns-phone
Thu Jul 16 10:09:13 2020

When you hang up, you go back to myproj, and check how long you spent on the phone:

$ tcf myproj
Thu Jul 16 09:20:45 2020
$ tcf -l1
myproj             Thu Jul 16 09:00:03 2020     0.17 write some documentation
break              Thu Jul 16 09:10:24 2020     0.17
myproj             Thu Jul 16 09:20:45 2020     0.81
lawns-phone        Thu Jul 16 10:09:13 2020     0.18
myproj             Thu Jul 16 10:19:57 2020     0.00
None     myproj                 0.98
None     break                  0.17
lawns    lawns-phone            0.18

TOTAL    None                   1.15
TOTAL    lawns                  0.18

Lawns was configured in ~/.timecard/timecard.cfg as a client. (TODO: synchronize client list between hosts and users.)

$ cat ~/.timecard/timecard.cfg
[main]
user = stuart
# default client
dayjob = bms

[clients]
personal = foo,bar,baz
lawns = lawns

BILLING List charges for a client

$ tcf -c <client>

Create a Bill
$ tcf BILL-<client> Invoice #<12345>
This becomes the Last bill for the client, by putting a marker record.
This becomes a marker record which the "-c" method uses to filter only
the unbilled time.

List charges for a client as of an ending time

$ tcf -c <client> 1000Jul16

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.