From 9e9f90343b64a6fd543c0ff05390c1095532d496 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 31 Mar 2013 21:43:48 -0400 Subject: [PATCH] Tutorial - NN_configuration describes rc settings, overrides and the show and config commands. --- doc/misc/tutorial/NN_configuration/script.txt | 64 +++ doc/misc/tutorial/README | 7 + doc/misc/tutorial/configuration/run.200 | 520 ------------------ .../tutorial/configuration/script.200.txt | 40 -- doc/misc/tutorial/extra.txt | 4 + .../shell/{script.200.txt => script.txt} | 2 - 6 files changed, 75 insertions(+), 562 deletions(-) create mode 100644 doc/misc/tutorial/NN_configuration/script.txt delete mode 100755 doc/misc/tutorial/configuration/run.200 delete mode 100644 doc/misc/tutorial/configuration/script.200.txt rename doc/misc/tutorial/shell/{script.200.txt => script.txt} (97%) diff --git a/doc/misc/tutorial/NN_configuration/script.txt b/doc/misc/tutorial/NN_configuration/script.txt new file mode 100644 index 000000000..cc82aa0e9 --- /dev/null +++ b/doc/misc/tutorial/NN_configuration/script.txt @@ -0,0 +1,64 @@ +[Make window 116x32 for movie recording, light text, dark background] + +On the left are the typed commands. On the right is the audio track. Where the +left and right are aligned, the audio should match the commands. + + +---------------------------------------- Configuration --------------------------------------------- + +cat ~/.taskrc The taskwarrior configuration file is minimal. This means + it contains only what is needed to override the default + settings. Initially you see that the config file contains + just one setting which points to your data directory. + +task show The 'show' command displays all the configuration settings + with their current values. These are all described in the + taskrc man page. + +task show hyph You can provide a pattern, to limit the results to only + settings that match the pattern. + +task config hypenate off The config command is used to modify the configuration, + here we are turning off hyphenation. Notice that changes + require confirmation. + +task show hyph Now when we look at the setting, we see that it is now + highlighted to indicate that it not longer has the default + value. + +task config hyphenate on We can turn that setting back on. + +task config hyphenate Alternatively we can just remove the setting, and rely on + the default. This is a better choice because it de- + clutters your configuration file. + +task config answer 42 In this example, we set the configuration variable 'answer' + to have a value of 42. + +task show answer The 'show' command indicates that the setting is not + recognized. This could indicate a mistake with the setting + name. It is harmless to have unrecognized settings, but + also pointless. + +task config answer '' Specifying an empty value using quotes is how you would + set a blank value without restoring default settings. + +task config answer In this case, deleting the setting is correct. + + --- + +task rc.hyphenate=off list A very powerful feature is the ability to override the + configuration variables temporarily. Here we are running + the 'list' report with hyphenation temporarily disabled. + +task rc.data.location=/other/path list You can also override the data directory to use a different + task list ... + +task rc:~/.other_taskrc list Or you can override the configuration file completely. + +TASKDATA=/other/path task list The TASKDATA environment variable can also be used to + specify an alternate data directory, and ... + +TASKRC=~/.other_taskrc list The TASKRC variable can override the configuration file. + +---------------------------------------- End ------------------------------------------------------- diff --git a/doc/misc/tutorial/README b/doc/misc/tutorial/README index c6959f820..316d65088 100644 --- a/doc/misc/tutorial/README +++ b/doc/misc/tutorial/README @@ -24,4 +24,11 @@ having many, smaller sections that explore features at a greater depth. IRC Email Man pages + Reporting bugs + +NN_configuration + show command + config command + rc overrides + TASKDATA, TASKRC diff --git a/doc/misc/tutorial/configuration/run.200 b/doc/misc/tutorial/configuration/run.200 deleted file mode 100755 index bfcfb2bec..000000000 --- a/doc/misc/tutorial/configuration/run.200 +++ /dev/null @@ -1,520 +0,0 @@ -#! /bin/bash - -rm -f /Users/paul/.task/pending.data /Users/paul/.task/completed.data /Users/paul/.task/undo.data - -echo 'data.location=~/.task' > /Users/paul/.taskrc -echo 'color=off' >> /Users/paul/.taskrc -echo 'color.summary.background=on gray3' >> /Users/paul/.taskrc -echo '#include /usr/local/share/doc/task/rc/dark-blue-256.theme' >> /Users/paul/.taskrc -echo '#include /usr/local/share/doc/task/rc/dark-red-256.theme' >> /Users/paul/.taskrc -echo '#include /usr/local/share/doc/task/rc/dark-256.theme' >> /Users/paul/.taskrc - -# 1 Intro - -# 2 Basic usage -echo Basic usage -------------------------------------------------------------- -echo $ task add Select a free weekend in November -task add Select a free weekend in November -echo $ task add Select and book a venue -task add Select and book a venue -echo $ task add Come up with a guest list -task add Come up with a guest list -echo $ task add Mail invitations -task add Mail invitations -echo $ task add Select a caterer -task add Select a caterer -echo $ task list -task list -echo $ task log Order a special cake -task log Order a special cake -echo $ task 4 duplicate /Mail/Design/ -task 4 duplicate /Mail/Design/ -echo $ task 4 duplicate /Mail/Print/ -task 4 duplicate /Mail/Print/ -echo $ task list -task list -echo $ task 3 done -task 3 done -echo $ task list -task list - -# 3 Projects -echo Projects -------------------------------------------------------------- -echo $ task add Pay teh rent on teh 31st -task add Pay teh rent on teh 31st -echo $ task 7 /teh/the/g -task 7 /teh/the/g -echo $ task list -task list -echo $ task 7 project:home -task 7 project:home -echo $ task 1-6 project:party -echo 'All' | task 1-6 project:party -echo $ task projects -task projects -echo $ task list project:home -task list project:home -echo $ task li pro:par -task li pro:par - -# 4 Priorities -echo Priorities -------------------------------------------------------------- -echo $ task 1-3,5 priority:H -echo 'All' | task 1-3,5 priority:H -echo $ task list -task list -echo $ task 3 pri: -task 3 pri: - -# 5 Tags -echo Tags -------------------------------------------------------------- -echo $ task list -task list -echo $ task 3,5,6 +mall -echo 'All' | task 3,5,6 +mall -echo $ task long -task long -echo $ task list +mall -task list +mall -echo $ task 3 -mall -task 3 -mall - -# 6 Modifications -echo Modifications -------------------------------------------------------------- -echo $ task 7 Pay rent at the end of the month -echo 'Yes' | task 7 Pay rent at the end of the month -echo $ task add music -task add music -echo $ task 8 prepend Select some -task 8 prepend Select some -echo $ task 8 append for after dinner -task 8 append for after dinner -echo $ task list -task list -echo $ task edit -#task edit -echo $ task add Hire a band? -#task add Hire a band? -echo $ task add Hire a band\? -#task add Hire a band\? -echo $ task add "Hire a band?" -#task add "Hire a band?" -echo $ task add -- Hire a band\? +dj -task add -- Hire a band\? +dj -echo $ task undo -echo 'y' | task undo -echo $ task 1 delete -echo 'y' | task 1 delete -echo $ task undo -echo 'y' | task undo - -# 7 Info -echo Info -------------------------------------------------------------- -echo $ task 1 info -task 1 info -echo $ task stats -task stats - -# 8 Annotations -echo Annotations -------------------------------------------------------------- -echo $ task 1 annotate the 13 looks good -task 1 annotate the 13 looks good -sleep 1 -echo $ task 1 annotate or the 14th -task 1 annotate or the 14th -echo $ task list -task list -echo $ task list rc.annotations:full -task list rc.annotations:full -echo $ task list rc.annotations:sparse -task list rc.annotations:sparse -echo $ task list rc.annotations:none -task list rc.annotations:none -echo $ task 1 denotate 14th -task 1 denotate 14th -echo $ task list -task list - -# 9 Configuration -echo Configuration -------------------------------------------------------------- -echo $ task show -task show -echo $ task config answer forty-two -echo 'y' | task config answer forty-two -echo $ task show answer -task show answer -echo $ task config answer -echo 'y' | task config answer -echo $ task rc.report.list.sort=description+ list -task rc.report.list.sort=description+ list - -# 10 Defaults -echo Defaults -------------------------------------------------------------- -echo $ task config default.command list -echo 'y' | task config default.command list -echo $ task -task -echo $ task config default.priority H -echo 'y' | task config default.priority H -echo $ task config default.project Work -echo 'y' | task config default.project Work -echo $ task add New task -task add New task -echo $ task list -task list -echo $ task undo -echo 'y' | task undo -echo $ task config default.priority -echo 'y' | task config default.priority -echo $ task config default.project -echo 'y' | task config default.project - -# 11 Aliases -echo Aliases -------------------------------------------------------------- -echo $ task config alias.zzz list -echo 'y' | task config alias.zzz list -echo $ task zzz -task zzz -echo $ task z -task z - -# 12 Color -echo Color -------------------------------------------------------------- -echo $ task config color on -echo 'y' | task config color on -echo $ task list -task list -echo $ task 1 bg:on_red -task 1 bg:on_red -echo $ task list -task list -echo $ task 1 bg: -task 1 bg: -echo $ task color -task color -echo $ task color white on red -task color white on red -echo $ task color legend -task color legend -echo vi ~/.taskrc # include /usr/local/share/doc/task/rc/dark-blue-256.theme -#vi ~/.taskrc # include /usr/local/share/doc/task/rc/dark-blue-256.theme -echo 'include /usr/local/share/doc/task/rc/dark-blue-256.theme' >> x -echo $ task color legend -task color legend -echo $ task list -task list -echo vi ~/.taskrc # include /usr/local/share/doc/task/rc/dark-red-256.theme -#vi ~/.taskrc # include /usr/local/share/doc/task/rc/dark-red-256.theme -sed 's/blue/red/' x >x2 && mv x2 x -echo $ task color legend -task color legend -echo $ task list -task list -echo vi ~/.taskrc # include /usr/local/share/doc/task/rc/dark-256.theme -#vi ~/.taskrc # include /usr/local/share/doc/task/rc/dark-256.theme -sed 's/red-//' x >x2 && mv x2 x -echo $ task list -task list -echo $ task "rc.color.project.party=on rgb001" rc.color.keyword.invit=bold list -task "rc.color.project.party=on rgb001" rc.color.keyword.invit=bold list -echo $ man task-color -#man task-color - -# 13 Active tasks -echo Active tasks -------------------------------------------------------------- -echo $ task 2 start -task 2 start -echo $ task list -task list -echo $ task active -task active -echo $ task 2 stop -task 2 stop - -echo $ task config journal.time on -task config journal.time on -echo $ task config rc.dateformat.xxx xxx -task config rc.dateformat.xxx xxx -echo $ task config dateformat.annotation 'Y/m/d H:N' -task config dateformat.annotation 'Y/m/d H:N' -echo $ task 2 start -task 2 start -echo $ task list venue -task list venue -echo $ task 2 stop -task 2 stop -echo $ task list venue -task list venue - -# 14 Due dates -echo Due dates -------------------------------------------------------------- -echo $ task 1 due:7/31/2010 -task 1 due:7/31/2010 -echo $ task 1 due:2wks -task 1 due:2wks -echo $ task 1 due:-2wks -task 1 due:-2wks -echo $ task 1 due:eom -task 1 due:eom -echo $ task 2 due:8th -task 2 due:8th -echo $ task 2 due:sunday -task 2 due:sunday -echo $ task 5 due:eow -task 5 due:eow -echo $ task list -task list -echo $ task overdue -task overdue -echo $ task rc.dateformat.report:Y-M-DTH:N:SZ list -task rc.dateformat.report:Y-M-DTH:N:SZ list - -# 15 Calendar -echo Calendar -------------------------------------------------------------- -echo $ task calendar -task calendar -echo $ vi ~/.taskrc # include /usr/local/share/doc/task/rc/holidays-US.rc -#vi ~/.taskrc # include /usr/local/share/doc/task/rc/holidays-US.rc -echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x -echo $ task calendar -task calendar -echo $ task cal 2010 -task cal 2010 -echo $ task rc.calendar.details:full cal -task rc.calendar.details:full cal -echo $ task rc.calendar.holidays:full cal -task rc.calendar.holidays:full cal - -# 16 Recurrence -echo Recurrence -------------------------------------------------------------- -echo $ task 7 info -task 7 info -echo $ task 7 due:eom recur:monthly -task 7 due:eom recur:monthly -echo $ task 7 -task 7 -echo $ task 7 until:eoy -task 7 until:eoy -echo $ task recurring -task recurring -echo $ task add Pay taxes due:4/15/2007 recur:yearly -task add Pay taxes due:4/15/2007 recur:yearly -echo $ task long -task long -echo $ task 11 delete -printf "y\ny\n" | task 11 delete # y, y -echo $ task list -task list - -# 17 Special tags -echo Special tags -------------------------------------------------------------- -echo $ task 6 +nocolor -task 6 +nocolor -echo $ task list -task list -echo $ task tags -task tags -echo $ task 6 -nocolor -task 6 -nocolor - -# 18 Waiting -echo Waiting -------------------------------------------------------------- -echo $ task add Look for new apartment due:eoy -task add Look for new apartment due:eoy -echo $ task list -task list -echo $ task 10 wait:12/1/2010 -task 10 wait:12/1/2010 -echo $ task list -task list -echo $ task waiting -task waiting -echo $ task add Do something in a few seconds -task add Do something in a few seconds -echo $ task 11 wait:5s -task 11 wait:5s -echo $ task list -task list -sleep 5 -echo $ task list -task list -echo $ task 11 rc.confirmation:no delete -task 11 rc.confirmation:no delete - -# 19 Dependencies -echo Dependencies -------------------------------------------------------------- -echo $ task list pro:party -task list pro:party -echo $ task 3 depends:6 -task 3 depends:6 -echo $ task 6 dep:5 -task 6 dep:5 -echo $ task 2 dep:1 -task 2 dep:1 -echo $ task 5 dep:1,2 -task 5 dep:1,2 -echo $ task 4 dep:1 -task 4 dep:1 -echo $ task long pro:party -task long pro:party -echo $ task 5 dep:-1 -task 5 dep:-1 -echo $ task blocked -task blocked -echo $ task unblocked -task unblocked -echo $ task 1 info -task 1 info -echo $ task 2 info -task 2 info -echo $ task 2 done -echo 'y' | task 2 done -echo $ task 1 info -task 1 info - -# 20 Reports -echo Reports -------------------------------------------------------------- -echo $ task minimal -task minimal -echo $ task ls -task ls -echo $ task list -task list -echo $ task long -task long -echo $ task all -task all -echo $ task completed -task completed -echo $ task recurring -task recurring -echo $ task waiting -task waiting -echo $ task blocked -task blocked -echo $ task oldest -task oldest -echo $ task newest -task newest -echo $ task timesheet -task timesheet -echo $ task next -task next - -# 21 Custom report -echo Custom report -------------------------------------------------------------- -echo 'report.foo.description=My own report' >> x -echo 'report.foo.columns=id,entry,description' >> x -echo 'report.foo.labels=ID,Entered,Description' >> x -echo 'report.foo.sort=entry+,description+' >> x -echo 'report.foo.filter=status:pending' >> x -echo 'task help | grep foo' -task help | grep foo -echo $ task show report.foo -task show report.foo -echo $ task foo -task foo - -# 22 Charts -echo Charts -------------------------------------------------------------- -echo $ task history -task history -echo $ task history.annual -task history.annual -echo $ task ghistory -task ghistory -echo $ task ghistory.annual -task ghistory.annual -echo $ task summary -task summary - -# 23 Advanced filters -echo Advanced filters -------------------------------------------------------------- -echo $ task list -task list -echo $ task list invit -task list invit -echo $ task list description.contains:invit -task list description.contains:invit -echo $ task list desc.word:the -task list desc.word:the -echo $ task list desc.noword:invitations -task list desc.noword:invitations -echo $ task list pro:party -task list pro:party -echo $ task list pro.is:party -task list pro.is:party -echo $ task list pro.not:party -task list pro.not:party -echo $ task list pro:party priority.over:L -task list pro:party priority.over:L -echo $ task list pro:party limit:2 -task list pro:party limit:2 -echo $ task list limit:page -task list limit:page -echo $ task all status:pending -task all status:pending -echo $ task all status:waiting -task all status:waiting - -# 24 Import/export -echo Import/export -------------------------------------------------------------- -echo $ task export.csv -task export.csv -echo $ task export.csv venue -task export.csv venue -echo $ task export.vcalendar venue -task export.vcalendar venue -echo $ task export.yaml venue -task export.yaml venue - -cat <file.text -Remember to read the task man page -EOF -cat file.text -echo $ task import file.text -printf "y\n" | task import file.text - -cat <file.yaml -%YAML 1.1 ---- - task: - description: Visit http://taskwarrior.org - due: 1281844800 - entry: 1281289630 - priority: H - project: work - status: pending - uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0 -... -EOF -cat file.yaml -echo $ task import file.yaml -printf "y\n" | task import file.yaml -echo $ task new limit:2 -task new limit:2 - -# 25 Help -echo Help -------------------------------------------------------------- -echo $ task help -task help -echo $ man task -#man task -echo $ man taskrc -#man taskrc -echo $ man task-color -#man task-color -echo $ man task-tutorial -#man task-tutorial -echo $ man task-faq -#man task-faq -echo $ man task-sync -#man task-sync - -# 26 Wrap up -echo Wrap up -------------------------------------------------------------- -echo $ task version -task version - -exit - diff --git a/doc/misc/tutorial/configuration/script.200.txt b/doc/misc/tutorial/configuration/script.200.txt deleted file mode 100644 index 0d745f9d5..000000000 --- a/doc/misc/tutorial/configuration/script.200.txt +++ /dev/null @@ -1,40 +0,0 @@ -[Make window 116x32 for movie recording, light text, dark background] - -This is the script from which a 2.0-specific movie will be made. On the left -are the typed commands, and on the right is the voice track. - -It is intended that the left and right be combined and the result will be a new -task-tutorial.5 man page. - - - ----------------------------------------- Configuration --------------------------------------------- - -task show There is a 'show' command, that is used to display the - active configuration. There are hundreds of settings that - can be changed, and every one has a sensible default. - -man taskrc If you want a complete list of all the settings and their - meanings, read the man page. - -task config answer 42 The 'config' command is used to modify the settings, and in - this case the configuration variable 'answer' is given the - value of 42. - -task show answer The 'show' command indicates that the value was changed, -task config answer and also that the variable is unrecognized. The show - command performs a detailed check on your configuration, and - alerts you to several kinds of problem. The config command - can also remove a value. - -task rc.report.list.sort=description+ list - A very powerful feature is the ability to override the - configuration variables temporarily. Here I am requesting - an ascending sort on the description field only. - ----------------------------------------- End ------------------------------------------------------- - -Mention minimal asspect of ~/.taskrc -Mention rc override of file -Mention rc overrides of values - diff --git a/doc/misc/tutorial/extra.txt b/doc/misc/tutorial/extra.txt index 5dfda573b..907f9b385 100644 --- a/doc/misc/tutorial/extra.txt +++ b/doc/misc/tutorial/extra.txt @@ -2,6 +2,8 @@ Calendar trick ln -s `which task` ./cal ./cal +Metadata + Sync push pull @@ -35,3 +37,5 @@ Setup Reporting bugs +Holidays + diff --git a/doc/misc/tutorial/shell/script.200.txt b/doc/misc/tutorial/shell/script.txt similarity index 97% rename from doc/misc/tutorial/shell/script.200.txt rename to doc/misc/tutorial/shell/script.txt index b252661d6..5e9c9fb34 100644 --- a/doc/misc/tutorial/shell/script.200.txt +++ b/doc/misc/tutorial/shell/script.txt @@ -18,5 +18,3 @@ task> quit ---------------------------------------- End ------------------------------------------------------- -Show use of rlwrap. -