jobrog

A rewrite of JobLog in Rust.

JobLog, referred to herein variously as "JobLog", "Job Log", "jobrog", "job log", and "job", is a command line utility that helps one keep track of what one does in a day. With a little anonymization, here is an example of an actual report of use in the wild:

> job summary last friday
Friday, 10 January
  8:55 -  9:35  0.75  e, o        email
  9:35 -  9:41  0.00  f, o        filing time
  9:41 - 10:50  1.25  30, mr, fo  Create booster view which lets you add people to booster
 10:50 - 12:15  1.50  10, mr, fo  get multi-tenant S3 attachments to work
 12:15 - 12:16  0.00  c, o        feeding the cat
 12:16 -  3:46  3.50  10, mr, fo  get multi-tenant S3 attachments to work
  3:46 -  3:50  0.00  29, mr, fo  Make it so the Plugh API is only called for gargamel stuff
  3:50 -  3:50  0.00  mtg, fo     FO/UPI Monthly Check-In
  3:50 -  4:01  0.25  29, mr, fo  Make it so the Plugh API is only called for gargamel stuff
  4:01 -  4:30  0.50  mtg, fo     FO/UPI Monthly Check-In
  4:30 -  5:01  0.50  29, mr, fo  Make it so the Plugh API is only called for gargamel stuff

TOTAL HOURS 8.00
10          5.00
29          0.75
30          1.25
c           0.00
e           0.75
f           0.00
mr          6.75
mtg         0.50
o           0.75
fo          7.25

In this case the user (me) has typed something like

job add --tag email --tag o email

or, more likely,

job a -t e -t o email

or still more likely,

job r -t e

and added a line to ~/.joblog/log which looks like

2020  1 10  8 55 27:e o:email

Job log lets one manage a log of one's activities as a log file. A log line consists of a timestamp, some metadata, and a description of the current event.

Table of Contents

Screencasts

Watch Job Log in action!

Why

There are many alternatives to JobLog. One can use Harvest, for instance. The advantages of JobLog over web apps are

Some other command-line time trackers I've come across

I'm partial to JobLog, of course, because I wrote it and so it does exactly what I need.

JobLog can produce JSON summaries, so it should be possible to export JobRog events to other time trackers.

How

The typical things one does with job log are

Here is the complete list (job help):

``` testing 0.3.0 dfhoughton dfhoughton@gmail.com command line job clock

USAGE: job [OPTIONS] [SUBCOMMAND]

FLAGS: -h, --help Prints help information -V, --version Prints version information

OPTIONS: -d, --directory

Looks in this directory for the log rather than ~/.joblog

SUBCOMMANDS: add Adds a new task summary Says when you will have worked all the hours expected within the given period done Ends a currently open task resume Resumes a stopped task last Shows the last task recorded first Shows the first task recorded note Adds a new note when Says when you will have worked all the hours expected within the given period edit Opens the job log in a text editor configure Sets or displays configuration parameters vacation Records vacation time parse-time Shows the start and end timestamps you get from a particular time expression truncate Truncates the log so it only contains recent events statistics Shows overall statistics of the log help Prints this message or the help of the given subcommand(s)

The 'job' executable allows one to maintain and view a log of daily activity. ```

NOTE

The examples shown here and throughout the job log documentation are generally the most verbose possible for the sake of clarity. They all have short forms, however, to save keystrokes. Instead of

job add --tag overhead --tag email Reading the morning email.

you can type

job a -t overhead -t email Reading the morning email.

You will probably find that long tags like this are irksome and reduce them as well:

job a -t o -t e Reading the morning email.

But if there is something you do frequently, the easiest thing to do is to give it a distinctive tag and just resume it:

job resume -t e

or

job r -t e

Suggestions

Pattern of Usage

If you have to keep a log of activity for billing purposes you often need to keep distinct bins for different accounts, overhead versus work for a particular client etc. In addition you may need to keep track of different projects or subcategories within a particular account. I find it useful, therefore, to a major category tag and one or more minor category tags with every task. Typically a non-overhead task consists of a major category, such as sb, a minor billing category, such as cs, and a github issue number. Then when I need to add items to my time sheet I type

job s -d yesterday -T o -T sb

first to confirm that I remembered to put everything in some major category bin. If this tells me there are no items, I have succeeded. Then I subdivide the tasks by major category.

job s -d yesterday -t o

I find this clears away the clutter so the task goes more smoothly.

If a particular major category I find it useful to eliminate things I've already entered.

job s -d yesterday -t sb -T 123 -T 124 -T 125

This makes it progressively easier to focus on the next thing I need to enter.

Keeping a TODO List

You can use the note subcommand to maintain a todo list.

Add the following or some variant thereof to a shell profile file, ~/.zshrc in my case:

```bash

add an item to the TODO list

alias todo="job n -t todo"

show TODOs yet to do

alias todos="job s -n -t todo -T done"

mark at TODO as completed

function did { local rx=$1; shift job tag -fnt todo -T done --rx $rx -a done $* }

show completed TODOs

alias triumphs="job s -n -t todo -t done" ```

Now (in a new terminal or after you type source <shell profile file> ) to create a todo item you type todo <what should be done>.

To list today's todo items you type todos.

To list all todo items ever you type todos ever; for all this week, todos this week; for yesterday's, todos yesterday; etc.

To cross a particular item off the list you type did <some word unique to today's item>. The thing after did is interpreted as a regular expression. Only the first todo item in the given period whose description matches the regular expression will be marked as done. If you need to mark something as done which you didn't add today you need to provide the appropriate period. E.g.,

did something yesterday

Here is a screencast of some todo list manipulation.

Installation

To be ensured the latest version, one needs to use cargo:

cargo install jobrog

There is also a homebrew tap:

brew install dfhoughton/tap/jobrog

Changes from App::JobLog

For the most part the features of jobrog are a superset of those of App::JobLog. There are some differences, though:

Why Rewrite App::JobLog?

Acknowledgements

I would like to thank