Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

report/log: add lunar start time options 🌔 #215

Merged
merged 2 commits into from
Jul 30, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
docs: add documentation and completion for --luna
Maximilian committed Jul 30, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit cf226e6e0296bca37d70ca591b3b92f4550af22f
6 changes: 6 additions & 0 deletions docs/user-guide/commands.md
Original file line number Diff line number Diff line change
@@ -126,6 +126,8 @@ You can also use special shortcut options for easier timespan control:
`--day` sets the log timespan to the current day (beginning at 00:00h)
and `--year`, `--month` and `--week` to the current year, month or week
respectively.
The shortcut `--luna` sets the timespan to the current moon cycle with
the last full moon marking the start of the cycle.

If you are outputting to the terminal, you can selectively enable a pager
through the `--pager` option.
@@ -172,6 +174,7 @@ Flag | Help
`-t, --to DATE` | The date at which the log should stop (inclusive). Defaults to tomorrow.
`-y, --year` | Reports activity for the current year.
`-m, --month` | Reports activity for the current month.
`-l, --luna` | Reports activity for the current moon cycle.
`-w, --week` | Reports activity for the current week.
`-d, --day` | Reports activity for the current day.
`-a, --all` | Reports all activities.
@@ -329,6 +332,8 @@ You can also use special shortcut options for easier timespan control:
`--day` sets the report timespan to the current day (beginning at 00:00h)
and `--year`, `--month` and `--week` to the current year, month or week
respectively.
The shortcut `--luna` sets the timespan to the current moon cycle with
the last full moon marking the start of the cycle.

You can limit the report to a project or a tag using the `--project` and
`--tag` options. They can be specified several times each to add multiple
@@ -416,6 +421,7 @@ Flag | Help
`-t, --to DATE` | The date at which the report should stop (inclusive). Defaults to tomorrow.
`-y, --year` | Reports activity for the current year.
`-m, --month` | Reports activity for the current month.
`-l, --luna` | Reports activity for the current moon cycle.
`-w, --week` | Reports activity for the current week.
`-d, --day` | Reports activity for the current day.
`-a, --all` | Reports all activities.
2 changes: 1 addition & 1 deletion watson.completion
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ _watson_complete () {
COMPREPLY=($(compgen -W "$tags" -- ${cur}))
;;
*)
COMPREPLY=($(compgen -W "-a -c -C -d -f -g -G -j -m -p -t -T -w -y --all --current --no-current --pager --no-pager --from --to --project --tag --day --week --month --year --json" -- ${cur})) ;;
COMPREPLY=($(compgen -W "-a -c -C -d -f -g -G -j -m -p -t -T -w -y --all --current --no-current --pager --no-pager --from --to --project --tag --day --week --month --year --luna --json" -- ${cur})) ;;
esac
;;
merge)
4 changes: 4 additions & 0 deletions watson/cli.py
Original file line number Diff line number Diff line change
@@ -371,6 +371,8 @@ def report(watson, current, from_, to, projects, tags, year, month,
`--day` sets the report timespan to the current day (beginning at 00:00h)
and `--year`, `--month` and `--week` to the current year, month or week
respectively.
The shortcut `--luna` sets the timespan to the current moon cycle with
the last full moon marking the start of the cycle.
You can limit the report to a project or a tag using the `--project` and
`--tag` options. They can be specified several times each to add multiple
@@ -580,6 +582,8 @@ def log(watson, current, from_, to, projects, tags, year, month, week, day,
`--day` sets the log timespan to the current day (beginning at 00:00h)
and `--year`, `--month` and `--week` to the current year, month or week
respectively.
The shortcut `--luna` sets the timespan to the current moon cycle with
the last full moon marking the start of the cycle.
If you are outputting to the terminal, you can selectively enable a pager
through the `--pager` option.