命令行todo神器taskwarrior使用簡介


簡介

taskwarrior是一個命令行的任務管理神器,同時也有服務端,支持同步。
語法規則為

安裝

Linux上可以直接軟件包管理器安裝
Window可以用cygwin
Mac可以用homebrew
android推薦taskwarrior-android

同步

推薦freecinc

  • 生成密鑰
    點擊generated my keys
  • 按照提示保存密鑰,一共是三個文件
  • 按照提示配置好task
  • 同步
    第一次同步使用 task sync init,之后使用task sync
  • 和安卓同步,參考taskwarrior的官網文檔
    其實就是把三個文件保存到對應的目錄,然后編輯配置文件,填上路徑。

另外有一個在線版,本人更喜歡命令行版,沒做研究。

常用命令

添加

task add 任務名 [pro:工程名] [tag:標簽名或簡寫為+][due:到期時間] [pri:優先級] [dep:依賴任務id]

[]表示可選,其中優先級有H、M、L(高中低)
時間格式為:

標識 說明
m 1 or 2 digit month number, eg '1', '12'
M 2 digit month number, eg '01', '12'
d 1 or 2 digit day of month number¸ eg '1', '12'
D 2 digit day of month number, eg '01', '30'
y 2 digit year, eg '12', where the century is assumed to be '20', therefore '2012'
Y 4 digit year, eg '2015'
h 1 or 2 digit hours, eg '1', '23'
H 2 digit month hours, eg '01', '23'
n 1 or 2 digit minutes, eg '1', '59'
N 2 digit minutes, eg '01', '59'
s 1 or 2 digit seconds, eg '1', '59'
S 2 digit seconds, eg '01', '59'
v 1 or 2 digit week number, eg '1', '52'
V 2 digit week number, eg '01', '52'
a 3-character English day name abbreviation, eg 'mon', 'tue'
A Complete English day name, eg 'monday', 'tuesday'
b 3-character English month name abbreviation, eg 'jan', 'feb'
B Complete English month name, eg 'january', 'february'
Everythingelse All other format characters are taken as literals

開始 結束 刪除

task id start/done/del

修改

task id mod [命令:參數]
比如 task 1 mod pro:test 把id為1的 工程修改為 test

統計

  • task sum
  • task ghistory
  • task calendar
  • task burndown.daily

自定義

task默認是按任務的緊迫度來排序的,它采用了一個多項式來計算緊迫度,包括工程、標簽、到期時間、優先級、依賴等參數。
當然我們可以修改默認排序,通過修改config來自定義。
可以按tag、project來排序,還可以修改阻塞(blocked)任務的排序屬性,數值為負數時表示降低。
如:

  • task config urgency.user.tag.problem.coefficient 4.5 ,表示如果tag為problem,則緊迫度為4.5
  • task config urgency.user.project.Home.coefficient 2.9
  • task config urgency.blocked.coefficient 0.0 表示有阻塞的task緊迫度不變

過濾

  • 時間
    Show tasks I added in the last 4 days.
    $ task entry.after:today-4days list
    Show tasks I added yesterday.
    $ task entry:yesterday list
    Show tasks I added in the last hour.
    $ task entry.after:now-1hour list
    Show tasks I completed between a date range.
    $ task end.after:2015-05-01 and end.before:2015-05-31 completed
    Show tasks I completed in the last week.
    $ task end.after:today-1wk completed
  • 工程
    Show tasks in This project or That project.
    $ task project:This or project:That list
    More complex algebraic filters.
    $ task project:This and ( priority:H or priority:M ) list
  • 搜索
    Search for pattern in description and annotations:
    $ task /pattern/ list
    $ task rc.search.case.sensitive:yes /pattern/ list
    $ task rc.search.case.sensitive:no /pattern/ list


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM