mndrix / clk Goto Github PK
View Code? Open in Web Editor NEWa distributed time clock application for the command line
License: The Unlicense
a distributed time clock application for the command line
License: The Unlicense
Support the period "this year"
Format the output of the list
command along these lines
0d00eb 09/07 13:59 out
72cee9 09/07 14:13 ndrix,research reading blogs
841ca7 09/07 14:17 ndrix,20 clk
Running clk ls -p 'last month'
on 1 October 2010 displayed entries for September 2010. I assume this is because September only has 30 days but October has 31. I'm probably subtracting a certain number of days rather than subtracting a month.
Anyway, it needs to be fixed
I often run the equivalent of
vi +99999 $( ls ~/.clk/timeline/*.txt | sort | tail -n1 )
so that I can edit the most recent entry. This typically happens when I make a typo in the most recent clk in
command.
This shortcut should probably be given a somewhat long name to discourage it's use. Manually editing the timeline is a blunt instrument. Maybe clk edit-recent
?
When on the command line, it's two characters shorter to type this.year
compared to 'this year'
. The dump
command should accept the former as sugar for the latter.
I often clk in to work on items where the default format for specifying tags and the message is redundant. For instance, when reviewing a changeset for one client, I naturally copy text like foo-selenium#e1234
into the copy buffer. I then immediately do
clk in .client .foo .review foo-selenium#e1234
with my old clk program, I could do
clk in review foo-selenium#e1234
which expanded to something like the first example.
It would be convenient if there were a "pre-in" hook which received all the clk in
command line arguments as command line arguments. It would print a list of command line arguments to STDOUT which clk
would use as its actual command line arguments.
This same mechanism could be used for catching typos too. If the pre-in script exited with an error code, the clk in
would halt and the hook's STDERR would be displayed to the user.
Support the period "this month"
The clk
command takes about 400ms to run with 14,600 events in storage. It needs to finish in less than 100ms
Support the following periods which go backwards in time before finding the enclosing calendar unit:
yesterday
last week
last month
last year
Make a report
command so that
clk report foo -p today
runs
clk ls -p today --format=full | clk-report-foo
The report
command is just a shortcut, but it should make it easy for reports
to be written in any language the user wants.
See the commit message for 0d6774d which decribes a problem with periods that cross month boundaries an the way that entry durations are calculated.
Support the period "this week"
Trying to run clk ls -p 'last month'
returns no data because clk ls
only queries the most recent month in the timeline. It should really match the Period
value against the months and determine which overlap. Then extract matching entries from all entries inside of those months.
Sometimes I know that I worked on something on a specific day, for example "last friday" or "last monday". These phrases should be supported.
To do this, we need to determine which day of the week is today (0-7). Which day of the week the requested day is (0-7). Return a 24 hour interval surrounding N (today-then) days ago. The arithmetic probably needs to be done mod 7.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.