From 9927e707834193c24b42c1e6b13257ad91998823 Mon Sep 17 00:00:00 2001 From: Harnoor Saini Date: Wed, 3 Aug 2022 14:22:18 +1200 Subject: [PATCH 1/2] Update readme with QoL aliases --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index ef31db8..c81105f 100644 --- a/README.md +++ b/README.md @@ -273,6 +273,38 @@ Export a Tyme 3 JSON: zeit export --format tyme --project "my project" --since "2020-04-01T15:04:05+07:00" --until "2020-04-04T15:04:05+07:00" ``` +### Quality of life aliases +All tested in `zsh` under `macOS Monterey Version 12.4` for a single task. An example of the time formats is as follows: `1994-11-05T08:15:30-05:00 corresponds to November 5, 1994, 8:15:30 am, US Eastern Standard Time.` + +#### Examples: + +Getting running totals (includes the currently running task time): + +`alias zlist-all="zeit list"` + +Today: +``` +alias zlist-tday="zlist-all --since "$(date +%F)T00:00:00+12:00" --total" +``` + +Current week: +``` +alias zlist-cweek="zlist-all --since "$(date -v -Mon +%F)T00:00:00+12:00" --total | grep TOTAL:" +``` + +Current month (coincides with total under `zeit stats`): +``` +alias zlist-cmonth="zlist-all --since "$(date +%Y-%m-01)T00:00:00+12:00" --total | grep TOTAL:" +``` + +Pausing the current task retroactively, e.g., after getting back from lunch. Replace `YOUR_PROJECT` and `YOUR_TASK` appropriately. +``` +function zbreak { + date -v-$1M +%H:%M | xargs -I{} zeit finish -s {} + zeit track --project YOUR_PROJECT --task YOUR_TASK +} +``` + ## Integrations Here are a few integrations and extensions built by myself as well as other From 4d6efdcc6b1a7c1308df8842b8af33e2a4c4cdf9 Mon Sep 17 00:00:00 2001 From: Harnoor Saini Date: Wed, 3 Aug 2022 14:25:24 +1200 Subject: [PATCH 2/2] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c81105f..1c87198 100644 --- a/README.md +++ b/README.md @@ -280,7 +280,9 @@ All tested in `zsh` under `macOS Monterey Version 12.4` for a single task. An ex Getting running totals (includes the currently running task time): -`alias zlist-all="zeit list"` +``` +alias zlist-all="zeit list" +``` Today: ```