Skip to main content

Command line work day helper and logger

Project description

WDC

Command line work day helper and logger

CI PyPI version

Logo

Purpose

The purpose of wdc is to provide a simple CLI application for time tracking.

Born out of a nuisance that I could never tell when the working day was actually over and amazed overtime with little compensation.

Description

Trying to come up with something better than: "timetracking in the CLI"

Changelog

The changelog can be found here

Installation

From source code

Clone the repository:

git clone https://github.com/dejanfajfar/wdc.git .

If you have make available then simply execute the install target

make install

If make is not available on your system then you can run the underlying python command. For that you have to navigate to the directory containing the setup.py file. In that directory execute

python setup.py install

Time format

wdc uses a simplified time format similar to the military (hhmm). This uses a 24 hour format, so not AM/PM.

The table below should provide some additional information and clarification on how this time format maps to the more standard 24 and 12 hour format

hhmm 24 Hour 12 hour
0000 00:00 12:00 AM
0100 01:00 01:00 AM
0200 02:00 02:00 AM
0300 03:00 03:00 AM
0400 04:00 04:00 AM
0500 05:00 05:00 AM
0600 06:00 06:00 AM
0700 07:00 07:00 AM
0800 08:00 08:00 AM
0900 09:00 09:00 AM
1000 10:00 10:00 AM
1100 11:00 11:00 AM
1200 12:00 12:00 PM
1300 13:00 01:00 PM
1400 14:00 02:00 PM
1500 15:00 03:00 PM
1600 16:00 04:00 PM
1700 17:00 05:00 PM
1800 18:00 06:00 PM
1900 19:00 07:00 PM
2000 20:00 08:00 PM
2100 21:00 09:00 PM
2200 22:00 10:00 PM
2300 23:00 11:00 PM

The minutes work as expected.

Commands

calc

The calc command is used to calculate the theoretical end of the current working day.

sample

$ wdc calc 0800
1615

Arguments

The time at which the work day started in the hhmm format

Options

-b, --break_duration

The duration of the lunch break in minutes.

Default value is 30 minutes.

If no break was consumed can be provided as 0.

Examples

Working day with 30 minute break

$ wdc 0800 -b 30

Working day with no break

$ wdc 0800 -b 0

-d, --workday_duration

The duration of the workday in hhmm format

Default value is 0745.

Examples

An 8 hour workday starting at 8:00

$ wdc 0800 -d 0800

start

Used to start a new work day task and store it.

In order to start a new task you do not have to call an end command. Just start the new task and the old one will be automatically closed

sample

$ wdc start 0800 -t Customer -t Project -m The task description

Arguments

The time at which the task started in the hhmm format

Options

-t, --tag

Provide a generic tag to associate with the task.

Multiple tags can be provided, if so then each has to be provided with its own -t or --tag option.

-m, --message

Provide a descriptive message to associate with the task

-e, --end

Provide an optional end time for the task in hhmm format

-d, --date

Provide the date to which this task should be associated to.

Examples

Start an anonymous task

$ wdc start 0800

Start a task with a know end time

$ wdc start 0800 -e 0900

Start a task for a date other than today

wdc start 0800 -d 2020-01-01

end

Adds a end time to the last work task of the given day

If no date is provided the today is takes as a default

sample

$ wdc end

Arguments

No arguments supported by the command

Options

-d, --date

Provide the optional date on which the last task should be closed

-e, --end

Provide an optional end time for the task in hhmm format

If not provided then the current time is taken

Examples

End current working day with by providing an end time

$ wdc end -e 1630

End last task from another day

$ wdc end -d 2020-10-25

list

List all stored work tasks for the day

sample

$ wdc list

Arguments

No arguments supported by the command

Options

-d, --date

Provide optional date for which tasks should be listed

-a, --all

Flag to denote if all tasks should be shown, or not

If set then the change history of each task will be returned

Examples

List all tasks for today, even the internally duplicated ones

$ wdc list -a

List tasks for a given day

$ wdc list -d 2020-10-25

info

Provides detailed information about the given task

sample

$ wdc info 0c3a9014

Arguments

The id of the task already recorded

The task ID can be retrived with the list command

Options

The command does not support any options at this point

Examples

The only use case is shown in the sample.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

wdc-0.2.7-py3-none-any.whl (21.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page