git.fiddlerwoaroof.com
README.md
d8b28a4b
 A little utility to manage a simple time-sheet file.
 
 The file-format is this:
 
 ```
 -- Someday YYYY-MM-DD
1b0fea02
    start@HH:MM[:SS][(+|-)NN(mins|hrs)][,HH:MM[:SS][(+|-)NN(mins|hrs)]]
d8b28a4b
    Client Name: This is a memo.	
 ```
 
34aff00c
 The parser currently has some rudimentary error handling: it detects invalid indentation (i.e. the lines of
 a record do not begin with either a single tab or three spaces) and it detects invalid times.
 
 Additionally, if run in interactive mode `-i`, when it discovers invalid input, it will prompt for a replacement
 and attempt to correct the error.  Also, with `-W`, it should be able to recover from whitespace errors on its own.
 
3bf54900
 ## Install:
 
 Just do this:
 
 ```
 CC=`which gcc` \
 sbcl --no-userinit \
      --load ~/quicklisp/setup.lisp \
      --eval '(push (truename ".") asdf:*central-registry*)' \
      --eval '(ql:quickload :timesheet)'  \
      --load timesheet-client.lisp \
      --eval '(timesheet.cli::make-executable)'
 ```
 
34aff00c
 ## Todo:
 
 - Expand error handling
 - Add alternative export formats
 - Add querying capabilities
 - Support some notion of sub-tasks
 
 ## Examples:
d8b28a4b
 
 ```
216507cf
 Usage: timesheet [-sWircvh] [OPTIONS] TIMESHEETS ...
3bf54900
 
 A program for managing logs of hours worked
216507cf
 Display options
   -s, --status                Print a short summary of work status
3bf54900
   -W, --ignore-whitespace     Ignore whitespace errors in input
   -i, --interactive           Run interactively
216507cf
 Sort options
   -r, --reverse               Reverse the sort direction
   -c, --client                Sort records by client
 Freshbooks
   --post-hours                Post hours to freshbooks (requires manual setup of Freshbooks keys)
 Self-test options
   --run-tests                 Run the tests
   --output-style=TYPE         The kind of output to produce
                               Default: normal
 Generic options
3bf54900
   -v, --version               Show the program version
   -h, --help                  Show this help
9f188df8
 ```
d8b28a4b
 
1b0fea02
 By default, it orders the log by dates.  With the `-r` option, it displays the dates in descending order:
 
d8b28a4b
 ```
 % ./timesheet -r sample-inputs/test.ts
 Thu, 2016/01/04  Client #2    5.00 hrs  Implement prototype and write presentation
 Thu, 2016/01/04  Client #1    9.00 hrs  Implement Facebook Connector
 Wed, 2016/01/03  Client #2    2.50 hrs  Discussed user requirements and produce specification.
 Wed, 2016/01/03  Client #1    6.00 hrs  Delivered prototype, reviewed prototype feedback.
 Tue, 2016/01/02  Client #1    8.00 hrs  Prototype for testing user experience.
 Mon, 2016/01/01  Client #1    8.00 hrs  Mockup of site layout
 ```
 
1b0fea02
 With `-c` it sorts by clients and then does a stable-sort by date:
 
d8b28a4b
 ```
 % ./timesheet -sc sample-inputs/test.ts
 Mon, 2016/01/01  Client #1    8.00 hrs  Mockup of site layout
 Tue, 2016/01/02  Client #1    8.00 hrs  Prototype for testing user experience.
 Wed, 2016/01/03  Client #1    6.00 hrs  Delivered prototype, reviewed prototype feedback.
 Thu, 2016/01/04  Client #1    9.00 hrs  Implement Facebook Connector
 Wed, 2016/01/03  Client #2    2.50 hrs  Discussed user requirements and produce specification.
 Thu, 2016/01/04  Client #2    5.00 hrs  Implement prototype and write presentation
 ------------------------------------------------------------------------------------------------------------------------
1b0fea02
                  Client #1:  31.00 hours @   XX.00 $/hr = $XXXX.00
                  Client #2:   7.50 hours @   XX.00 $/hr = $ XXX.00
                      Total:  38.50 hours @   XX.00 $/hr = $XXXX.00
d8b28a4b
 ```
 
 ```
 % ./timesheet -sr sample-inputs/test.ts
 Thu, 2016/01/04  Client #2    5.00 hrs  Implement prototype and write presentation
 Thu, 2016/01/04  Client #1    9.00 hrs  Implement Facebook Connector
 Wed, 2016/01/03  Client #2    2.50 hrs  Discussed user requirements and produce specification.
 Wed, 2016/01/03  Client #1    6.00 hrs  Delivered prototype, reviewed prototype feedback.
 Tue, 2016/01/02  Client #1    8.00 hrs  Prototype for testing user experience.
 Mon, 2016/01/01  Client #1    8.00 hrs  Mockup of site layout
 ------------------------------------------------------------------------------------------------------------------------
1b0fea02
                  Client #1:  31.00 hours @   XX.00 $/hr = $XXXX.00
                  Client #2:   7.50 hours @   XX.00 $/hr = $ XXX.00
                      Total:  38.50 hours @   XX.00 $/hr = $XXXX.00
d8b28a4b
 ```
 
1b0fea02
 `-c` and `-r` combine:
 
d8b28a4b
 ```
 % ./timesheet -scr sample-inputs/test.ts
 Thu, 2016/01/04  Client #2    5.00 hrs  Implement prototype and write presentation
 Wed, 2016/01/03  Client #2    2.50 hrs  Discussed user requirements and produce specification.
 Thu, 2016/01/04  Client #1    9.00 hrs  Implement Facebook Connector
 Wed, 2016/01/03  Client #1    6.00 hrs  Delivered prototype, reviewed prototype feedback.
 Tue, 2016/01/02  Client #1    8.00 hrs  Prototype for testing user experience.
 Mon, 2016/01/01  Client #1    8.00 hrs  Mockup of site layout
 ------------------------------------------------------------------------------------------------------------------------
1b0fea02
                  Client #1:  31.00 hours @   XX.00 $/hr = $XXXX.00
                  Client #2:   7.50 hours @   XX.00 $/hr = $ XXX.00
                      Total:  38.50 hours @   XX.00 $/hr = $XXXX.00
d8b28a4b
 ```