Quần Cam

Worque - CLI that manages your daily notes

I would like to introduce Worque (pronounced as work), which is a CLI to manage all your daily notes like a boss, with vim integration.

Why Worque?

Coders hate report. Yes, let me recap: CODERS HATE REPORT!

  • Ever got stunned when your boss suddenly asked what you’ve done yesterday?
  • To look back at your tasks for today without leaving your beloved terminal and VIM.

If so, worque might be a fit for you.

Installation

$ gem install worque

How to use Worque?

Add this to your .bash_profile

$ export WORQUE_PATH='/path/to/your/lovely/notes'

Personally I’d like to map it to my Dropbox.

$ export WORQUE_PATH='~/Dropbox/Notes/Todos'

After that, executing the command below will create a today’s note for you

$ worque todo --for=today
# ~/notes/checklist-2016-07-19.md

Or look back what’s done yesterday.

$ workque todo --for yebsterday
# ~/notes/checklist-2016-07-18.md

Oops! Today is Monday? No worries, worque got you covered

# If today is Monday 25-07-2016
$ workque todo --for yesterday
# ~/notes/checklist-2016-07-22.md

It’s chain-able with other commands

$ vim worque
$ vim $(worque todo --for=yesterday)
$ cat $(worque todo --for=yesterday) | grep pending

Anyway this is how I alias it in my .zshrc or .bash_profile. See https://github.com/qcam/dotfiles/blob/master/zsh/aliases.zsh#L35

$ alias today="vim $(worque todo --for today) +':cd $WORQUE_PATH'"
$ alias ytd="vim $(worque todo --for yesterday) +':cd $WORQUE_PATH'"

Slack Integration

Yes, you can publish your daily notes to Slack too!

Just make sure you have set SLACK_API_TOKEN accordingly to spare your fingers typing everytime. See this post to get an idea of how to generate Slack API Token.

$ export SLACK_API_TOKEN="something-very-secret"

Then you can use worque push to push your notes to Slack

$ worque push --channel=daily-report

# or forgot do it yesterday? No worries!

$ worque push --channel=daily-report --for=yesterday

VIM Integration

Yes, worque loves VIM too!!!

Add this to your vimrc

Plug 'qcam/vim-worque' # if you're using vim-plug
Plugin 'qcam/vim-worque' # or Vundle

Then try :TD, :YTD in your VIM to view the notes for today and yesterday respectively

References

Read more about worque. Read more about vim-worque. View more in my dotfiles

Happy Reporting!!!

Any thoughts or ideas are welcome!!!


NGUY HIỂM! KHU VỰC NHIỀU GIÓ!
Khuyến cáo giữ chặt bàn phím và lướt thật nhanh khi đi qua khu vực này.
Chức năng này hỗ trợ markdown và các thứ liên quan.

Bài viết cùng chủ đề

Build a blog in Elixir with Nabo and Phoenix

Nabo is a simple, extendable and fast blog engine written in Elixir. This blog post shows how easy it is to integrate Nabo into your Phoenix application.

ExUnit capture log và Erlang IO system

Bài viết giải thích cách IO system trong Erlang vận hành và một số ứng dụng của nó.

Elixir - Ngôn ngữ được viết bằng macros

Macro không những là một trong những viên gạch giúp bạn meta-program với Elixir, mà nó còn là công cụ giúp Elixir meta-program … chính nó nữa.