Compare commits
735 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf36b47593 | ||
|
|
58b077df0e | ||
|
|
9c93fe7c88 | ||
|
|
73110ae033 | ||
|
|
08bbd38615 | ||
|
|
6cb5c7a104 | ||
|
|
b56b5bc29d | ||
|
|
558bf2ca50 | ||
|
|
5ba23a4ecd | ||
|
|
46c031c45c | ||
|
|
f553915b2f | ||
|
|
01bb76b3b6 | ||
|
|
f8d8d2f6b5 | ||
|
|
fe9eb9cacb | ||
|
|
50f23d4b75 | ||
|
|
62d2c6bb5f | ||
|
|
4a1edfb9be | ||
|
|
c20bfffbce | ||
|
|
cfdd7efea9 | ||
|
|
5bc1bfe331 | ||
|
|
9eed851fbb | ||
|
|
6dca4dd056 | ||
|
|
a5123dd2b7 | ||
|
|
488b23f42f | ||
|
|
ffa1bac193 | ||
|
|
2aac37dcb7 | ||
|
|
e6d47f233b | ||
|
|
191d8ef355 | ||
|
|
ca6bfeb2f2 | ||
|
|
0a5e380bbf | ||
|
|
79a4f666aa | ||
|
|
f74bed4355 | ||
|
|
18e9f6e8ec | ||
|
|
6e11267724 | ||
|
|
af490fb634 | ||
|
|
1e38cbd6a0 | ||
|
|
1e37d7a784 | ||
|
|
314f64f775 | ||
|
|
f285ae535f | ||
|
|
34f80d03e3 | ||
|
|
6de940acf1 | ||
|
|
837b89dd2d | ||
|
|
d177acfcbd | ||
|
|
354debcf96 | ||
|
|
12a90fb477 | ||
|
|
47b5586d45 | ||
|
|
12146a6f01 | ||
|
|
e9301257f8 | ||
|
|
bfb29998bf | ||
|
|
c5427c91fc | ||
|
|
9e5f1787d0 | ||
|
|
783867c512 | ||
|
|
bb6f456e04 | ||
|
|
6d653f720d | ||
|
|
4e62d8fddc | ||
|
|
c6bde0aaba | ||
|
|
d39d5af03b | ||
|
|
36800e0a35 | ||
|
|
a921ea4ed6 | ||
|
|
0159cfde2f | ||
|
|
2708b37ce5 | ||
|
|
98861d87d6 | ||
|
|
8823ba5bfa | ||
|
|
96d2acef42 | ||
|
|
0e1d12f5b1 | ||
|
|
1f8ae07b8e | ||
|
|
0bc7dd11a8 | ||
|
|
a288a19c16 | ||
|
|
fec2af34bc | ||
|
|
b609cdb8a0 | ||
|
|
bde1e0dd9a | ||
|
|
a75c018106 | ||
|
|
70306de6bd | ||
|
|
30f757ba13 | ||
|
|
6af7540fe7 | ||
|
|
533bbedd81 | ||
|
|
42521fea8b | ||
|
|
74dcdd897a | ||
|
|
4028a2fce4 | ||
|
|
1b5178c456 | ||
|
|
1a16b3ae6b | ||
|
|
042d7b40de | ||
|
|
b041e54be6 | ||
|
|
5c36013ddd | ||
|
|
b630138e8b | ||
|
|
9e9807a52a | ||
|
|
0aa87d04da | ||
|
|
cb14ed128e | ||
|
|
6fd876b8dd | ||
|
|
616e230920 | ||
|
|
a043b42373 | ||
|
|
952845b1b0 | ||
|
|
0e355b45e1 | ||
|
|
fc26eebea6 | ||
|
|
0c0cb7b0f5 | ||
|
|
84b609f518 | ||
|
|
dece0a8dca | ||
|
|
5d4cafb7a6 | ||
|
|
9e4786e4fe | ||
|
|
fa46fcf8ca | ||
|
|
59fa056c4b | ||
|
|
9f567aa3c6 | ||
|
|
70360cadec | ||
|
|
89f82847fb | ||
|
|
bf316974d9 | ||
|
|
7fdfcbacc6 | ||
|
|
dea7b72b70 | ||
|
|
d73601c0b2 | ||
|
|
adc7992608 | ||
|
|
68d5e3f296 | ||
|
|
0d364746c7 | ||
|
|
eb2cb99532 | ||
|
|
1d3aa891d6 | ||
|
|
dd86c2c875 | ||
|
|
0388bcf259 | ||
|
|
f351bf6dec | ||
|
|
1e7bebb3b2 | ||
|
|
77815c080f | ||
|
|
8a2e979726 | ||
|
|
895a86903e | ||
|
|
3be6ef4bfd | ||
|
|
1639d5952a | ||
|
|
f9f3ae720d | ||
|
|
34c21f5d43 | ||
|
|
7752b37139 | ||
|
|
22bd31059d | ||
|
|
ec3c1c4def | ||
|
|
975c2bbcb9 | ||
|
|
8904daf9e5 | ||
|
|
afbbc87ec4 | ||
|
|
347dda7fa7 | ||
|
|
084d104c2f | ||
|
|
9aedaba7f2 | ||
|
|
b1933c5d25 | ||
|
|
87158f505a | ||
|
|
0dd71612e4 | ||
|
|
73ff6ea973 | ||
|
|
3b7b7b5b23 | ||
|
|
7f54b89f24 | ||
|
|
0930f3c5f7 | ||
|
|
04c6c11175 | ||
|
|
8076a70225 | ||
|
|
e562fc8fd4 | ||
|
|
9d41d9046d | ||
|
|
9b46520ae1 | ||
|
|
3d5656fb57 | ||
|
|
f0a5c917c9 | ||
|
|
6e1a386ec8 | ||
|
|
d012fc9717 | ||
|
|
366c59e25d | ||
|
|
1cc67e9895 | ||
|
|
b32d731010 | ||
|
|
21c3d1ab80 | ||
|
|
ceb7a188bf | ||
|
|
db9333ec64 | ||
|
|
04ddf74a07 | ||
|
|
4d46be0767 | ||
|
|
2eaba55481 | ||
|
|
869655e818 | ||
|
|
d362088305 | ||
|
|
87ce13c8e0 | ||
|
|
4139f32acf | ||
|
|
d3ca5c04e3 | ||
|
|
d8913c2f15 | ||
|
|
808934483f | ||
|
|
d738f778ee | ||
|
|
3a566460a2 | ||
|
|
69ac9a4296 | ||
|
|
f2a5dde3a6 | ||
|
|
d85feef7ea | ||
|
|
4cd528661a | ||
|
|
c27097e286 | ||
|
|
e619f8c91d | ||
|
|
199114abcd | ||
|
|
0e2c090dc5 | ||
|
|
58d678f927 | ||
|
|
3cfcc9fb6b | ||
|
|
a1488d0504 | ||
|
|
547d3bfdbb | ||
|
|
7d048a8ef8 | ||
|
|
44fe227595 | ||
|
|
a9b18da214 | ||
|
|
5c235ce1ef | ||
|
|
d460e604ff | ||
|
|
612c613764 | ||
|
|
d9ec233d23 | ||
|
|
2c055157e6 | ||
|
|
91d5448a5a | ||
|
|
80f9af08e3 | ||
|
|
63384abd14 | ||
|
|
c7cd2d2619 | ||
|
|
d2fe093107 | ||
|
|
7c8793b146 | ||
|
|
ae56165c80 | ||
|
|
d1abda2561 | ||
|
|
d02eac07a9 | ||
|
|
2334911b34 | ||
|
|
36c3cad5a5 | ||
|
|
07e36e695d | ||
|
|
1093119f40 | ||
|
|
8789afb7da | ||
|
|
94bca5443a | ||
|
|
98042548dd | ||
|
|
5b8dbd8ff1 | ||
|
|
41f2520094 | ||
|
|
982ae87ec0 | ||
|
|
0fe75eeedf | ||
|
|
3ae5b6ddc5 | ||
|
|
a306892509 | ||
|
|
a8c8bf4671 | ||
|
|
6d5a03ac45 | ||
|
|
3bb7abf9c3 | ||
|
|
f83cc3f39a | ||
|
|
c95a55128a | ||
|
|
3302a30145 | ||
|
|
599a90ad58 | ||
|
|
5f8f8b51c4 | ||
|
|
7294869d07 | ||
|
|
b8a3c1b565 | ||
|
|
03c9b96955 | ||
|
|
80d1c03457 | ||
|
|
6dd4067167 | ||
|
|
2c858c6988 | ||
|
|
d8544181ce | ||
|
|
3ac627978c | ||
|
|
fce4633de6 | ||
|
|
f6cfa1dfa5 | ||
|
|
aa891401e4 | ||
|
|
c640e05049 | ||
|
|
3945ccf019 | ||
|
|
1687e85335 | ||
|
|
b050d67ba9 | ||
|
|
cade134f40 | ||
|
|
92ede80e4b | ||
|
|
448f865cf1 | ||
|
|
e26f29537a | ||
|
|
d85579d69f | ||
|
|
462c3e1c55 | ||
|
|
70bf3099ee | ||
|
|
db27328558 | ||
|
|
e090f556da | ||
|
|
f60205c704 | ||
|
|
233a6ae951 | ||
|
|
d890e05298 | ||
|
|
2f1c582d7d | ||
|
|
cddc2d5f10 | ||
|
|
44e7a24170 | ||
|
|
471571e493 | ||
|
|
6e1aa42d1a | ||
|
|
3939503377 | ||
|
|
fecdb930d4 | ||
|
|
d0db821298 | ||
|
|
1cf1e79e43 | ||
|
|
69c3ba6f59 | ||
|
|
9cab648d8a | ||
|
|
2ef30b1183 | ||
|
|
4d266412ee | ||
|
|
e44c4ffb82 | ||
|
|
bef7b9b655 | ||
|
|
209a7b8cee | ||
|
|
3952765de0 | ||
|
|
e886f7635b | ||
|
|
76fa56d3fb | ||
|
|
903b5b34d4 | ||
|
|
189fdaf9ac | ||
|
|
96bd3ff8db | ||
|
|
a6fbb40a12 | ||
|
|
78edb61c4c | ||
|
|
3846954c42 | ||
|
|
7468a2d81d | ||
|
|
123a46eef9 | ||
|
|
cb4fe4fffb | ||
|
|
031c4c484d | ||
|
|
43266a825f | ||
|
|
7dc55d831d | ||
|
|
6f67c0093d | ||
|
|
eeeff7d389 | ||
|
|
5cecc3d772 | ||
|
|
a3f1aba6f0 | ||
|
|
30cb5fa4f4 | ||
|
|
e8c0c8861b | ||
|
|
9906174547 | ||
|
|
fb2d08581e | ||
|
|
feeafb9b23 | ||
|
|
a345541ff7 | ||
|
|
9a973770d8 | ||
|
|
e0c60346dc | ||
|
|
faa96dbf6b | ||
|
|
f9e78142be | ||
|
|
da9985058b | ||
|
|
bdbe4ba78a | ||
|
|
3ec8d2fece | ||
|
|
1528fdc7e1 | ||
|
|
e34f278e1d | ||
|
|
455be5b8b7 | ||
|
|
9df86d9aab | ||
|
|
0e9ce4c85f | ||
|
|
4ca69b013f | ||
|
|
1a34a29b7a | ||
|
|
1bb21f9982 | ||
|
|
a57326a026 | ||
|
|
3f6358fea0 | ||
|
|
81a5461d92 | ||
|
|
af3f60cfeb | ||
|
|
445dc415d0 | ||
|
|
afb4d64a0c | ||
|
|
942f665d71 | ||
|
|
51c357af2e | ||
|
|
5ac0bd3800 | ||
|
|
bdaf403a1c | ||
|
|
1b2cfd427c | ||
|
|
9a50c0b963 | ||
|
|
6864ff91cd | ||
|
|
d6a2c1872c | ||
|
|
c43eb31374 | ||
|
|
89eb8371ba | ||
|
|
3dca0283f4 | ||
|
|
5776d608c0 | ||
|
|
63e42c6607 | ||
|
|
9385492114 | ||
|
|
beef03af13 | ||
|
|
10a8916eb1 | ||
|
|
45bb3dd583 | ||
|
|
64344d0328 | ||
|
|
bcd2a79a54 | ||
|
|
7233fcd05b | ||
|
|
54cf7e5471 | ||
|
|
19b803312f | ||
|
|
27a56d15db | ||
|
|
98cef98111 | ||
|
|
d87e7c6934 | ||
|
|
fdf7d2203f | ||
|
|
f814435939 | ||
|
|
5af7e3a7b7 | ||
|
|
8c3fd40c1b | ||
|
|
e9c8bcff63 | ||
|
|
7a23b67020 | ||
|
|
93e862b367 | ||
|
|
90c40dbebf | ||
|
|
7e5c0eb9a5 | ||
|
|
c6f6d405e3 | ||
|
|
b29f9969e5 | ||
|
|
254b418708 | ||
|
|
307027a1d9 | ||
|
|
2b48ae8e38 | ||
|
|
8b02d2bdeb | ||
|
|
28dd5152d7 | ||
|
|
9ed05fc1c8 | ||
|
|
a13989f18e | ||
|
|
97bb07a617 | ||
|
|
01d0d036a4 | ||
|
|
7de5b22f1c | ||
|
|
cb635c0d6f | ||
|
|
111e9f893d | ||
|
|
f96d2e6609 | ||
|
|
8a930653a4 | ||
|
|
bc46888bcd | ||
|
|
67fd7e2faa | ||
|
|
9f96ab28ce | ||
|
|
a66f59a7e1 | ||
|
|
24e1522e32 | ||
|
|
f5bc5dfd0f | ||
|
|
82702bffdc | ||
|
|
1a05224816 | ||
|
|
e4f7bda430 | ||
|
|
38ca8c8fb5 | ||
|
|
ad9c89b9fb | ||
|
|
25db00e97d | ||
|
|
b3f3261190 | ||
|
|
6efd3299fe | ||
|
|
844c980bce | ||
|
|
ce99cbf2d4 | ||
|
|
5fb349ca9b | ||
|
|
00041dce41 | ||
|
|
d6631767b5 | ||
|
|
0c4f83377a | ||
|
|
a45d6b459f | ||
|
|
d77a790f21 | ||
|
|
5ecbd85020 | ||
|
|
6428b026ba | ||
|
|
716ed39695 | ||
|
|
c650edd4f9 | ||
|
|
484c31f0e4 | ||
|
|
d00b57ec65 | ||
|
|
724e9b8113 | ||
|
|
356519e58f | ||
|
|
213a7a519b | ||
|
|
d7c446f010 | ||
|
|
14508742f1 | ||
|
|
6ea6c79375 | ||
|
|
426eac97aa | ||
|
|
7f99d39d19 | ||
|
|
623f8d869e | ||
|
|
b2eb9c3265 | ||
|
|
688233b3a4 | ||
|
|
12cdee9809 | ||
|
|
66fcdfe01f | ||
|
|
0f7cf1cd52 | ||
|
|
007c194c8c | ||
|
|
ff18241f6f | ||
|
|
9477660e02 | ||
|
|
1f8f4c631d | ||
|
|
05fd9278a6 | ||
|
|
f1a0b842dc | ||
|
|
cd59f7f510 | ||
|
|
6a1a1cd70f | ||
|
|
3c2987f53f | ||
|
|
2ab1df77df | ||
|
|
abf31a6b35 | ||
|
|
b6d320d311 | ||
|
|
cd648270ab | ||
|
|
2161ffac2c | ||
|
|
4f4a32b405 | ||
|
|
99bce308e6 | ||
|
|
916b8641b3 | ||
|
|
2f85941d37 | ||
|
|
f3f4ae15eb | ||
|
|
5e53226eb8 | ||
|
|
2c7552222a | ||
|
|
8572080677 | ||
|
|
ba87499eca | ||
|
|
fbe24b3fda | ||
|
|
5e55166617 | ||
|
|
bcd5524563 | ||
|
|
bb19361956 | ||
|
|
78d092c588 | ||
|
|
3da3d3f99d | ||
|
|
e2b240fd06 | ||
|
|
ee6ab69023 | ||
|
|
74e13670d0 | ||
|
|
d37c798dbc | ||
|
|
c93db168f3 | ||
|
|
52c029d4d9 | ||
|
|
c9360ad9c4 | ||
|
|
51e5a18384 | ||
|
|
f1368d6ac6 | ||
|
|
70e6f4f9f6 | ||
|
|
2bfd220714 | ||
|
|
3214c1f02a | ||
|
|
297f48a07c | ||
|
|
ea067acb52 | ||
|
|
8a70b78d71 | ||
|
|
e368043fb8 | ||
|
|
3ef6aa9f8e | ||
|
|
8cd8c4753b | ||
|
|
24085e0960 | ||
|
|
d92e80e289 | ||
|
|
fcbc8a2ee2 | ||
|
|
336a4dea01 | ||
|
|
67ffd07312 | ||
|
|
b2ad305f23 | ||
|
|
fa34f47f8a | ||
|
|
9a47e2b748 | ||
|
|
60d6cd62c8 | ||
|
|
60a99725b8 | ||
|
|
635c6432d4 | ||
|
|
eb1304ec41 | ||
|
|
a5b57ec2ac | ||
|
|
783225cd70 | ||
|
|
804b6a8cdb | ||
|
|
a31e9a5a3c | ||
|
|
8553811889 | ||
|
|
68ae9173ae | ||
|
|
72763f2a2b | ||
|
|
89267846ca | ||
|
|
38d82f6564 | ||
|
|
ac431ac5c9 | ||
|
|
fa7ea5cad5 | ||
|
|
17069843d9 | ||
|
|
d6251142a2 | ||
|
|
a3a941fd92 | ||
|
|
b6e9b84c80 | ||
|
|
2791578410 | ||
|
|
d3628c04db | ||
|
|
10450963cb | ||
|
|
fa8c33da45 | ||
|
|
e8942d11ee | ||
|
|
078e612de0 | ||
|
|
70da455f1a | ||
|
|
e5f7e18d56 | ||
|
|
98ebe8b7cc | ||
|
|
6304ca7c1f | ||
|
|
f6ff18e31d | ||
|
|
dbf8def7db | ||
|
|
df8eb7d5ef | ||
|
|
485734e107 | ||
|
|
f4dc5c3674 | ||
|
|
95e420bb15 | ||
|
|
409c6ee9b9 | ||
|
|
fa195a3cb2 | ||
|
|
cda959a658 | ||
|
|
a5d8ef524e | ||
|
|
cb1b1510a9 | ||
|
|
3f2c68377c | ||
|
|
846d9bfd83 | ||
|
|
eac6c3fca9 | ||
|
|
d082a6baad | ||
|
|
251f8e5704 | ||
|
|
0282e2be28 | ||
|
|
dd758f8b33 | ||
|
|
8229a96252 | ||
|
|
adf07a9af0 | ||
|
|
be62157308 | ||
|
|
061639a370 | ||
|
|
ad7abec3d7 | ||
|
|
c34aeba5a4 | ||
|
|
816f0533be | ||
|
|
e923282181 | ||
|
|
6554e4d0f4 | ||
|
|
eb65dd42e4 | ||
|
|
d917215417 | ||
|
|
69f2669bee | ||
|
|
dfc35f3744 | ||
|
|
56dee6975e | ||
|
|
9b80017323 | ||
|
|
75666c56cc | ||
|
|
0a3ee9f0a7 | ||
|
|
67546f8163 | ||
|
|
22d99806d0 | ||
|
|
883e264319 | ||
|
|
e80769794e | ||
|
|
4adfec4482 | ||
|
|
adb72ef023 | ||
|
|
69e0893c61 | ||
|
|
10318fd19e | ||
|
|
756200676d | ||
|
|
73d8fb96cb | ||
|
|
e9cbedd042 | ||
|
|
b22869f9ef | ||
|
|
1a02cacc53 | ||
|
|
cb952329d3 | ||
|
|
579ebe6130 | ||
|
|
89ae64c5fb | ||
|
|
ad9f318e10 | ||
|
|
0e411cd646 | ||
|
|
2b2795077b | ||
|
|
58910b07ef | ||
|
|
5567b04277 | ||
|
|
73d6e05c0e | ||
|
|
0642c37c04 | ||
|
|
45b66cd785 | ||
|
|
ed7c3fad57 | ||
|
|
fa37e002f0 | ||
|
|
f99cd158dd | ||
|
|
a790958daa | ||
|
|
3341f74374 | ||
|
|
1505743fbf | ||
|
|
625ad3d7cf | ||
|
|
f351e17a63 | ||
|
|
c1360506c9 | ||
|
|
50f27e0952 | ||
|
|
dd423d315b | ||
|
|
78c7408380 | ||
|
|
d09a079199 | ||
|
|
ea8b4beede | ||
|
|
30e8b03038 | ||
|
|
79050c29d7 | ||
|
|
98f4e22950 | ||
|
|
47f5a45e47 | ||
|
|
c37f36510a | ||
|
|
c65cb536cc | ||
|
|
4a8b356867 | ||
|
|
ea2d57edd3 | ||
|
|
585cbdfcac | ||
|
|
572a833a51 | ||
|
|
b1700f3cf6 | ||
|
|
4f1183a358 | ||
|
|
180d4ece77 | ||
|
|
0c5a71b02f | ||
|
|
9cab749016 | ||
|
|
06ecef76d3 | ||
|
|
2dfe144236 | ||
|
|
3e5ea8cb6c | ||
|
|
56edf73d93 | ||
|
|
2b63f781e9 | ||
|
|
ccb6327131 | ||
|
|
401f1b6496 | ||
|
|
48bf9d9f85 | ||
|
|
cc82823c47 | ||
|
|
383962173e | ||
|
|
c8d208b9be | ||
|
|
d6daa336ca | ||
|
|
b02374c3f5 | ||
|
|
03f7e0686f | ||
|
|
545013e839 | ||
|
|
4025488cf8 | ||
|
|
4ce2a1d071 | ||
|
|
a7244a999e | ||
|
|
5b2cde4e30 | ||
|
|
21d5607af2 | ||
|
|
1cd6d4c7e7 | ||
|
|
8540cab0a6 | ||
|
|
e3c28f3fb3 | ||
|
|
f6f84aaf42 | ||
|
|
b927d95d58 | ||
|
|
dd5623be65 | ||
|
|
78063c4df7 | ||
|
|
ab86490b37 | ||
|
|
69cae7731f | ||
|
|
eeefc8a992 | ||
|
|
77e98c8c03 | ||
|
|
fccd0d6c96 | ||
|
|
4f70969306 | ||
|
|
57e94585e8 | ||
|
|
c66d6b0500 | ||
|
|
31055360dc | ||
|
|
229a3d309c | ||
|
|
c82469fa2c | ||
|
|
5a886f6e58 | ||
|
|
abffaa184b | ||
|
|
70a0cd670b | ||
|
|
720f28c09c | ||
|
|
a8f03679ed | ||
|
|
0b67dfa38c | ||
|
|
e53ba8110b | ||
|
|
a6875ced6e | ||
|
|
57cac49362 | ||
|
|
81acaa6ae0 | ||
|
|
b596e96b43 | ||
|
|
8e47342a18 | ||
|
|
cb821c2a25 | ||
|
|
0faf7fa8ee | ||
|
|
0002376f2a | ||
|
|
f87b2ee636 | ||
|
|
3aae7b180b | ||
|
|
b001c2f40b | ||
|
|
660d0cca3e | ||
|
|
db1a6601eb | ||
|
|
78778c2819 | ||
|
|
585020ef97 | ||
|
|
e1f3f2355a | ||
|
|
c02cfd594c | ||
|
|
5dbadda512 | ||
|
|
c73376cb2f | ||
|
|
0b5a105b9b | ||
|
|
e92fb9287a | ||
|
|
875c5c1880 | ||
|
|
2b71317e09 | ||
|
|
44aeea8e45 | ||
|
|
f435eeed7a | ||
|
|
a5cb041ef2 | ||
|
|
bfdeee2cea | ||
|
|
414cdf8669 | ||
|
|
3b52b75d2a | ||
|
|
f56e1bef54 | ||
|
|
1b60c20bad | ||
|
|
7ef5233547 | ||
|
|
d552b208dd | ||
|
|
6dd00f41e9 | ||
|
|
a75e7978ab | ||
|
|
6abc40ef46 | ||
|
|
0ab2169c65 | ||
|
|
93067f3c3b | ||
|
|
8d8f7ddb40 | ||
|
|
be75b4bf3a | ||
|
|
3031cf8da9 | ||
|
|
db707d5e15 | ||
|
|
065384027e | ||
|
|
dca4772f33 | ||
|
|
48daf13d7f | ||
|
|
79113668cd | ||
|
|
167b9aa8eb | ||
|
|
9ce55bcf67 | ||
|
|
6cfb913e45 | ||
|
|
5ef3bcc243 | ||
|
|
f43e093515 | ||
|
|
ecb4190e0b | ||
|
|
338e4dfbc7 | ||
|
|
1046555c9c | ||
|
|
b8377b7e5c | ||
|
|
2a8acaf351 | ||
|
|
2ec5a315cb | ||
|
|
be86c52dc0 | ||
|
|
2cf25b7c35 | ||
|
|
75e738a9c9 | ||
|
|
42981c746e | ||
|
|
5a66ac94ee | ||
|
|
eaeca45eae | ||
|
|
37411c7521 | ||
|
|
4ea71c939a | ||
|
|
81ce844d79 | ||
|
|
0780919c2e | ||
|
|
8d43a35ca4 | ||
|
|
42c1b30c31 | ||
|
|
b032a00283 | ||
|
|
b684ded845 | ||
|
|
780d9bb7e7 | ||
|
|
7acef0c9fd | ||
|
|
d019126086 | ||
|
|
a7feed2ae9 | ||
|
|
64c643920f | ||
|
|
2c5f590fed | ||
|
|
3003cdaf08 | ||
|
|
5f353f800d | ||
|
|
f3d31834ee | ||
|
|
28377502f6 | ||
|
|
6fc34eef42 | ||
|
|
e99c01c92c | ||
|
|
850135376d | ||
|
|
5d0e6c3435 | ||
|
|
5e905742ad | ||
|
|
e319359935 | ||
|
|
3abce22f0c | ||
|
|
c090367eb8 | ||
|
|
fff789a509 | ||
|
|
e7c8114dff | ||
|
|
fbb217538e | ||
|
|
3214dc5d37 | ||
|
|
bb89e1a70f | ||
|
|
a16122bbe9 | ||
|
|
57ef35441d | ||
|
|
e222090d1f | ||
|
|
bf077c0f97 | ||
|
|
d321ee242d | ||
|
|
9f9c19d4ae | ||
|
|
179b51278f | ||
|
|
1bb907f76d | ||
|
|
99641e7b0b | ||
|
|
d7bded0d73 | ||
|
|
80a3196097 | ||
|
|
010ef7cd07 | ||
|
|
e5fce9ac08 | ||
|
|
175dd3eb4f | ||
|
|
3cd45c3acd | ||
|
|
157b32e93b | ||
|
|
0b187f3ff8 | ||
|
|
bb2eb5f266 | ||
|
|
675df6487a | ||
|
|
b2b4fc6b54 | ||
|
|
2074c8bb27 | ||
|
|
ff3b7cf337 | ||
|
|
58730a48b3 | ||
|
|
37436071a0 | ||
|
|
de8a2c36a0 | ||
|
|
1d4c942675 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,3 +16,4 @@ src/tests/all.log
|
||||
src/tests/*.data
|
||||
*~
|
||||
.*.swp
|
||||
package-config/osx/binary/task
|
||||
|
||||
30
AUTHORS
30
AUTHORS
@@ -1,10 +1,15 @@
|
||||
The development of task was made possible by the significant contributions of the following people:
|
||||
The development of taskwarrior was made possible by the significant
|
||||
contributions of the following people:
|
||||
|
||||
Paul Beckingham (Principal Author)
|
||||
Federico Hernandez (Package Maintainer & Contributing Author)
|
||||
David J Patrick (Designer)
|
||||
John Florian (Contributing Author)
|
||||
Cory Donnelly (Contributing Author)
|
||||
Johannes Schlatow (Contributing Author)
|
||||
|
||||
The following submitted code, packages or analysis, and deserve special thanks:
|
||||
|
||||
Damian Glenny
|
||||
Andy Lester
|
||||
H. İbrahim Güngör
|
||||
@@ -18,16 +23,25 @@ The following submitted code, packages or analysis, and deserve special thanks:
|
||||
Johan Friis
|
||||
Steven de Brouwer
|
||||
Pietro Cerutti
|
||||
Cory Donnelly
|
||||
Alexander Neumann
|
||||
Emil Sköldberg
|
||||
Michal Josífko
|
||||
Ed Neville
|
||||
Kevin Owens
|
||||
Mick Koch
|
||||
Kathryn Andersen
|
||||
Alexander Schremmer
|
||||
Jostein Berntsen
|
||||
|
||||
Thanks to the following, who submitted detailed bug reports and excellent
|
||||
suggestions:
|
||||
|
||||
Thanks to the following, who submitted detailed bug reports and excellent suggestions:
|
||||
Eugene Kramer
|
||||
Srijith K
|
||||
Bruce Israel
|
||||
Thomas Engel
|
||||
Nishiishii
|
||||
galvanizd
|
||||
Stas Antons
|
||||
Vincent Fleuranceau
|
||||
ArchiMark
|
||||
Carlos Yoder
|
||||
@@ -40,6 +54,12 @@ Thanks to the following, who submitted detailed bug reports and excellent sugges
|
||||
Thomas@BIC
|
||||
Ian Mortimer
|
||||
Zach Frazier
|
||||
Ivo Jimenez
|
||||
Joe Pulliam
|
||||
Juergen Daubert
|
||||
|
||||
Rich Mintz
|
||||
Seneca Cunningham
|
||||
Dirk Deimeke
|
||||
Michelle Crane
|
||||
Elizabeth Maxson
|
||||
Peter De Poorter
|
||||
|
||||
293
ChangeLog
293
ChangeLog
@@ -1,7 +1,289 @@
|
||||
|
||||
------ current release ---------------------------
|
||||
|
||||
1.8.5 (12/05/2009)
|
||||
1.9.3 (11/08/2010)
|
||||
+ Added feature #43, now task supports relative dates like '3wks',
|
||||
'1 month', '4d' for 'due', 'wait' and 'until' dates. Essentially
|
||||
durations are now allowed where dates are expected, and are treated
|
||||
as relative to the current date/time.
|
||||
+ Added feature #189, that records the start and stop times as an
|
||||
annotation for a task.
|
||||
+ Added features #244, #272, #273, #274, #275 and #279, which support
|
||||
import and export of YAML 1.1. YAML is now the default export format
|
||||
for task.
|
||||
+ Added feature #391, now the 'task color legend' command will show
|
||||
samples of all the defined colors and color rules from your .taskrc
|
||||
and theme.
|
||||
+ Added feature #410, and now task supports dependencies between tasks
|
||||
with the syntax 'task 1 depends:2' to add a dependency, or 'task 1
|
||||
depends:-2' to remove a dependency.
|
||||
+ Added feature #421, and now task can sync data files from two sources
|
||||
via the 'merge' command.
|
||||
+ Added feature #423, now custom report filters allow rc overrides.
|
||||
+ Added feature #428, preparing the new structure for the NEWS file.
|
||||
+ Added feature #429, which improves the 'all' report to exclude deleted.
|
||||
tasks, provide a new sort order and include the 'end' column.
|
||||
+ Added feature #431, which improves feedback after running the 'log'
|
||||
command.
|
||||
+ Added feature #446, task supports now 'sow', 'som' and 'soy' as dates
|
||||
for 'due', 'wait' and 'until' (thanks to T. Charles Yun).
|
||||
Added as well synonyms soww/eoww plus new socw/eocw for calendar weeks.
|
||||
+ Fixed bug #467, where recurring tasks were not honoring wait values.
|
||||
+ Added feature #471, which makes greater use of projects by reporting
|
||||
changes to the completion percentage when it changes.
|
||||
+ Added feature #478, which uses the colorization rules in the 'info'
|
||||
report.
|
||||
+ Added feature #481, allowing for user control of the color rule order
|
||||
of precedence via the 'rule.precedence.color' configuration variable.
|
||||
+ Fixed bug #493, which made waiting, recurring tasks invisible (thanks to
|
||||
Alexander Schremmer).
|
||||
+ Added feature #499, giving an extra line in the message output when
|
||||
doing bulk done changes (thanks to T. Charles Yun).
|
||||
+ New 'depends' column for custom reports.
|
||||
+ New 'blocked' report for showing blocked tasks.
|
||||
+ New 'unblocked' report for showing tasks that are not blocked.
|
||||
+ Improved man pages (thanks to Andy Lester).
|
||||
+ Default .taskrc files are now largely empty, and rely almost completed
|
||||
on default values.
|
||||
+ Special tags 'nocal', 'nocolor' and 'nonag' are implemented.
|
||||
+ The 'tags' command highlights special tags.
|
||||
+ The 'stats' and 'info' reports not obey color.alternate.
|
||||
+ New fish shell tab completion script (thanks to Mick Koch).
|
||||
+ Color rules now obey the rc.search.case.sensitive configuration option.
|
||||
+ The color.keyword.XXX color rule now applies to annotations too.
|
||||
+ Importing the same YAML twice now generates an error.
|
||||
+ Two new color themes (thanks to Kathryn Andersen).
|
||||
+ More localized holiday files for US, CA, SE, DE, FR, UK, ES, NL and NO
|
||||
(thanks to T. Charles Yun, Jostein Berntsen).
|
||||
+ Added new 'diagnostics' command to help with bug submission, testing.
|
||||
+ Fixed bug #427, preventing the task edit command to parse annotation
|
||||
dates with spaces.
|
||||
+ Fixed bug #433, making task command output more consistent.
|
||||
+ Fixed bug #434, allowing users to complete tasks with status 'waiting'
|
||||
+ Fixed bug #438, correcting the sorting of the entry_time, start_time
|
||||
and end_time columns (thanks to Michelle Crane).
|
||||
+ Fixed bug #439, which ignored dateformat.annotation for sparse annotations.
|
||||
+ Fixed bug #440, which prevented simultaneous append/prepend and substitution.
|
||||
+ Fixed bug #441, which misparsed '/a/a:/' as an attribute, rather than a
|
||||
substitution (thanks to Michelle Crane).
|
||||
+ Fixed bug #444, which made task shell unusable after canceling out of an
|
||||
undo command.
|
||||
+ Fixed bug #445, which caused task to not notice that the command 'h' is
|
||||
ambiguous.
|
||||
+ Fixed bug #449, so the wait: attribute can be applied to a task at any
|
||||
time, not just on add.
|
||||
+ Fixed bug #452, which defines a higher resolution division between due
|
||||
and overdue.
|
||||
+ Fixed bug #459, which showed a confusing message when 'limit:page' was
|
||||
used, with few tasks.
|
||||
+ Fixed bug #461, in which the filter 'due:today' failed, but 'due.is:today'
|
||||
worked.
|
||||
+ Fixed bug #466, which gave the wrong error message when a custom report
|
||||
was missing a direction indicator for the sort order.
|
||||
+ Fixed bug #470, which caused task to not support the color 'none'.
|
||||
+ Fixed bug #476, so that task now issues a warning when a wait date falls
|
||||
after a due date (thanks to T. Charles Yun).
|
||||
+ Fixed bug #480, which didn't properly support @ characters in tags. This
|
||||
also now supports $ and #.
|
||||
+ Fixed bug #489, which caused the filter 'tags.none:' to fail.
|
||||
+ Fixed bug #494, causing imported text files to ultimately lack uuids
|
||||
(thanks to Elizabeth Maxson).
|
||||
+ Fixed problem with command line configuration overrides that had no
|
||||
values.
|
||||
+ Fixed problem with the 'undo' command not observing the rc.color or the
|
||||
rc._forcecolor settings.
|
||||
+ Fixed problem with extra blank line in the ghistory reports.
|
||||
+ Fixed a precision problem with average age on the summary report.
|
||||
+ Clarified the documentation regarding the project name (taskwarrior) and
|
||||
the program name (task).
|
||||
|
||||
------ old releases ------------------------------
|
||||
|
||||
1.9.2 (7/10/2010) a13989f18eb34b3363f433c965084b6491425b9f
|
||||
+ Added feature #320, so the command "task 123" is interpreted as an implicit
|
||||
"task info 123" command (thanks to John Florian).
|
||||
+ Added feature #326, allowing tasks to be added in the completed state, by
|
||||
using the 'log' command in place of 'add' (thanks to Cory Donnelly).
|
||||
+ Added features #36 and #37, providing annual versions of the 'history' and
|
||||
'ghistory' command as 'history.annual' and 'ghistory.annual'.
|
||||
+ Added feature #363 supporting iCalendar/vcalendar (RFC-2445, RFC-5545,
|
||||
RFC-5546) export via the 'export.ical' command.
|
||||
+ Added feature #390, an extra dateformat for annotations (thanks to Cory
|
||||
Donnelly).
|
||||
+ Added feature #407, a new 'task show' command to display the current
|
||||
configuration settings or just the ones matching a search string.
|
||||
'task config' is now only used to set new configuration values.
|
||||
+ Added feature #298, supporting a configurable number of future recurring
|
||||
tasks that are generated.
|
||||
+ Added feature #412, which allows the 'projects' and 'tags' commands to be
|
||||
list all used projects/tags, not just the ones used in current pending tasks.
|
||||
Controlled by the 'list.all.projects' and 'list.all.tags' configuration
|
||||
variables (thanks to Dirk Deimeke).
|
||||
+ Added feature #415, which supports displaying just a single page of tasks,
|
||||
by specifying either 'limit:page' to a command, or 'report.xxx.limit:page'
|
||||
in a report specification (thanks to T. Charles Yun).
|
||||
+ Improvements to the man pages (thanks to T. Charles Yun).
|
||||
+ Modified the 'next' report to only display one page, by default.
|
||||
+ Added feature #408, making it possible to delete annotations with the new
|
||||
denotate command and the provided description (thanks to Dirk Deimeke).
|
||||
+ Added support for more varied durations when specifying recurring tasks,
|
||||
such as '3 mths' or '24 hrs'.
|
||||
+ The ghistory graph bars can now be colored with 'color.history.add',
|
||||
'color.history.done' and 'color.history.delete' configuration variables.
|
||||
+ Added feature #156, so that task supports both a 'side' and 'diff' style
|
||||
of undo.
|
||||
+ Distribution now includes 7 theme files, for 16- and 256-color terminals.
|
||||
+ Task now defaults to using the equivalent to the dark-16.theme.
|
||||
+ Fixed bug #406 so that task now includes command aliases in the _commands
|
||||
helper command used by shell completion scripts.
|
||||
+ Fixed bug #211 - it was unclear which commands modify a task description.
|
||||
+ Fixed bug #411, clarifying that the 'projects' command only lists projects
|
||||
for which there are pending tasks (thanks to Dirk Deimeke).
|
||||
+ Fixed bug #414, that caused filtering on the presence or absence of tags
|
||||
containing Unicode characters to fail (thanks to Michal Josífko).
|
||||
+ Fixed bug #416, which caused sorting on a date to fail if the year was not
|
||||
included in the dateformat (thanks to Michelle Crane).
|
||||
+ Fixed bug #417, which caused sorting on countdown and age fields to be
|
||||
wrong (thanks to Michell Crane).
|
||||
+ Fixed bug #418, which caused the attribute modifier 'due.before' to fail
|
||||
if the year was not included in the dateformat (thanks to Michelle Crane).
|
||||
+ Fixed bug #132, which failed to set a sort order so that active tasks sort
|
||||
higher than inactive tasks, all things being equal.
|
||||
+ Fixed bug #405, which incorrectly compared dates on tasks created by
|
||||
versions earlier than 1.9.1 to those created by 1.9.1 or later (thanks to
|
||||
Ivo Jimenez).
|
||||
+ Fixed bug #420, missing 'ID' from help text (thanks to Ed Neville).
|
||||
+ Fixed bug that prevented 'task list priority.above:L' from working.
|
||||
+ Fixed bug that miscalculated terminal width for the ghistory.annual
|
||||
report.
|
||||
+ Fixed wording (support issue #383) when modifying a recurring task (thanks
|
||||
to T. Charles Yun).
|
||||
|
||||
1.9.1 (5/22/2010) 60a99725b858be134ad538cb7c1a32c98de70e67
|
||||
+ Summary report bar colors can now be specified with color.summary.bar
|
||||
and color.summary.background configuration variables.
|
||||
+ The 'edit' command now conveniently fills in the current date for new
|
||||
annotations.
|
||||
+ Deleting a task no longer clobbers any recorded end date (thanks to
|
||||
Seneca Cunningham).
|
||||
+ The following holidays are now computed automatically and can be used
|
||||
in the definitions for the calendar holidays:
|
||||
Good Friday (goodfriday), Easter (easter), Easter monday
|
||||
(eastermonday), Ascension (ascension), Pentecost (pentecost)
|
||||
The date is configured with the given keyword.
|
||||
+ The configure script is more portable (thanks to Emil Sköldberg).
|
||||
+ Updated task-faq.5 man page.
|
||||
+ Fixed bug #382 in which the annotate command didn't return an error
|
||||
message when called without an ID.
|
||||
+ Fixed bug #402 which failed compilation on Arch Linux (thanks to
|
||||
Johannes Schlatow).
|
||||
+ Fixed bug #401 that ignored the search.case.sensitive configuration
|
||||
setting when filtering on project names (thanks to John Florian).
|
||||
+ Fixed bug #395 that prevented the upgrade of a pending task to a
|
||||
recurring task (thanks to T. Charles Yun).
|
||||
|
||||
1.9.0 (2/22/2010) dd758f8b33de110a633e2ff3ebdac73232b8ff44
|
||||
+ Added feature #283 that makes it possible to control the verbosity
|
||||
of the output of annotations.
|
||||
+ Added feature #254 (#295) which gives task a second date format to be
|
||||
used in the reports with more conversion sequences like weekday name
|
||||
or weeknumber. The date format is set with variable "dateformat.report".
|
||||
+ Added feature #292 that permits alternate line coloration in reports
|
||||
(thanks to Richard Querin).
|
||||
+ Added feature #307 that provides vim with syntax highlighting for .taskrc.
|
||||
+ Added feature #336 which gives task a 'prepend' command for symmetry
|
||||
with the 'append' command.
|
||||
+ Added feature #341 that makes explicit references to the task and taskrc
|
||||
man pages, both in the auto-generated .taskrc file and the version command
|
||||
output (thanks to Cory Donnelly).
|
||||
+ The 'delete' command is now aliased to 'rm' (thanks to Ivo Jimenez).
|
||||
+ Added new attribute modifiers 'word' and 'noword' which find the existence
|
||||
of whole words, or prove the non-existence of whole words. If a task has
|
||||
the description "Pay the bill", then "description.word:the" will match, but
|
||||
"description.word:th" will not. For partial word matches, there is still
|
||||
"description.contains:th".
|
||||
+ Added new 'config' command to display the configuration settings of task.
|
||||
As a consequence 'version' now only shows the version number and legal
|
||||
information.
|
||||
+ The 'config' command now complains about use of deprecated color names in
|
||||
your .taskrc file.
|
||||
+ Added feature #296, that allows the 'config' command to modify your .taskrc
|
||||
settings directly, with the command 'task config <name> <value>', or
|
||||
'task config <name>' to remove the setting.
|
||||
+ Task now supports nested .taskrc files using the "include /path" directive.
|
||||
+ The 'entry', 'start' and 'end' columns now have equivalents that include the
|
||||
time, and are called 'entry_time', 'start_time', and 'end_time', for use in
|
||||
custom reports.
|
||||
+ 2 new columns have been added to the reports: countdown and
|
||||
countdown_compact. They show the days left until a task is due or how many
|
||||
days a task has been overdue.
|
||||
+ The new 'priority_long' field can be shown in custom reports, and will
|
||||
display 'High' rather than the abbreviated 'H'.
|
||||
+ Task now supports .taskrc command line overrides using rc.name:value and
|
||||
the new rc.name=value to accommodate a frequent mistake.
|
||||
+ The color rules for projects (color.project.foo) now matches on partial
|
||||
project names, the same way as filters.
|
||||
+ The color command now takes a color as an argument, and displays that color
|
||||
with sample text.
|
||||
+ Added 2 new configuration variables to display the details of tasks with due
|
||||
dates when doing a 'task cal' for the corresponding months:
|
||||
'calendar.details' and 'calendar.details.report'
|
||||
+ Added 5 new color configuration variables to colorize today, days with due
|
||||
tasks, days with overdue tasks, weekend days and week numbers in the
|
||||
calendar:
|
||||
'calendar.color.today', 'color.calendar.due', 'calendar.calendar.overdue',
|
||||
'color.calendar.weekend'and 'color.calendar.weeknumber'.
|
||||
+ Added support for holidays in the calendar by using calendar.holidays
|
||||
and the corresponding holiday.X.name and holiday.X.date variables.
|
||||
The default dateformat being YMD (20101224) set by dateformat.holiday.
|
||||
+ The coloring of due tasks in reports can now be enabled for all tasks, and
|
||||
not only the imminent ones, by setting the configuration variable due=0.
|
||||
+ Tasks due on the current day ("today") can now have their own color setting
|
||||
color.due.today and color.calendar.due.today.
|
||||
+ Added a new 'task-faq' man page for common questions and answers.
|
||||
+ Added a new 'task-color' man page detailing how to set up and use color in
|
||||
task.
|
||||
+ Added feature #176, which allows for configurable case-sensitivity for
|
||||
keyword searches and substitutions (thanks to John Florian).
|
||||
+ Task can now use an alternate tag indicator by setting the tag.indicator
|
||||
configuration variable to something other than the default of +.
|
||||
+ Task can now use an alternate active indicator by setting the
|
||||
active.indicator configuration variable to something other than the default
|
||||
of *.
|
||||
+ Task can now use an alternate recurrence indicator by setting the
|
||||
recurrence.indicator configuration variable to something other than the
|
||||
default of R.
|
||||
+ Added a new file, README.build, which provides assistance troubleshooting
|
||||
build-related problems on different operating systems and environments.
|
||||
+ Fixed bug #316 which caused the timesheet report to display an oddly sorted
|
||||
list.
|
||||
+ Fixed bug #317 which colored tasks in the 'completed' report according to
|
||||
due dates, which are no longer relevant to a completed task (thanks to
|
||||
Cory Donnelly).
|
||||
+ Fixed bug #347 which used only a lowercase "all" to confirm multiple changes
|
||||
instead of an uppercase "All" like the "Yes" answer.
|
||||
+ Fixed bug that was causing the 'completed' report to sort incorrectly.
|
||||
+ Fixed bug that showed a calendar for the year 2037 when 'task calendar due'
|
||||
was run, and there are no tasks with due dates.
|
||||
+ Fixed bug #360 which prevented certain modifications to recurring tasks
|
||||
(thanks to John Florian).
|
||||
+ Fixed bug #299 which prevented excluding multiple projects from a report,
|
||||
by using "task list project.isnt:foo project.isnt:bar" (thanks to John
|
||||
Florian).
|
||||
+ Fixed bug #368 which caused recurring tasks 'until' dates to be rendered as
|
||||
epoch numbers instead of dates (thanks to Cory Donnelly).
|
||||
+ Fixed bug #369 which prevented the config command from setting quoted or
|
||||
unquoted multi-word values (thanks to Richard Querin).
|
||||
+ Fixed bug #370 which prevented the removal of a due date from a task,
|
||||
mis-identifying the task as recurring just because it had a due date
|
||||
(thanks to John Florian).
|
||||
+ Fixed bug #371 which caused task to mis-apply certain color rules, like
|
||||
color.alternate, which was (a) not applied first, and (b) not blended
|
||||
with the other color rules (thanks to Richard Querin).
|
||||
+ Fixed bug #372 which incorrectly mapped 16-color backgrounds into the
|
||||
256-color space.
|
||||
|
||||
1.8.5 (12/05/2009) a6c7236ff34e5eee3ef1693b97cb1367e6e3c607
|
||||
+ Added feature to allow the user to quit when asked to confirm multiple
|
||||
changes. Now task asks "Proceed with change? (Yes/no/all/quit)".
|
||||
+ Added feature #341 that makes explicit references to the task and taskrc
|
||||
@@ -31,8 +313,6 @@
|
||||
tag when obtaining confirmation from the user fora bulk modification
|
||||
(thanks to Cory Donnelly).
|
||||
|
||||
------ old releases ------------------------------
|
||||
|
||||
1.8.4 (11/17/2009) 12c4983936d27317df100f05da8244139dd06a3f
|
||||
+ Fixed bug that caused wait: dates to not be properly rendered in a
|
||||
readable and preferred format with the "edit" command.
|
||||
@@ -90,8 +370,8 @@
|
||||
+ Fixed bug that allowed a recurring task to be added without a due date.
|
||||
+ Fixed bug that displays the wrong .taskrc file name on override (thanks to
|
||||
Federico Hernandez).
|
||||
+ Fixed bug that failed to suppress color control code in the header and footnote
|
||||
when redirecting output to a file (thanks to John Florian).
|
||||
+ Fixed bug that failed to suppress color control code in the header and
|
||||
footnote when redirecting output to a file (thanks to John Florian).
|
||||
|
||||
1.8.0 (7/21/2009) 14977ef317bd004dae2f2c313e806af9f2a2140c
|
||||
+ Added zsh tab completion script (thanks to P.C. Shyamshankar).
|
||||
@@ -408,7 +688,8 @@
|
||||
+ Bug: configure.ac does not properly determine ncurses availability.
|
||||
+ Bug: Cannot seem to use the percent character in a task description.
|
||||
+ Bug: New installation "task stats" reports newest task 12/31/1969.
|
||||
+ Bug: New installation task projects displays header but no data - should short-circuit.
|
||||
+ Bug: New installation task projects displays header but no data - should
|
||||
short-circuit.
|
||||
+ Bug: incorrect color specification in sample .taskrc file.
|
||||
+ Bug: when run without arguments, task dumps core on Solaris 10.
|
||||
+ "task calendar" now reports all months with due pending tasks.
|
||||
|
||||
12
Makefile.am
12
Makefile.am
@@ -1,11 +1,11 @@
|
||||
SUBDIRS = src
|
||||
|
||||
dist_man_MANS = doc/man/task.1 doc/man/taskrc.5 doc/man/task-tutorial.5
|
||||
dist_man_MANS = doc/man/task.1 doc/man/taskrc.5 doc/man/task-tutorial.5 doc/man/task-faq.5 doc/man/task-color.5 doc/man/task-sync.5
|
||||
|
||||
docdir = $(datadir)/doc/${PACKAGE}-${VERSION}
|
||||
#docdir = $(datadir)/doc/${PACKAGE}-${VERSION}
|
||||
doc_DATA = AUTHORS ChangeLog COPYING NEWS README
|
||||
|
||||
EXTRA_DIST = INSTALL
|
||||
EXTRA_DIST = INSTALL README.build
|
||||
|
||||
bashscriptsdir = $(docdir)
|
||||
nobase_dist_bashscripts_DATA = scripts/bash/task_completion.sh
|
||||
@@ -14,7 +14,11 @@ zshscriptsdir = $(docdir)
|
||||
nobase_dist_zshscripts_DATA = scripts/zsh/_task
|
||||
|
||||
vimscriptsdir = $(docdir)
|
||||
nobase_dist_vimscripts_DATA = scripts/vim/README scripts/vim/ftdetect/task.vim scripts/vim/syntax/taskdata.vim scripts/vim/syntax/taskedit.vim
|
||||
nobase_dist_vimscripts_DATA = scripts/vim/README scripts/vim/ftdetect/task.vim scripts/vim/syntax/taskdata.vim scripts/vim/syntax/taskedit.vim scripts/vim/syntax/taskrc.vim
|
||||
|
||||
i18ndir = $(docdir)
|
||||
nobase_dist_i18n_DATA = i18n/strings.de-DE i18n/strings.en-US i18n/strings.es-ES i18n/strings.fr-FR i18n/strings.nl-NL i18n/strings.sv-SE i18n/tips.de-DE i18n/tips.en-US i18n/tips.sv-SE
|
||||
|
||||
rcfiledir = $(docdir)/rc
|
||||
dist_rcfile_DATA = doc/rc/holidays-CA.rc doc/rc/holidays-DE.rc doc/rc/holidays-ES.rc doc/rc/holidays-FR.rc doc/rc/holidays-NL.rc doc/rc/holidays-SE.rc doc/rc/holidays-UK.rc doc/rc/holidays-US.rc doc/rc/dark-16.theme doc/rc/dark-256.theme doc/rc/light-16.theme doc/rc/light-256.theme doc/rc/dark-blue-256.theme doc/rc/dark-green-256.theme doc/rc/dark-red-256.theme doc/rc/dark-violets-256.theme doc/rc/dark-yellow-green.theme
|
||||
|
||||
|
||||
92
NEWS
92
NEWS
@@ -1,37 +1,95 @@
|
||||
|
||||
New Features in task 1.8
|
||||
New Features in taskwarrior 1.9.3
|
||||
|
||||
- Attribute modifiers, for precise queries
|
||||
- Improved calendar feature
|
||||
- Full undo capability
|
||||
- All reports now customizable
|
||||
- Command aliases can now be created
|
||||
- In addition to being a standard part of Fedora 10 and 11 (yum install task),
|
||||
task is now also a standard part of Cygwin 1.5
|
||||
- There are new demo movies on taskwarrior.org
|
||||
- Shell-friendly exit codes
|
||||
- Start and stop times for a task can now be recorded as annotations.
|
||||
- Special tags 'nocolor', 'nocal' and 'nonag'.
|
||||
- Now supports durations in dates, such as:
|
||||
$ task ... due:4d
|
||||
$ task ... due:3wks
|
||||
- 'sow', 'som' and 'soy' are now accepted in dates. 'soww' and 'eoww' are
|
||||
now synonyms for 'sow' and 'eow' (ww = working week) 'socw' and 'eocw'
|
||||
refer to the calendar week (starting Sunday/Monday and
|
||||
- Now supports the beginning of the week, month and year in dates.
|
||||
- Now supports 'now' as a date/time.
|
||||
- Now defines an overdue task as being one second after the due date,
|
||||
instead of the day after the due date.
|
||||
- Import and export of YAML 1.1, including round-trip capability, and
|
||||
detection of duplicate imports.
|
||||
- New merge capability for syncing task data files.
|
||||
- New push capability for distributing merged changes.
|
||||
- New pull capability for copying data files from a remote location.
|
||||
- When completing or modifying a task, the project status is displayed.
|
||||
- The 'info' report is now colorized.
|
||||
- Certain characters (#, $, @) are now supported for use in tags.
|
||||
- User-controlled color rule precedence.
|
||||
- Two new color themes.
|
||||
- New holiday files for US, SE, DE, CA, FR, UK, ES, NL and NO localizations.
|
||||
- Task dependencies, and new 'blocked' and 'unblocked' reports for list
|
||||
those tasks.
|
||||
|
||||
Please refer to the ChangeLog file for full details. There are too many to
|
||||
list here.
|
||||
|
||||
Task has been built and tested on the following configurations:
|
||||
New commands in taskwarrior 1.9.3
|
||||
|
||||
- New 'task color legend' command will show samples of all the defined colors
|
||||
and color rules from your .taskrc and theme.
|
||||
- New 'task export.yaml' command will export YAML 1.1, which can then be
|
||||
imported via 'task import <file>'.
|
||||
- New 'task merge <url>' command that can merge the local and an undo.data
|
||||
file from another taskwarrior user, to sync across machines, for example.
|
||||
- New 'task push <url>' command to distribute merged changes.
|
||||
- New 'task pull <url>' command to copy data files from a remote location.
|
||||
- New 'diagnostics' command to aid bug reporting.
|
||||
|
||||
New configuration options in taskwarrior 1.9.3
|
||||
|
||||
- journal.time, journal.time.start.annotation, journal.time.stop.annotation
|
||||
ending Saturday/Sunday).
|
||||
- Color rule precedence can now be explicitly set with the configuration
|
||||
variable rule.precedence.color. Try "task show rule.pre" to show the
|
||||
default settings.
|
||||
- merge.autopush to control whether pushing after merging is automated.
|
||||
- merge.*.uri to configure source locations for the merge command
|
||||
(e.g. merge.default.uri).
|
||||
- push.*.uri to configure target locations for the push command.
|
||||
- pull.*.uri to configure source locations for the pull command.
|
||||
- dependency.confirm controls whether dependency chain repair needs to be
|
||||
confirmed.
|
||||
- dependency.reminder controls whether the user is nagged about dependency
|
||||
chain violations.
|
||||
|
||||
Newly deprecated features in taskwarrior 1.9.3
|
||||
|
||||
- entry_time, start_time and end_time are now synonyms for the entry, start
|
||||
and end fields. Recent enhancements to date formatting render these fields
|
||||
obsolete. The 'task show' command warns of the use of these deprecated
|
||||
fields. The synonyms will be removed in a future version of taskwarrior.
|
||||
|
||||
---
|
||||
|
||||
Taskwarrior has been built and tested on the following configurations:
|
||||
|
||||
* OS X 10.6 Snow Leopard and 10.5 Leopard
|
||||
* Fedora 12 Constantine and 11 Leonidas
|
||||
* Ubuntu 9.10 Karmic Koala and 9.04 Jaunty Jackalope
|
||||
* Fedora 13 Goddard, 12 Constantine
|
||||
* Ubuntu 10.10 Maverick Meerkat, 10.04 Lucid Lynx
|
||||
* Debian Sid
|
||||
* Slackware 12.2
|
||||
* Arch Linux
|
||||
* Gentoo Linux
|
||||
* SliTaz Linux
|
||||
* CRUX Linux
|
||||
* SuSE 11.3
|
||||
* Solaris 10 and 8
|
||||
* OpenBSD 4.5
|
||||
* FreeBSD
|
||||
* Cygwin 1.5
|
||||
* Cygwin 1.7 and 1.5
|
||||
* Haiku R1/alpha1
|
||||
|
||||
While Task has undergone testing, bugs are sure to remain. If you encounter a
|
||||
bug, please enter a new issue at:
|
||||
---
|
||||
|
||||
While Taskwarrior has undergone testing, bugs are sure to remain. If you
|
||||
encounter a bug, please enter a new issue at:
|
||||
|
||||
http://taskwarrior.org/projects/taskwarrior/issues/new
|
||||
|
||||
@@ -44,5 +102,3 @@ Or just send a message to:
|
||||
support@taskwarrior.org
|
||||
|
||||
Thank you.
|
||||
|
||||
---
|
||||
|
||||
13
README
13
README
@@ -1,16 +1,15 @@
|
||||
|
||||
Thank you for taking a look at task!
|
||||
Thank you for taking a look at taskwarrior!
|
||||
|
||||
Task is a GTD, todo list, task management, command line utility with a multitude
|
||||
of features. It is a portable, well supported, very active project, and it is
|
||||
Open Source. Task has binary distributions, online documentation, demonstration
|
||||
movies, and you'll find all the details at the site:
|
||||
Taskwarrior is a GTD, todo list, task management, command line utility with a
|
||||
multitude of features. It is a portable, well supported, very active project,
|
||||
and it is Open Source. Taskwarrior has binary distributions, online
|
||||
documentation, demonstration movies, and you'll find all the details at:
|
||||
|
||||
http://taskwarrior.org
|
||||
|
||||
At the site you'll find a wiki, discussion forums, downloads, news and more.
|
||||
|
||||
|
||||
Your contributions are especially welcome. Whether it comes in the form of
|
||||
code patches, ideas, discussion, bug reports, encouragement or criticism, your
|
||||
input is needed.
|
||||
@@ -19,6 +18,6 @@ Please send your support questions and code patches to:
|
||||
|
||||
support@taskwarrior.org
|
||||
|
||||
Consider joining taskwarrior.org and participating in the future of task.
|
||||
Consider joining taskwarrior.org and participating in the future of taskwarrior.
|
||||
|
||||
---
|
||||
|
||||
98
README.build
Normal file
98
README.build
Normal file
@@ -0,0 +1,98 @@
|
||||
|
||||
Taskwarrior Build Notes
|
||||
----------------
|
||||
|
||||
Taskwarrior 1.9 has dependencies that are detected by the configure program in
|
||||
almost all cases, but there are situations and operating systems that mean you
|
||||
will need to offer configure a little help.
|
||||
|
||||
If taskwarrior will not build on your system, first take a look at the Operating
|
||||
System notes below. If this doesn't help, then go to the Troubleshooting
|
||||
section, which includes instructions on how to contact us for help.
|
||||
|
||||
|
||||
|
||||
Operating System Notes
|
||||
----------------------
|
||||
|
||||
Cygwin 1.7
|
||||
Building taskwarrior on Cygwin 1.7 requires a configure option:
|
||||
|
||||
./configure --with-ncurses-inc=/usr/include/ncurses
|
||||
|
||||
This is because the ncurses include files are in a different location to
|
||||
Cygwin 1.5.
|
||||
|
||||
|
||||
Haiku Alpha/R1
|
||||
Taskwarrior must be built with gcc version 4.x, so make sure you run:
|
||||
|
||||
$ setgcc gcc4
|
||||
|
||||
To switch from gcc 2.95 to gcc 4.x.
|
||||
|
||||
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
In most cases, it is sufficient to run the configure program like this:
|
||||
|
||||
$ ./configure
|
||||
|
||||
Configure will run and locate all the necessary pieces for the build, and create
|
||||
a Makefile. There may be errors and warnings when running configure, or there
|
||||
may be compiler errors and warnings when running 'make'. Sometimes you will run
|
||||
configure with no reported problems, and the build will fail later. This is
|
||||
almost always because configure is mistaken about some assumption.
|
||||
|
||||
The configure program can accept several options that help with its ability to
|
||||
locate and use the ncurses library. They are:
|
||||
|
||||
--with-ncurses
|
||||
|
||||
This option tells configure that no matter what it thinks, ncurses is
|
||||
definitely on this system and should be enabled. If needed, this option
|
||||
probable needs to be accompanied by the next two options.
|
||||
|
||||
--with-ncurses-inc=/usr/include
|
||||
|
||||
If configure cannot find ncurses header files, this option will tell it
|
||||
exactly where to look. The path specified in this example is the default,
|
||||
so that probably won't help you. The path should be the directory in which
|
||||
the file 'ncurses.h' resides. Here are some possible values to try:
|
||||
|
||||
/usr/include (the default shown above)
|
||||
/usr/include/ncurses
|
||||
/usr/local/include
|
||||
/usr/local/include/ncurses
|
||||
|
||||
This should cover most systems, but new variations keeps cropping up.
|
||||
|
||||
--with-ncurses-lib=/usr/lib
|
||||
|
||||
If configure cannot find the ncurses library, this option will tell it
|
||||
exactly where to look. The path specified in this example is the default,
|
||||
so that probably won't help you. The path should be the directory in which
|
||||
the file 'libncurses.a' (or your system's equivalent) resides. Here are
|
||||
some possible values to try:
|
||||
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
|
||||
This should cover most systems, but new variations keeps cropping up.
|
||||
|
||||
--without-ncurses
|
||||
|
||||
This disables ncurses support in taskwarrior, and should really be used as a
|
||||
last resort. We know of no systems where this is needed.
|
||||
|
||||
If trying these options does not succeed, please send the contents of the
|
||||
'config.log' files to support@taskwarrior.org, or post a message in the support
|
||||
forums at taskwarrior.org along with the information.
|
||||
|
||||
If configure runs, but taskwarrior does not build, when ideally you would send
|
||||
both the contents of config.log, and a transcript from the build, which is not
|
||||
written to a file, and must be captured from the terminal.
|
||||
|
||||
---
|
||||
163
configure.ac
163
configure.ac
@@ -2,11 +2,20 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.61)
|
||||
AC_INIT(task, 1.8.5, support@taskwarrior.org)
|
||||
AC_INIT(task, 1.9.3, support@taskwarrior.org)
|
||||
|
||||
|
||||
# Source type.
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AC_LANG(C++)
|
||||
|
||||
|
||||
# Local copies for modification and later AC_SUBST.
|
||||
CFLAGS="${CFLAGS=}"
|
||||
CXXFLAGS="${CXXFLAGS=}"
|
||||
|
||||
|
||||
# this macro is used to get the arguments supplied
|
||||
# to the configure script (./configure --enable-debug)
|
||||
# Check if we have enable debug support.
|
||||
@@ -14,44 +23,162 @@ AC_MSG_CHECKING(whether to enable debugging)
|
||||
debug_default="no"
|
||||
AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging
|
||||
[default=$debug_default]],, enable_debug=$debug_default)
|
||||
# Yes, shell scripts can be used
|
||||
if test "$enable_debug" = "yes"; then
|
||||
CXXFLAGS="$CFLAGS -Wall -pedantic -ggdb3 -DDEBUG"
|
||||
|
||||
if test "x$enable_debug" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -Wall -pedantic -ggdb3 -DDEBUG"
|
||||
CXXFLAGS="$CXXFLAGS -Wall -pedantic -ggdb3 -DDEBUG"
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
CXXFLAGS="$CFLAGS -Wall -pedantic -O3"
|
||||
CFLAGS="$CFLAGS -Wall -pedantic -O3"
|
||||
CXXFLAGS="$CXXFLAGS -Wall -pedantic -O3"
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
|
||||
# Check for OS.
|
||||
OS=`uname|sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
|
||||
OS=`uname|sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'|cut -c 1-5`
|
||||
if test "$OS" = "sunos"; then
|
||||
AC_MSG_NOTICE([OS Solaris detected])
|
||||
AC_DEFINE([SOLARIS], [], [Compiling on Solaris])
|
||||
elif test "$OS" = "darwi"; then
|
||||
AC_MSG_NOTICE([OS Darwin detected])
|
||||
AC_DEFINE([DARWIN], [], [Compiling on Darwin])
|
||||
elif test "$OS" = "cygwi"; then
|
||||
AC_MSG_NOTICE([OS Cygwin detected])
|
||||
AC_DEFINE([CYGWIN], [], [Compiling on Cygwin])
|
||||
elif test "$OS" = "openb"; then
|
||||
AC_MSG_NOTICE([OS OpenBSD detected])
|
||||
AC_DEFINE([OPENBSD], [], [Compiling on OpenBSD])
|
||||
elif test "$OS" = "haiku"; then
|
||||
AC_MSG_NOTICE([OS Haiku detected])
|
||||
AC_DEFINE([HAIKU], [], [Compiling on Haiku])
|
||||
elif test "$OS" = "freeb"; then
|
||||
AC_MSG_NOTICE([OS FreeBSD detected])
|
||||
AC_DEFINE([FREEBSD], [], [Compiling on FreeBSD])
|
||||
elif test "$OS" = "linux"; then
|
||||
AC_MSG_NOTICE([OS Linux detected])
|
||||
AC_DEFINE([LINUX], [], [Compiling on Linux])
|
||||
else
|
||||
AC_MSG_NOTICE([OS Non-Solaris detected])
|
||||
AC_DEFINE([LINUX], [], [Compiling on Non-Solaris])
|
||||
AC_MSG_NOTICE([OS not detected])
|
||||
AC_DEFINE([UNKNOWN], [], [Compiling on Unknown])
|
||||
fi
|
||||
|
||||
|
||||
# ncurses enabled by default.
|
||||
AC_ARG_WITH([ncurses],
|
||||
[AS_HELP_STRING([--without-ncurses], [disable support for ncurses])],
|
||||
[with_ncurses=no],
|
||||
[with_ncurses=yes])
|
||||
|
||||
AC_ARG_WITH([ncurses-inc],
|
||||
[AS_HELP_STRING ([--with-ncurses-inc=DIR], [ncurses include files are in DIR])],
|
||||
[ncurses_inc=$withval],
|
||||
[ncurses_inc=''])
|
||||
|
||||
AC_ARG_WITH([ncurses-lib],
|
||||
[AS_HELP_STRING ([--with-ncurses-lib=DIR], [ncurses lib files are in DIR])],
|
||||
[ncurses_lib=$withval],
|
||||
[ncurses_lib=''])
|
||||
|
||||
if test "x$with_ncurses" = "xyes" ; then
|
||||
AC_DEFINE([HAVE_LIBNCURSES], [1], [Defined if you have libncurses])
|
||||
if test -n "$ncurses_inc"; then
|
||||
CFLAGS="$CFLAGS -I$ncurses_inc"
|
||||
CXXFLAGS="$CXXFLAGS -I$ncurses_inc"
|
||||
fi
|
||||
|
||||
if test -n "$ncurses_lib"; then
|
||||
LDFLAGS="$LDFLAGS -L$ncurses_lib"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB([ncurses],[main])
|
||||
fi
|
||||
|
||||
|
||||
# Readline enabled by default.
|
||||
#AC_ARG_WITH([readline],
|
||||
# [AS_HELP_STRING([--without-readline], [disable support for readline])],
|
||||
# [with_readline=no],
|
||||
# [with_readline=yes])
|
||||
#
|
||||
#AC_ARG_WITH([readline-inc],
|
||||
# [AS_HELP_STRING ([--with-readline-inc=DIR], [readline include files are in DIR])],
|
||||
# [readline_inc=$withval],
|
||||
# [readline_inc=''])
|
||||
#
|
||||
#AC_ARG_WITH([readline-lib],
|
||||
# [AS_HELP_STRING ([--with-readline-lib=DIR], [readline lib files are in DIR])],
|
||||
# [readline_lib=$withval],
|
||||
# [readline_lib=''])
|
||||
#
|
||||
#if test "x$with_readline" = "xyes" ; then
|
||||
# AC_DEFINE([HAVE_LIBREADLINE], [1], [Defined if you have libreadline])
|
||||
# if test -n "$readline_inc"; then
|
||||
# CFLAGS="$CFLAGS -I$readline_inc"
|
||||
# CXXFLAGS="$CXXFLAGS -I$readline_inc"
|
||||
# fi
|
||||
#
|
||||
# if test -n "$readline_lib"; then
|
||||
# LDFLAGS="$LDFLAGS -L$readline_lib"
|
||||
# fi
|
||||
#
|
||||
# AC_CHECK_LIB([readline],[main])
|
||||
#fi
|
||||
|
||||
|
||||
# Lua disabled by default.
|
||||
AC_ARG_WITH([lua],
|
||||
[AS_HELP_STRING([--with-lua], [enable support for lua])],
|
||||
[with_lua=yes],
|
||||
[with_lua=no])
|
||||
|
||||
AC_ARG_WITH([lua-inc],
|
||||
[AS_HELP_STRING ([--with-lua-inc=DIR], [lua include files are in DIR])],
|
||||
[lua_inc=$withval],
|
||||
[lua_inc=''])
|
||||
|
||||
AC_ARG_WITH([lua-lib],
|
||||
[AS_HELP_STRING ([--with-lua-lib=DIR], [lua lib files are in DIR])],
|
||||
[lua_lib=$withval],
|
||||
[lua_lib=''])
|
||||
|
||||
if test "x$with_lua" = "xyes" ; then
|
||||
AC_DEFINE([HAVE_LIBLUA], [1], [Defined if you have liblua])
|
||||
if test -n "$lua_inc"; then
|
||||
CFLAGS="$CFLAGS -I$lua_inc"
|
||||
CXXFLAGS="$CXXFLAGS -I$lua_inc"
|
||||
fi
|
||||
|
||||
if test -n "$lua_lib"; then
|
||||
LDFLAGS="$LDFLAGS -L$lua_lib"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB([lua],[main])
|
||||
fi
|
||||
|
||||
|
||||
# Allow the changes above to take effect.
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(CXXFLAGS)
|
||||
AC_SUBST(LDFLAGS)
|
||||
|
||||
|
||||
# Now the smaller details.
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_CONFIG_SRCDIR([src/main.cpp])
|
||||
AC_CONFIG_HEADER([auto.h])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AC_LANG(C++)
|
||||
|
||||
AC_SUBST(CFLAGS)
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB(ncurses,initscr)
|
||||
AC_CHECK_LIB(pthread,pthread_create)
|
||||
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([stdlib.h sys/file.h sys/stat.h sys/time.h unistd.h])
|
||||
AC_CHECK_HEADERS([sstream string vector map])
|
||||
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_HEADER_STDBOOL
|
||||
AC_C_CONST
|
||||
@@ -60,15 +187,19 @@ AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_MKTIME
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
AC_CHECK_FUNCS([select])
|
||||
#AC_CHECK_FUNC(flock, [AC_DEFINE([HAVE_FLOCK], [1], [Found flock])])
|
||||
AC_CHECK_FUNC(uuid_unparse_lower, [AC_DEFINE([HAVE_UUID], [1], [Found uuid_unparse_lower])])
|
||||
AC_CHECK_FUNC(random, [AC_DEFINE([HAVE_RANDOM], [1], [Found random])])
|
||||
AC_CHECK_FUNC(srandom, [AC_DEFINE([HAVE_SRANDOM], [1], [Found srandom])])
|
||||
|
||||
|
||||
# Generate the Makefiles.
|
||||
AC_CONFIG_FILES([Makefile src/Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
# End.
|
||||
|
||||
|
||||
324
doc/man/task-color.5
Normal file
324
doc/man/task-color.5
Normal file
@@ -0,0 +1,324 @@
|
||||
.TH task-color 5 2010-10-07 "task 1.9.3" "User Manuals"
|
||||
|
||||
.SH NAME
|
||||
task-color \- A color tutorial for the task(1) command line todo manager.
|
||||
|
||||
.SH SETUP
|
||||
The first thing you need is a terminal program that supports color. All
|
||||
terminal programs support color, but only a few support lots of colors. First
|
||||
tell your terminal program to use color by specifying the TERM environment
|
||||
variable like this:
|
||||
|
||||
TERM=xterm-color
|
||||
|
||||
In this example, xterm-color is used - a common value, and one that doesn't
|
||||
require that you use xterm. This works for most setups. This setting belongs
|
||||
in your shell profile (~/.bash_profile, ~/.bashrc, ~/.cshrc etc, depending on
|
||||
which shell you use). If this is a new setting, you will need to either run
|
||||
that profile script, or close and reopen the terminal window (which does the
|
||||
same thing).
|
||||
|
||||
Now tell taskwarrior that you want to use color. This is the default for
|
||||
taskwarrior, so the following step may be unnecessary.
|
||||
|
||||
$ task config color on
|
||||
|
||||
This command will make sure there is an entry in your ~/.taskrc file that looks
|
||||
like:
|
||||
|
||||
color=on
|
||||
|
||||
Now taskwarrior is ready.
|
||||
|
||||
.SH AUTOMATIC MONOCHROME
|
||||
It should be mentioned that taskwarrior is aware of whether its output is going
|
||||
to a terminal, or to a file or through a pipe. When taskwarrior output goes to
|
||||
a terminal, color is desirable, but consider the following command:
|
||||
|
||||
$ task list > file.txt
|
||||
|
||||
Do we really want all those color control codes in the file? Taskwarrior
|
||||
assumes that you do not, and temporarily sets color to 'off' while generating
|
||||
the output. This explains the output from the following command:
|
||||
|
||||
$ task config | grep '^color '
|
||||
color off
|
||||
|
||||
it always returns 'off', no matter what the setting.
|
||||
|
||||
The reason is that the taskwarrior output gets piped into grep, and the color is
|
||||
disabled. If you wanted those color codes, you can override this behavior by
|
||||
setting the _forcecolor variable to on, like this:
|
||||
|
||||
$ task config _forcecolor on
|
||||
$ task config | grep '^color '
|
||||
color on
|
||||
|
||||
or by temporarily overriding it like this:
|
||||
|
||||
$ task rc._forcecolor=on config | grep '^color '
|
||||
color on
|
||||
|
||||
.SH AVAILABLE COLORS
|
||||
Taskwarrior has a 'color' command that will show all the colors it is capable of
|
||||
displaying. Try this:
|
||||
|
||||
$ task color
|
||||
|
||||
The output cannot be replicated here in a man page, but you should see a set of
|
||||
color samples. How many you see depends on your terminal program's ability to
|
||||
render them.
|
||||
|
||||
You should at least see the Basic colors and Effects - if you do, then you have
|
||||
16-color support. If your terminal supports 256 colors, you'll know it!
|
||||
|
||||
.SH 16-COLOR SUPPORT
|
||||
The basic color support is provided through named colors:
|
||||
|
||||
black, red, blue, green, magenta, cyan, yellow, white
|
||||
|
||||
Foreground color (for text) is simply specified as one of the above colors, or
|
||||
not specified at all to use the default terminal text color.
|
||||
|
||||
Background color is specified by using the word 'on', and one of the above
|
||||
colors. Some examples:
|
||||
|
||||
green # green text, default background color
|
||||
green on yellow # green text, yellow background
|
||||
on yellow # default text color, yellow background
|
||||
|
||||
These colors can be modified further, by making the foreground bold, or by
|
||||
making the background bright. Some examples:
|
||||
|
||||
bold green
|
||||
bold white on bright red
|
||||
on bright cyan
|
||||
|
||||
The order of the words is not important, so the following are equivalent:
|
||||
|
||||
bold green
|
||||
green bold
|
||||
|
||||
But the 'on' is important - colors before the 'on' are foreground, and colors
|
||||
after 'on' are background.
|
||||
|
||||
There is an additional 'underline' attribute that may be used:
|
||||
|
||||
underline bright red on black
|
||||
|
||||
Taskwarrior has a command that helps you visualize these color combinations.
|
||||
Try this:
|
||||
|
||||
$ task color underline bright red on black
|
||||
|
||||
You can use this command to see how the various color combinations work. You
|
||||
will also see some sample colors displayed, like the ones above, in addition to
|
||||
the sample requested.
|
||||
|
||||
Some combinations look very nice, some look terrible. Different terminal
|
||||
programs do implement slightly different versions of 'red', for example, so you
|
||||
may see some unwanted variation due to the program. The brightness of your
|
||||
display is also a factor.
|
||||
|
||||
.SH 256-COLOR SUPPORT
|
||||
|
||||
Using 256 colors follows the same form, but the names are different, and some
|
||||
colors can be referenced in different ways. First there is by color ordinal,
|
||||
which is like this:
|
||||
|
||||
color0
|
||||
color1
|
||||
color2
|
||||
...
|
||||
color255
|
||||
|
||||
This gives you access to all 256 colors, but doesn't help you much. This range
|
||||
is a combination of 8 basic colors (color0 - color7), then 8 brighter variations
|
||||
(color8 - color15). Then a block of 216 colors (color16 - color231). Then a
|
||||
block of 24 gray colors (color232 - color255).
|
||||
|
||||
The large block of 216 colors (6x6x6 = 216) represents a color cube, which can
|
||||
be addressed via RGB values from 0 to 5 for each component color. A value of 0
|
||||
means none of this component color, and a value of 5 means the most intense
|
||||
component color. For example, a bright red is specified as:
|
||||
|
||||
rgb500
|
||||
|
||||
And a darker red would be:
|
||||
|
||||
rgb300
|
||||
|
||||
Note that the three digits represent the three component values, so in this
|
||||
example the 5, 0 and 0 represent red=5, green=0, blue=0. Combining intense red
|
||||
with no green and no blue yields red. Similarly, blue and green are:
|
||||
|
||||
rgb005
|
||||
rgb050
|
||||
|
||||
Another example - bright yellow - is a mix of bright red and bright green, but
|
||||
no blue component, so bright yellow is addressed as:
|
||||
|
||||
rgb550
|
||||
|
||||
A soft pink would be addressed as:
|
||||
|
||||
rgb515
|
||||
|
||||
See if you agree, by running:
|
||||
|
||||
$ task color black on rgb515
|
||||
|
||||
You may notice that the large color block is represented as 6 squares. All
|
||||
colors in the first square have a red value of 0. All colors in the 6th square
|
||||
have a red value of 5. Within each square, blue ranges from 0 to 5 left to
|
||||
right, and within each square green ranges from 0 to 5, top to bottom. This
|
||||
scheme takes some getting used to.
|
||||
|
||||
The block of 24 gray colors can also be accessed as gray0 - gray23, in a
|
||||
continuous ramp from black to white.
|
||||
|
||||
.SH MIXING 16- AND 256-COLORS
|
||||
|
||||
If you specify 16-colors, and view on a 256-color terminal, no problem. If you
|
||||
try the reverse, specifying 256-colors and viewing on a 16-color terminal, you
|
||||
will be disappointed, perhaps even appalled.
|
||||
|
||||
There is some limited color mapping - for example, if you were to specify this
|
||||
combination:
|
||||
|
||||
red on gray3
|
||||
|
||||
you are mixing a 16-color and 256-color specification. Taskwarrior will map red
|
||||
to color1, and proceed. Note that red and color1 are not quite the same.
|
||||
|
||||
Note also that there is no bold or bright attributes when dealing with 256
|
||||
colors, but there is still underline available.
|
||||
|
||||
.SH LEGEND
|
||||
Taskwarrior will show examples of all defined colors used in your .taskrc, or
|
||||
theme, if you run this command:
|
||||
|
||||
$ task color legend
|
||||
|
||||
This gives you an example of each of the colors, so you can see the effect,
|
||||
without necessarily creating a set of tasks that meet each of the rule criteria.
|
||||
|
||||
.SH RULES
|
||||
Taskwarrior supports colorization rules. These are configuration values that
|
||||
specify a color, and the conditions under which that color is used. By example,
|
||||
let's add a few tasks:
|
||||
|
||||
$ task add project:Home priority:H pay the bills (1)
|
||||
$ task add project:Home clean the rug (2)
|
||||
$ task add project:Garden clean out the garage (3)
|
||||
|
||||
We can add a color rule that uses a blue background for all tasks in the Home
|
||||
project:
|
||||
|
||||
$ task config color.project.Home on blue
|
||||
|
||||
We use quotes around "on blue" because there are two words, but they represent
|
||||
one value in the .taskrc file. Now suppose we which to use a bold yellow text
|
||||
color for all cleaning work:
|
||||
|
||||
$ task config color.keyword.clean bold yellow
|
||||
|
||||
Now what happens to task 2, which belongs to project Home (blue background), and
|
||||
is also a cleaning task (bold yellow foreground)? The colors are combined, and
|
||||
the task is shown as "bold yellow on blue".
|
||||
|
||||
Color rules can be applied by project and description keyword, as shown, and
|
||||
also by priority (or lack of priority), by active status, by being due or
|
||||
overdue, by being tagged, or having a specific tag (perhaps the most useful
|
||||
rule) or by being a recurring task.
|
||||
|
||||
It is possible to create a very colorful mix of rules. With 256-color support,
|
||||
those colors can be made subtle, and complementary, but without care, this can
|
||||
be a visual mess. Beware!
|
||||
|
||||
The precedence for the color rules is determined by the configuration variable
|
||||
'rule.precedence.color', which by default contains:
|
||||
|
||||
due.today,active,blocked,overdue,due,keyword,project,tag,recurring,pri,tagged
|
||||
|
||||
These are just the color rules with the 'color.' prefix removed. The rule
|
||||
'color.due.today' is the highest precedence, and 'color.tagged' is the lowest.
|
||||
|
||||
The keyword rule shown here as 'keyword' corresponds to a wildcard pattern,
|
||||
meaning 'color.keyword.*', or in other words all the keyword rules. Similarly
|
||||
for the 'color.tag.*' and 'color.project.*' rules.
|
||||
|
||||
There is also 'color.project.none', 'color.tag.none' and 'color.pri.none'.
|
||||
|
||||
.SH THEMES
|
||||
Taskwarrior supports themes. What this really means is that with the ability to
|
||||
include other files into the .taskrc file, different sets of color rules can
|
||||
be included.
|
||||
|
||||
To get a good idea of what a color theme looks like, try adding this entry to
|
||||
your .taskrc file:
|
||||
|
||||
.RS
|
||||
include /usr/local/share/doc/task/rc/dark-256.theme
|
||||
.RE
|
||||
|
||||
You can use any of the standard taskwarrior themes:
|
||||
|
||||
.RS
|
||||
light-16.theme
|
||||
.br
|
||||
light-256.theme
|
||||
.br
|
||||
dark-16.theme
|
||||
.br
|
||||
dark-256.theme
|
||||
.br
|
||||
dark-red-256.theme
|
||||
.br
|
||||
dark-green-256.theme
|
||||
.br
|
||||
dark-blue-256.theme
|
||||
.RE
|
||||
|
||||
You can also see how the theme will color the various tasks with the command:
|
||||
|
||||
$ task color legend
|
||||
|
||||
Better yet, create your own, and share it. We will gladly host the theme file
|
||||
on <http://taskwarrior.org>.
|
||||
|
||||
.SH "CREDITS & COPYRIGHTS"
|
||||
Taskwarrior was written by P. Beckingham <paul@beckingham.net>.
|
||||
.br
|
||||
Copyright (C) 2006 \- 2010 P. Beckingham
|
||||
|
||||
This man page was originally written by Paul Beckingham.
|
||||
|
||||
Taskwarrior is distributed under the GNU General Public License. See
|
||||
http://www.gnu.org/licenses/gpl-2.0.txt for more information.
|
||||
|
||||
.SH SEE ALSO
|
||||
.BR task(1),
|
||||
.BR taskrc(5),
|
||||
.BR task-faq(5),
|
||||
.BR task-tutorial(5),
|
||||
.BR task-sync(5)
|
||||
|
||||
For more information regarding taskwarrior, the following may be referenced:
|
||||
|
||||
.TP
|
||||
The official site at
|
||||
<http://taskwarrior.org>
|
||||
|
||||
.TP
|
||||
The official code repository at
|
||||
<git://tasktools.org/task.git/>
|
||||
|
||||
.TP
|
||||
You can contact the project by writing an email to
|
||||
<support@taskwarrior.org>
|
||||
|
||||
.SH REPORTING BUGS
|
||||
.TP
|
||||
Bugs in taskwarrior may be reported to the issue-tracker at
|
||||
<http://taskwarrior.org>
|
||||
365
doc/man/task-faq.5
Normal file
365
doc/man/task-faq.5
Normal file
@@ -0,0 +1,365 @@
|
||||
.TH task-faq 5 2010-10-07 "task 1.9.3" "User Manuals"
|
||||
|
||||
.SH NAME
|
||||
task-faq \- A FAQ for the task(1) command line todo manager.
|
||||
|
||||
.SH DESCRIPTION
|
||||
Taskwarrior is a command line TODO list manager. It maintains a list of tasks
|
||||
that you want to do, allowing you to add/remove, and otherwise manipulate them.
|
||||
Taskwarrior has a rich list of commands that allow you to do various things with it.
|
||||
|
||||
.SH WELCOME
|
||||
Welcome to the taskwarrior FAQ. If you have would like to see a question answered
|
||||
here, please send us a note at <support@taskwarrior.org>.
|
||||
|
||||
.TP
|
||||
.B Q: When I redirect the output to a file, I lose all the colors. How do I fix this?
|
||||
A: Taskwarrior knows (or thinks it knows) when the output is not going directly
|
||||
to a terminal, and strips out all the color control characters. This is based
|
||||
on the assumption that the color control codes are not wanted in the file.
|
||||
Prevent this with the following entry in your .taskrc file:
|
||||
|
||||
_forcecolor=on
|
||||
|
||||
.TP
|
||||
.B Q: How do I backup my taskwarrior data files? Where are they?
|
||||
A: Taskwarrior writes all pending tasks to the file
|
||||
|
||||
~/.task/pending.data
|
||||
|
||||
and all completed and deleted tasks to
|
||||
|
||||
~/.task/completed.data
|
||||
|
||||
They are text files, so they can just be copied to another location for
|
||||
safekeeping. Don't forget there is also the ~/.taskrc file that contains your
|
||||
taskwarrior configuration data. To be sure, and to future-proof your backup,
|
||||
consider backing up all the files in the ~/.task directory.
|
||||
|
||||
.TP
|
||||
.B Q: How can I separate my work tasks from my home tasks? Specifically, can I keep them completely separate?
|
||||
A: You can do this by creating an alternate .taskrc file, then using shell
|
||||
aliases. Here are example Bash commands to achieve this:
|
||||
|
||||
% cp ~/.taskrc ~/.taskrc_home
|
||||
% (now edit .taskrc_home to change the value of data.location)
|
||||
% alias wtask="task"
|
||||
% alias htask="task rc:~/.taskrc_home"
|
||||
|
||||
This gives you two commands, 'wtask' and 'htask' that operate using two
|
||||
different sets of task data files.
|
||||
|
||||
.TP
|
||||
.B Q: Can I revert to a previous version of taskwarrior? How?
|
||||
A: Yes, you can revert to a previous version of task, simply by downloading an
|
||||
older version and installing it. If you find a bug in task, then this may be the
|
||||
only way to work around the bug, until a patch release is made.
|
||||
|
||||
Note that it is possible that the taskwarrior file format will change. For
|
||||
example, the format changed between versions 1.5.0 and 1.6.0. Taskwarrior will
|
||||
automatically upgrade the file but if you need to revert to a previous version
|
||||
of taskwarrior, there is the file format to consider. This is yet another good
|
||||
reason to back up your task data files!
|
||||
|
||||
.TP
|
||||
.B Q: I'm using Ubuntu 9.04, and I want to word-wrap descriptions. How do I do this?
|
||||
A: You need to install ncurses, by doing this:
|
||||
|
||||
% sudo apt-get install libncurses5-dev
|
||||
|
||||
Then you need to rebuild taskwarrior from scratch, starting with
|
||||
|
||||
% cd task-X.X.X
|
||||
% ./configure
|
||||
...
|
||||
|
||||
The result should be a taskwarrior program that knows the width of the terminal
|
||||
window, and wraps accordingly.
|
||||
|
||||
Note that all the binary packages include this capability.
|
||||
|
||||
.TP
|
||||
.B Q: How do I build taskwarrior under Cygwin?
|
||||
A: Take a look at the README.build file, where the latest information on build
|
||||
issues is kept. Taskwarrior is built the same way everywhere. But under Cygwin,
|
||||
you'll need to make sure you have the following packages available first:
|
||||
|
||||
gcc
|
||||
make
|
||||
libncurses-devel
|
||||
libncurses8
|
||||
|
||||
The gcc and make packages allow you to compile the code, and are therefore
|
||||
required, but the ncurses packages are optional. Ncurses will allow taskwarrior
|
||||
to determine the width of the window, and therefore use the whole width and wrap
|
||||
text accordingly, for a more aesthetically pleasing display.
|
||||
|
||||
Note that there are binary packages that all include this capability.
|
||||
|
||||
.TP
|
||||
.B Q: Do colors work under Cygwin?
|
||||
A: They do, but only in a limited way. You can use regular foreground colors
|
||||
(black, red, green ...) and you can regular background colors (on_black, on_red,
|
||||
on_green ...), but underline and bold are not supported.
|
||||
|
||||
If you run the command:
|
||||
|
||||
% task colors
|
||||
|
||||
Taskwarrior will display all the colors it can use, and you will see which ones
|
||||
you can use.
|
||||
|
||||
Note that if you install the 'mintty' shell in Cygwin, then you can use 256
|
||||
colors.
|
||||
|
||||
See the 'man task-color' for more details on which colors can be used.
|
||||
|
||||
.TP
|
||||
.B Q: Where does taskwarrior store the data?
|
||||
By default, taskwarrior creates a .taskrc file in your home directory and
|
||||
populates it with defaults. Taskwarrior also creates a .task directory in your
|
||||
home directory and puts data files there.
|
||||
|
||||
.TP
|
||||
.B Q: Can I edit that data?
|
||||
Of course you can. It is a simple text file, and looks somewhat like the JSON
|
||||
format, and if you are careful not to break the format, there is no reason not
|
||||
to edit it. But taskwarrior provides a rich command set to do that manipulation
|
||||
for you, so it is probably best to leave those files alone.
|
||||
|
||||
.TP
|
||||
.B Q: How do I restore my .taskrc file to defaults?
|
||||
If you delete (or rename) your .taskrc file, taskwarrior will offer to create a
|
||||
default one for you. Another way to do this is with the command:
|
||||
|
||||
$ task rc:new-file version
|
||||
|
||||
Taskwarrior will create 'new-file' if it doesn't already exist. There will not
|
||||
be much in it though - taskwarrior relies heavily on default values, which can
|
||||
be seen with this command:
|
||||
|
||||
$ task show
|
||||
|
||||
which lists all the currently known settings. If you have just created
|
||||
new-file, then this command lists only the defaults.
|
||||
|
||||
Note that this is a good way to learn about new configuration settings,
|
||||
particularly if your .taskrc file was created by an older version.
|
||||
|
||||
.TP
|
||||
.B Q: Do I need to back up my taskwarrior data?
|
||||
Yes. You should back up your ~/.task directory, and probably your ~/.taskrc
|
||||
file too.
|
||||
|
||||
.TP
|
||||
.B Q: Can I share my tasks between different machines?
|
||||
Yes, you can. Most people have success with a DropBox - a free and secure file
|
||||
synching tool. Simply configure taskwarrior to store it's data in a dropbox
|
||||
folder, by modifying the:
|
||||
|
||||
data.location=...
|
||||
|
||||
configuration variable. Check out DropBox at http://www.dropbox.com.
|
||||
|
||||
.TP
|
||||
.B Q: I don't like dropbox. Is there another way to synchronize my tasks?
|
||||
Of course. Especially if you want to modify tasks offline on both machines and
|
||||
synchronize them later on. For this purpose there is a 'merge' command which is
|
||||
is able to insert the modifications you made to one of your task databases into
|
||||
a second database.
|
||||
|
||||
Here is a basic example of the procedure:
|
||||
|
||||
$ task merge ssh://user@myremotehost/.task/
|
||||
$ task push ssh://user@myremotehost/.task/
|
||||
|
||||
The first command fetches the undo.data file from the remote system, reads the
|
||||
changes made and updates the local database. When this merge command completes,
|
||||
you should copy all the local .data files to the remote system either by using
|
||||
the push command explicitly or by activating the merge.autopush feature in the
|
||||
~/.taskrc file. This way you ensure that both systems are fully synchronized.
|
||||
|
||||
.TP
|
||||
.B Q: The undo.data file gets very large - do I need it?
|
||||
You need it if you want the undo capability, or the merge capability mentioned
|
||||
above. But if it gets large, you can certainly truncate it to save space, just
|
||||
be careful to delete lines from the top of the file, up to and including a
|
||||
separator '---'. The simplest way is to simply delete the undo.data file. Note
|
||||
that it does not slow down taskwarrior, because it is never read until you want
|
||||
to undo. Otherwise taskwarrior only appends to the file.
|
||||
|
||||
.TP
|
||||
.B Q: How do I know whether my terminal support 256 colors?
|
||||
You will need to make sure your TERM environment variable is set to xterm-color,
|
||||
otherwise the easiest way is to just try it! With version 1.9 or later, you
|
||||
simply run
|
||||
|
||||
$ task color
|
||||
|
||||
and a full color palette is displayed. If you see only 8 or 16 colors, perhaps
|
||||
with those colors repeated, then your terminal does not support 256 colors.
|
||||
|
||||
See the task-color(5) man page for more details.
|
||||
|
||||
.TP
|
||||
.B Q: How do I make use of all these colors?
|
||||
Use one of our provided color themes, or create your own - after all, they are
|
||||
just collections of color settings.
|
||||
|
||||
See the task-color(5) man page for an in-depth explanation of the color rules.
|
||||
|
||||
.TP
|
||||
.B Q: How can I make taskwarrior put the command in the terminal window title?
|
||||
You cannot. But you can make the shell do it, and you can make the shell
|
||||
call the task program. Here is a Bash script that does this:
|
||||
|
||||
#! /bin/bash
|
||||
|
||||
printf "\\033]0;task $*\a"
|
||||
/usr/local/bin/task $*
|
||||
|
||||
You just need to run the script, and let the script run task. Here is a Bash
|
||||
function that does the same thing:
|
||||
|
||||
t ()
|
||||
{
|
||||
printf "\\033]0;task $*\a"
|
||||
/usr/local/bin/task $*
|
||||
}
|
||||
|
||||
.TP
|
||||
.B Q: Taskwarrior searches in a case-sensitive fashion - can I change that?
|
||||
You can. Just set the following value in your .taskrc file:
|
||||
|
||||
search.case.sensitive=no
|
||||
|
||||
This will affect searching for keywords:
|
||||
|
||||
$ task list Document
|
||||
|
||||
taskwarrior will perform a caseless search in the description and any
|
||||
annotations for the keyword 'Document'. It also affects description and
|
||||
annotation substitutions:
|
||||
|
||||
$ task 1 /teh/the/
|
||||
|
||||
The pattern on the left will now be a caseless search term.
|
||||
|
||||
.TP
|
||||
.B Q: Why do the ID numbers change?
|
||||
Taskwarrior does this to always show you the smallest numbers it can. The idea
|
||||
is that if your tasks are numbered 1 - 33, for example, those are easy to type
|
||||
in. If instead task kept a rolling sequence number, after a while your tasks
|
||||
might be numbered 481 - 513, which makes it more likely to enter one
|
||||
incorrectly, because there are more digits.
|
||||
|
||||
When you run a report (such as "list"), the numbers are assigned before display.
|
||||
For example, you can do this:
|
||||
|
||||
$ task list
|
||||
$ task do 12
|
||||
$ task add Pay the rent
|
||||
$ task delete 31
|
||||
|
||||
Those id numbers are then good until the next report is run. This is because
|
||||
taskwarrior performs a garbage-collect operation on the pending tasks file when
|
||||
a report is run, which moves the deleted and completed tasks from the
|
||||
pending.data file to the completed.data file. This keeps the pending tasks file
|
||||
small, and therefore keeps taskwarrior fast. The completed data file is the one
|
||||
that grows unbounded with use, but that one isn't accessed as much, so it
|
||||
doesn't matter as much. So in all, the ID number resequencing is about
|
||||
efficiency.
|
||||
|
||||
.TP
|
||||
.B Q: How do I list tasks that are either priority 'H' or 'M', but not 'L'?
|
||||
Taskwarriors filters are all combined with and implicit logical AND operator, so
|
||||
if you were to try this:
|
||||
|
||||
$ task list priority:H priority:M
|
||||
|
||||
There would be no results, because the priority could not simultaneously be 'H'
|
||||
AND 'M'. What is required is some way to use OR instead of an AND operator. The
|
||||
solution is to invert the filter in this way:
|
||||
|
||||
$ task list priority.not:L priority.any:
|
||||
|
||||
This filter states that the priority must not be 'L', AND there must be a
|
||||
priority assigned. This filter then properly lists tasks that are 'H' or 'M',
|
||||
because the two logical restrictions are not mutually exclusive as in the
|
||||
original filter.
|
||||
|
||||
Some of you may be familiar with DeMorgan's laws of formal logic that relate
|
||||
the AND and OR operators in terms of each other via negation, which can be used
|
||||
to construct task filters.
|
||||
|
||||
.TP
|
||||
.B Q: How do I delete an annotation?
|
||||
Taskwarrior now has a 'denotate' command to remove annotations. Here is an
|
||||
example:
|
||||
|
||||
$ task add Original task
|
||||
$ task 1 annotate foo
|
||||
$ task 1 annotate bar
|
||||
$ task 1 annotate foo bar
|
||||
|
||||
Now to delete the first annotation, use:
|
||||
|
||||
$ task 1 denotate foo
|
||||
|
||||
This takes the fragment 'foo' and compares it to each of the annotations. In
|
||||
this example, it will remove the first annotation, not the third, because it is
|
||||
an exact match. If there are no exact matches, it will remove the first
|
||||
non-exact match:
|
||||
|
||||
$ task 1 denotate ar
|
||||
|
||||
This will remove the second annotation - the first non-exact match.
|
||||
|
||||
.TP
|
||||
.B Q: How can I help?
|
||||
There are lots of ways. Here are some:
|
||||
|
||||
- Provide feedback on what works, what does not
|
||||
- Tell us how task does or does not fit your workflow
|
||||
- Tell people about task
|
||||
- Report bugs when you see them
|
||||
- Contribute to our Wiki
|
||||
- Suggest features
|
||||
- Write unit tests
|
||||
- Fix bugs
|
||||
|
||||
.SH "CREDITS & COPYRIGHTS"
|
||||
Taskwarrior was written by P. Beckingham <paul@beckingham.net>.
|
||||
.br
|
||||
Copyright (C) 2006 \- 2010 P. Beckingham
|
||||
|
||||
This man page was originally written by P. Beckingham.
|
||||
|
||||
Taskwarrior is distributed under the GNU General Public License. See
|
||||
http://www.gnu.org/licenses/gpl-2.0.txt for more information.
|
||||
|
||||
.SH SEE ALSO
|
||||
.BR task(1),
|
||||
.BR taskrc(5),
|
||||
.BR task-tutorial(5),
|
||||
.BR task-color(5),
|
||||
.BR task-sync(5)
|
||||
|
||||
For more information regarding task, the following may be referenced:
|
||||
|
||||
.TP
|
||||
The official site at
|
||||
<http://taskwarrior.org>
|
||||
|
||||
.TP
|
||||
The official code repository at
|
||||
<git://tasktools.org/task.git/>
|
||||
|
||||
.TP
|
||||
You can contact the project by writing an email to
|
||||
<support@taskwarrior.org>
|
||||
|
||||
.SH REPORTING BUGS
|
||||
.TP
|
||||
Bugs in taskwarrior may be reported to the issue-tracker at
|
||||
<http://taskwarrior.org>
|
||||
346
doc/man/task-sync.5
Normal file
346
doc/man/task-sync.5
Normal file
@@ -0,0 +1,346 @@
|
||||
.TH task-sync 5 2010-10-07 "task 1.9.3" "User Manuals"
|
||||
|
||||
.SH NAME
|
||||
task-sync \- A tutorial for the task(1) data synchronization capabilities.
|
||||
|
||||
.SH DESCRIPTION
|
||||
Taskwarrior has built-in support for synchronization, which can be used to keep
|
||||
two task databases up to date, regardless of which one is used. This capability
|
||||
can also be used to keep a backup copy of your task database on another machine.
|
||||
|
||||
Taskwarrior can use various protocols for transferring the data.
|
||||
|
||||
.SH HOW IT WORKS
|
||||
If you were to manually attempt to keep two separate task databases up to date,
|
||||
you would need to inspect both databases, and detect changes that occurred in
|
||||
each one. Those changes would need to be migrated to the other database, while
|
||||
being careful not to miss a change, and not to confuse an 'add' in one with
|
||||
a 'delete' in the other.
|
||||
|
||||
The synchronization feature does just this. It can transfer task databases,
|
||||
compare tasks, and apply changes where necessary.
|
||||
|
||||
.SH NEW COMMANDS
|
||||
Taskwarrior has 'pull', 'push' and 'merge' commands which perform the steps
|
||||
necessary to move files around and combine them. In the common use case, you
|
||||
would only need to use the 'merge' command. These commands take an argument
|
||||
that is a URI, which indicates where the remote database resides.
|
||||
|
||||
To be clear, the local database always refers to your ~/.task directory (unless
|
||||
overridden), and the remote database is always specified by URI.
|
||||
|
||||
.SH MERGE
|
||||
The merge command will fetch task data via URI and combine it with the local
|
||||
task database. The syntax is:
|
||||
|
||||
.br
|
||||
.RS
|
||||
task merge [<URI>]
|
||||
.RE
|
||||
|
||||
The URI is optional if the
|
||||
.B merge.default.uri
|
||||
configuration variable is set. The URI may point to a different directory, or
|
||||
it may be a different computer. Here is an example of the merge command:
|
||||
|
||||
.br
|
||||
.RS
|
||||
$ task merge ~/work/
|
||||
.RE
|
||||
|
||||
This URI (~/work/) is a path name, which means the remote database is on the
|
||||
same computer. Taskwarrior will fetch the data from the URI, and merge it with
|
||||
your local data in ~/.task.
|
||||
|
||||
When complete, you will be asked whether you would like to push the combined
|
||||
data back to the remote location specified by the URI. This is useful if you
|
||||
are keeping two task databases synchronized, but it can be turned off. See
|
||||
CONFIGURATION.
|
||||
|
||||
Note that a merge operation is not atomically reversible. You could however
|
||||
run the 'task undo' command repeatedly to undo the effects.
|
||||
|
||||
.SH PUSH
|
||||
The push command will copy the local task database to the specified URI. The
|
||||
syntax is:
|
||||
|
||||
.br
|
||||
.RS
|
||||
task push [<URI>]
|
||||
.RE
|
||||
|
||||
The URI is optional if the
|
||||
.B push.default.uri
|
||||
configuration variable is set. This command is useful for making backup copies
|
||||
of your task database.
|
||||
|
||||
Note that the task files at the location specified by the URI are simply
|
||||
overwritten, so don't expect any merging to occur. Misused, push can be
|
||||
dangerous.
|
||||
|
||||
.SH PULL
|
||||
The pull command will copy a task database from a URI to the local task database
|
||||
(~/.task by default). The syntax is:
|
||||
|
||||
.br
|
||||
.RS
|
||||
task pull [<URI>]
|
||||
.RE
|
||||
|
||||
The URI is optional if the
|
||||
.B pull.default.uri
|
||||
configuration variable is set. This command is useful for restoring a backup
|
||||
copy of your task database.
|
||||
|
||||
Note that your local task database files will be simply overwritten by the files
|
||||
obtained from the location specified by the URI, so don't expect any merging to
|
||||
occur. Misused, pull can be dangerous.
|
||||
|
||||
.SH URI TYPES
|
||||
The most basic URI is a path name on the local machine. An example would be:
|
||||
|
||||
.br
|
||||
.RS
|
||||
/home/bob/.task/
|
||||
.RE
|
||||
|
||||
All the other URIs allow access to remote machines. The first uses SSH and scp
|
||||
(either form can be used):
|
||||
|
||||
.br
|
||||
.RS
|
||||
ssh://[user@]host[:port]:path/to/undo.data
|
||||
.br
|
||||
[user@]host[:port]:/path/
|
||||
.RE
|
||||
|
||||
Rsync is another supported protocol that minimizes network traffic, by a clever
|
||||
algorithm that doesn't copy files that have not changed:
|
||||
|
||||
.br
|
||||
.RS
|
||||
rsync://[user@]host.xz[:port]/path/to/undo.data
|
||||
.RE
|
||||
|
||||
Curl supports several protocols that can transfer data using HTTP, HTTPS and
|
||||
FTP:
|
||||
|
||||
.br
|
||||
.RS
|
||||
http://host[:port]/path/to/undo.data
|
||||
.br
|
||||
https://host[:port]/path/to/undo.data
|
||||
.br
|
||||
ftp://user@host[:port]/path/to/undo.data
|
||||
.RE
|
||||
|
||||
.SH CONFLICTS
|
||||
When modifications on the local and remote machine conflict, for example if
|
||||
both machines change the project name of the same task to different values,
|
||||
then Taskwarrior automatically selects the most recent change. Thus, there
|
||||
are no conflicts.
|
||||
|
||||
.SH EXAMPLE - Backup on another machine
|
||||
One very good use of 'push' is to make backup copies of your task database in
|
||||
another location. Suppose your task database is kept in the usual place, in
|
||||
the ~/.task directory, and you wanted to make a backup copy in ~/backup. You
|
||||
would use this command:
|
||||
|
||||
.br
|
||||
.RS
|
||||
$ task push ~/backup/
|
||||
.RE
|
||||
|
||||
This would copy the files in ~/.task to ~/backup, overwriting the files that
|
||||
were already in ~/backup. To backup your files to another machine, you could
|
||||
use:
|
||||
|
||||
.br
|
||||
.RS
|
||||
$ task push user@host:backup
|
||||
.RE
|
||||
|
||||
This could be improved by setting the
|
||||
.B push.default.uri
|
||||
configuration variable and then relying on the default, like this:
|
||||
|
||||
.br
|
||||
.RS
|
||||
$ task config push.default.uri user@host:backup
|
||||
.RE
|
||||
|
||||
and then you need only run the push command:
|
||||
|
||||
.br
|
||||
.RS
|
||||
$ task push
|
||||
.RE
|
||||
|
||||
and the default push URI will be used. If you wanted to restore a backup, you
|
||||
simply use the pull command instead:
|
||||
|
||||
.br
|
||||
.RS
|
||||
$ task pull user@host:backup
|
||||
.RE
|
||||
|
||||
This can be simplified by setting the
|
||||
.B pull.default.uri
|
||||
configuration variable and then relying on the default, like this:
|
||||
|
||||
.br
|
||||
.RS
|
||||
$ task config pull.default.uri user@host:backup
|
||||
.RE
|
||||
|
||||
Note that pull and push will blindly overwrite the task files without any
|
||||
merging. Be careful.
|
||||
|
||||
.SH EXAMPLE - Keeping two task databases synchronized
|
||||
The most common synchronization will be to keep two task databases synchronized
|
||||
on different machines. Here is a full example, including setup that illustrates
|
||||
this.
|
||||
|
||||
Suppose there are two machines, named 'local' and 'remote', for simplicity.
|
||||
Taskwarrior is installed on both machines. The different machines are
|
||||
indicated here by the prompt. Suppose Alice enters two tasks on her local
|
||||
machine:
|
||||
|
||||
.br
|
||||
.RS
|
||||
local> task add Deliver the new budget proposal due:tuesday
|
||||
.br
|
||||
local> task add Set up a meeting with Bob
|
||||
.RE
|
||||
|
||||
Then later adds a task on the remote machine:
|
||||
|
||||
.br
|
||||
.RS
|
||||
remote> task add Present the budget proposal at the big meeting due:thursday
|
||||
.RE
|
||||
|
||||
Now on the local machine, Alice merges the two task databases:
|
||||
|
||||
.br
|
||||
.RS
|
||||
local> task merge alice@remote:.task
|
||||
.br
|
||||
Would you like to push the changes to 'alice@remote:.task'? Y
|
||||
.RE
|
||||
|
||||
Taskwarrior has combined the two task databases on local, then pushed the
|
||||
changes back to remote. Now suppose Alice changes the due date for task 1
|
||||
on remote:
|
||||
|
||||
.br
|
||||
.RS
|
||||
remote> task 1 due:wednesday
|
||||
.RE
|
||||
|
||||
Now on the local machine, Alice sets up a default URI and autopush:
|
||||
|
||||
.br
|
||||
.RS
|
||||
local> task config merge.default.uri alice@remote:.task
|
||||
.br
|
||||
local> task config merge.autopush yes
|
||||
.RE
|
||||
|
||||
Now Alice can simply run merge to make sure that the new due date is copied to
|
||||
the local machine:
|
||||
|
||||
.br
|
||||
.RS
|
||||
local> task merge
|
||||
.RE
|
||||
|
||||
This time the URI is determined automatically, and after the merge the files are
|
||||
pushed back to the remote machine. In a similar way, the remote machine can
|
||||
also be configured to merge from the local machine and push back to it. Then it
|
||||
is just a matter of Alice remembering to merge now and then, from either
|
||||
machine, to have her data in two (or even more) places.
|
||||
|
||||
.SH CONFIGURATION
|
||||
By setting these configuration variables, it is possible to simplify the
|
||||
synchronization commands, by relying on the defaults or alias names.
|
||||
|
||||
.br
|
||||
.B merge.autopush=yes|no|ask
|
||||
.RS
|
||||
This controls whether the automatic push after a merge is performed, not
|
||||
performed, or whether the user is asked every time. The default value is 'ask'.
|
||||
.RE
|
||||
|
||||
.br
|
||||
.B merge.default.uri=<uri>
|
||||
.RS
|
||||
Sets a default URI so that just the 'task merge' command be run without the
|
||||
need to retype the URI every time. You can also use this configuration scheme
|
||||
to set alias names, e.g. set merge.desktop.uri and run 'task merge desktop'.
|
||||
.RE
|
||||
|
||||
.br
|
||||
.B push.default.uri=<uri>
|
||||
.RS
|
||||
Sets a default URI so that just the 'task push' command be run without the
|
||||
need to retype the URI every time. You can also use this configuration scheme
|
||||
to set alias names, e.g. set push.desktop.uri and run 'task push desktop'.
|
||||
.RE
|
||||
|
||||
.br
|
||||
.B pull.default.uri=<uri>
|
||||
.RS
|
||||
Sets a default URI so that just the 'task pull' command be run without the
|
||||
need to retype the URI every time. You can also use this configuration scheme
|
||||
to set alias names, e.g. set pull.desktop.uri and run 'task pull desktop'.
|
||||
.RE
|
||||
|
||||
Note that, when using SSH/scp, hostnames will be expanded due to the ssh
|
||||
configuration file ~/.ssh/config.
|
||||
|
||||
.SH EXTERNAL DEPENDENCIES
|
||||
Depending on the URI protocols used, the utilities 'scp', 'rsync' and 'curl'
|
||||
must be installed and accessible via the $PATH environment variable.
|
||||
|
||||
If you have deleted your ~/.task/undo.data file to save space, you will be
|
||||
unable to merge. The change transactions stored in the undo.data file are
|
||||
used for synchronization.
|
||||
|
||||
.SH "CREDITS & COPYRIGHTS"
|
||||
task was written by P. Beckingham <paul@beckingham.net>.
|
||||
.br
|
||||
Copyright (C) 2006 \- 2010 P. Beckingham, F. Hernandez.
|
||||
|
||||
The sync capabilities were written by J. Schlatow.
|
||||
Parts copyright (C) 2010 J. Schlatow.
|
||||
|
||||
task is distributed under the GNU General Public License. See
|
||||
http://www.gnu.org/licenses/gpl-2.0.txt for more information.
|
||||
|
||||
.SH SEE ALSO
|
||||
.BR task(1),
|
||||
.BR taskrc(5),
|
||||
.BR task-faq(5),
|
||||
.BR task-color(5),
|
||||
.BR task-tutorial(5),
|
||||
.BR ssh_config(5)
|
||||
|
||||
For more information regarding task, the following may be referenced:
|
||||
|
||||
.TP
|
||||
The official site at
|
||||
<http://taskwarrior.org>
|
||||
|
||||
.TP
|
||||
The official code repository at
|
||||
<git://tasktools.org/task.git/>
|
||||
|
||||
.TP
|
||||
You can contact the project by writing an email to
|
||||
<support@taskwarrior.org>
|
||||
|
||||
.SH REPORTING BUGS
|
||||
.TP
|
||||
Bugs in task may be reported to the issue-tracker at
|
||||
<http://taskwarrior.org>
|
||||
File diff suppressed because it is too large
Load Diff
383
doc/man/task.1
383
doc/man/task.1
@@ -1,4 +1,4 @@
|
||||
.TH task 1 2009-11-18 "task 1.8.5" "User Manuals"
|
||||
.TH task 1 2010-10-07 "task 1.9.3" "User Manuals"
|
||||
|
||||
.SH NAME
|
||||
task \- A command line todo manager.
|
||||
@@ -7,9 +7,17 @@ task \- A command line todo manager.
|
||||
.B task [subcommand] [args]
|
||||
|
||||
.SH DESCRIPTION
|
||||
Task is a command line todo list manager. It maintains a list of tasks that you
|
||||
want to do, allowing you to add/remove, and otherwise manipulate them. Task
|
||||
has a rich list of subcommands that allow you to do various things with it.
|
||||
Taskwarrior is a command line todo list manager. It maintains a list of tasks
|
||||
that you want to do, allowing you to add/remove, and otherwise manipulate them.
|
||||
Task has a rich list of subcommands that allow you to do various things with it.
|
||||
|
||||
At the core, taskwarrior is a list processing program. You add text and
|
||||
additional related parameters and redisplay the information in a nice way. It
|
||||
turns into a todo list program when you add due dates and recurrence. It turns
|
||||
into an organized todo list program when you add priorities, tags (one word
|
||||
descriptors), project groups, etc. Taskwarrior turns into an organized to do
|
||||
list program when you modify the configuration file to have the output displayed
|
||||
the way you want to see it.
|
||||
|
||||
.SH SUBCOMMANDS
|
||||
|
||||
@@ -18,14 +26,189 @@ has a rich list of subcommands that allow you to do various things with it.
|
||||
Adds a new task to the task list.
|
||||
|
||||
.TP
|
||||
.B append [tags] [attrs] description
|
||||
Appends more information to an existing
|
||||
task.
|
||||
.B log [tags] [attrs] description
|
||||
Adds a new task that is already completed, to the task list.
|
||||
|
||||
.TP
|
||||
.B annotate ID description
|
||||
Adds an annotation to an existing task.
|
||||
|
||||
.TP
|
||||
.B denotate ID description
|
||||
Deletes an annotation for the specified task. If the provided description matches an
|
||||
annotation exactly, the corresponding annotation is deleted. If the provided description
|
||||
matches annotations partly, the first partly matched annotation is deleted.
|
||||
|
||||
.TP
|
||||
.B info ID
|
||||
Shows all data and metadata for the specified task.
|
||||
|
||||
.TP
|
||||
.B ID
|
||||
With an ID but no specific command, taskwarrior runs the "info" command.
|
||||
|
||||
.TP
|
||||
.B undo
|
||||
Reverts the most recent action.
|
||||
|
||||
.TP
|
||||
.B shell
|
||||
Launches an interactive shell with all the task commands available.
|
||||
|
||||
.TP
|
||||
.B duplicate ID [tags] [attrs] [description]
|
||||
Duplicates the specified task and allows modifications.
|
||||
|
||||
.TP
|
||||
.B delete ID
|
||||
Deletes the specified task from task list.
|
||||
|
||||
.TP
|
||||
.B start ID
|
||||
Marks the specified task as started.
|
||||
|
||||
.TP
|
||||
.B stop ID
|
||||
Removes the
|
||||
.I start
|
||||
time from the specified task.
|
||||
|
||||
.TP
|
||||
.B done ID [tags] [attrs] [description]
|
||||
Marks the specified task as done.
|
||||
|
||||
.TP
|
||||
.B projects
|
||||
Lists all project names that are currently used by pending tasks, and the
|
||||
number of tasks for each.
|
||||
|
||||
.TP
|
||||
.B tags
|
||||
Show a list of all tags used. Any special tags used are highlighted.
|
||||
|
||||
.TP
|
||||
.B summary
|
||||
Shows a report of task status by project.
|
||||
|
||||
.TP
|
||||
.B timesheet [weeks]
|
||||
Shows a weekly report of tasks completed and started.
|
||||
|
||||
.TP
|
||||
.B history
|
||||
Shows a report of task history by month. Alias to history.monthly.
|
||||
|
||||
.TP
|
||||
.B history.annual
|
||||
Shows a report of task history by year.
|
||||
|
||||
.TP
|
||||
.B ghistory
|
||||
Shows a graphical report of task status by month. Alias to ghistory.monthly.
|
||||
|
||||
.TP
|
||||
.B ghistory.annual
|
||||
Shows a graphical report of task status by year.
|
||||
|
||||
.TP
|
||||
.B calendar [ y | due [y] | month year [y] | year ]
|
||||
Shows a monthly calendar with due tasks marked.
|
||||
|
||||
.TP
|
||||
.B stats
|
||||
Shows task database statistics.
|
||||
|
||||
.TP
|
||||
.B import \fIfile
|
||||
Imports tasks from a variety of formats.
|
||||
|
||||
.TP
|
||||
.B export
|
||||
Exports all tasks in the default format. This is an alias to the command export.yaml.
|
||||
Redirect the output to a file, if you wish to save it, or pipe it to another command.
|
||||
|
||||
.TP
|
||||
.B export.csv
|
||||
Exports all tasks in CSV format.
|
||||
Redirect the output to a file, if you wish to save it, or pipe it to another command.
|
||||
|
||||
.TP
|
||||
.B export.ical
|
||||
Exports all tasks in iCalendar format.
|
||||
Redirect the output to a file, if you wish to save it, or pipe it to another command.
|
||||
|
||||
.TP
|
||||
.B export.yaml
|
||||
Exports all tasks in YAML 1.1 format.
|
||||
Redirect the output to a file, if you wish to save it, or pipe it to another command.
|
||||
|
||||
.TP
|
||||
.B merge URL
|
||||
Merges two task databases by comparing the modifications that are stored in the
|
||||
undo.data files. The location of the second undo.data file must be passed on as argument. URL may have the following syntaxes:
|
||||
|
||||
|
||||
ssh://[user@]host.xz[:port]/path/to/undo.data
|
||||
|
||||
rsync://[user@]host.xz[:port]/path/to/undo.data
|
||||
|
||||
[user@]host.xz:path/to/undo.data
|
||||
|
||||
/path/to/local/undo.data
|
||||
|
||||
You can set aliases for frequently used URLs in the .taskrc.
|
||||
|
||||
.TP
|
||||
.B push URL
|
||||
Pushes the task database to a remote another location for distributing the
|
||||
changes made by the merge command.
|
||||
|
||||
(See annotations above for valid URL syntaxes.)
|
||||
|
||||
.TP
|
||||
.B pull URL
|
||||
Overwrites the task database with those files found at the URL.
|
||||
|
||||
(See annotations above for valid URL syntaxes.)
|
||||
|
||||
.TP
|
||||
.B color [sample | legend]
|
||||
Displays all possible colors, a named sample, or a legend containing all
|
||||
currently defined colors.
|
||||
|
||||
.TP
|
||||
.B version
|
||||
Shows the taskwarrior version number
|
||||
|
||||
.TP
|
||||
.B help
|
||||
Shows the long usage text.
|
||||
|
||||
.TP
|
||||
.B show [all | substring]"
|
||||
Shows all the current settings in the taskwarrior configuration file. If a
|
||||
substring is specified just the settings containing that substring will be
|
||||
displayed.
|
||||
|
||||
.TP
|
||||
.B config [name [value | '']]
|
||||
Add, modify and remove settings directly in the taskwarrior configuration.
|
||||
This command either modifies the 'name' setting with a new value of 'value',
|
||||
or adds a new entry that is equivalent to 'name=value':
|
||||
|
||||
task config name value
|
||||
|
||||
This command sets a blank value. This has the effect of suppressing any
|
||||
default value:
|
||||
|
||||
task config name ''
|
||||
|
||||
Finally, this command removes any 'name=...' entry from the .taskrc file:
|
||||
|
||||
task config name
|
||||
|
||||
.SH MODIFYING SUBCOMMANDS
|
||||
|
||||
.TP
|
||||
.B ID [tags] [attrs] [description]
|
||||
Modifies the existing task with provided information.
|
||||
@@ -44,97 +227,19 @@ Launches an editor to let you modify all aspects of a task directly.
|
||||
Use carefully.
|
||||
|
||||
.TP
|
||||
.B undo
|
||||
Reverts the most recent action.
|
||||
.B append [tags] [attrs] description
|
||||
Appends information to an existing task.
|
||||
|
||||
.TP
|
||||
.B shell
|
||||
Launches an interactive shell with all the task commands available.
|
||||
|
||||
.TP
|
||||
.B duplicate ID [tags] [attrs] [description]
|
||||
Duplicates the specified task and allows modifications.
|
||||
|
||||
.TP
|
||||
.B delete ID
|
||||
Deletes the specified task from task list.
|
||||
|
||||
.TP
|
||||
.B info ID
|
||||
Shows all data and metadata for the specified task.
|
||||
|
||||
.TP
|
||||
.B start ID
|
||||
Marks the specified task as started.
|
||||
|
||||
.TP
|
||||
.B stop ID
|
||||
Removes the
|
||||
.I start
|
||||
time from the specified task.
|
||||
|
||||
.TP
|
||||
.B done ID [tags] [attrs] [description]
|
||||
Marks the specified task as done.
|
||||
|
||||
.TP
|
||||
.B projects
|
||||
Lists all project names used, and the number of tasks for each.
|
||||
|
||||
.TP
|
||||
.B tags
|
||||
Show a list of all tags used.
|
||||
|
||||
.TP
|
||||
.B summary
|
||||
Shows a report of task status by project.
|
||||
|
||||
.TP
|
||||
.B timesheet [weeks]
|
||||
Shows a weekly report of tasks completed and started.
|
||||
|
||||
.TP
|
||||
.B history
|
||||
Shows a report of task history by month.
|
||||
|
||||
.TP
|
||||
.B ghistory
|
||||
Shows a graphical report of task status by month.
|
||||
|
||||
.TP
|
||||
.B calendar [ y | due [y] | month year [y] | year ]
|
||||
Shows a monthly calendar with due tasks marked.
|
||||
|
||||
.TP
|
||||
.B stats
|
||||
Shows task database statistics.
|
||||
|
||||
.TP
|
||||
.B import \fIfile
|
||||
Imports tasks from a variety of formats.
|
||||
|
||||
.TP
|
||||
.B export \fIfile
|
||||
Exports all tasks as a CSV file.
|
||||
|
||||
.TP
|
||||
.B color
|
||||
Displays all possible colors.
|
||||
|
||||
.TP
|
||||
.B version
|
||||
Shows the task version number and current settings in the task configuration
|
||||
file.
|
||||
|
||||
.TP
|
||||
.B help
|
||||
Shows the long usage text.
|
||||
.B prepend [tags] [attrs] description
|
||||
Prepends information to an existing task.
|
||||
|
||||
.SH REPORT SUBCOMMANDS
|
||||
|
||||
A report is a listing of information from the task database. There are several
|
||||
reports currently predefined in task. The output and sort behavior of these
|
||||
reports can be configured in the configuration file. See also the man page taskrc(5).
|
||||
reports currently predefined in taskwarrior. The output and sort behavior of
|
||||
these reports can be configured in the configuration file. See also the man page
|
||||
taskrc(5).
|
||||
|
||||
.TP
|
||||
.B active [tags] [attrs] [description]
|
||||
@@ -151,9 +256,13 @@ Shows all tasks matching the specified criteria
|
||||
that are completed.
|
||||
|
||||
.TP
|
||||
.B ls [tags] [attrs] [description]
|
||||
.B minimal [tags] [attrs] [description]
|
||||
Provides a minimal listing of tasks with specified criteria.
|
||||
|
||||
.TP
|
||||
.B ls [tags] [attrs] [description]
|
||||
Provides a short listing of tasks with specified criteria.
|
||||
|
||||
.TP
|
||||
.B list [tags] [attrs] [description]
|
||||
Provides a more detailed listing of tasks with specified criteria.
|
||||
@@ -183,6 +292,14 @@ Shows all recurring tasks matching the specified criteria.
|
||||
.B waiting [tags] [attrs] [description]
|
||||
Shows all waiting tasks matching the specified criteria.
|
||||
|
||||
.TP
|
||||
.B blocked [tags] [attrs] [description]
|
||||
Shows all blocked tasks, that are dependent on other tasks.
|
||||
|
||||
.TP
|
||||
.B unblocked [tags] [attrs] [description]
|
||||
Shows all tasks that are not blocked by dependencies.
|
||||
|
||||
.TP
|
||||
.B next [tags] [attrs] [description]
|
||||
Shows all tasks with upcoming due dates matching the specified criteria.
|
||||
@@ -202,7 +319,15 @@ task del 1,4-10,19
|
||||
.TP
|
||||
.B +tag|-tag
|
||||
Tags are arbitrary words associated with a task. Use + to add a tag and - to
|
||||
remove a tag from a task. A task can have any quantity of tags
|
||||
remove a tag from a task. A task can have any quantity of tags.
|
||||
|
||||
Certain tags (called 'special tags'), can be used to affect the way tasks are
|
||||
treated. For example, is a task has the special tag 'nocolor', then it is
|
||||
exempt from all color rules. The supported special tags are:
|
||||
|
||||
+nocolor Disable color rules processing for this task
|
||||
+nonag Completion of this task suppresses all nag messages
|
||||
+nocal This task will not appear on the calendar
|
||||
|
||||
.TP
|
||||
.B project:<project-name>
|
||||
@@ -234,7 +359,10 @@ Specifies background color.
|
||||
|
||||
.TP
|
||||
.B limit:<number-of-rows>
|
||||
Specifies the desired number of rows a report should have.
|
||||
Specifies the desired number of tasks a report should show, if a positive
|
||||
integer is given. The value 'page' may also be used, and will limit the
|
||||
report output to as many lines of text as will fit on screen. This defaults
|
||||
to 25 lines, if ncurses is not installed or enabled.
|
||||
|
||||
.TP
|
||||
.B wait:<wait-date>
|
||||
@@ -256,13 +384,17 @@ Attribute modifiers improve filters. Supported modifiers are:
|
||||
.br
|
||||
.B isnt (synonym not)
|
||||
.br
|
||||
.B has (synonym contain)
|
||||
.B has (synonym contains)
|
||||
.br
|
||||
.B hasnt
|
||||
.br
|
||||
.B startswith (synonym left)
|
||||
.br
|
||||
.B endswith (synonym right)
|
||||
.br
|
||||
.B word
|
||||
.br
|
||||
.B noword
|
||||
.RE
|
||||
|
||||
For example:
|
||||
@@ -274,11 +406,11 @@ task list due.before:eom priority.not:L
|
||||
.SH SPECIFYING DATES AND FREQUENCIES
|
||||
|
||||
.SS DATES
|
||||
Task reads dates from the command line and displays dates in the
|
||||
Taskwarrior reads dates from the command line and displays dates in the
|
||||
reports. The expected and desired date format is determined by the
|
||||
configuration variable
|
||||
.I dateformat
|
||||
in the task configuration file.
|
||||
in the taskwarrior configuration file.
|
||||
|
||||
.RS
|
||||
.TP
|
||||
@@ -291,16 +423,40 @@ task ... due:today
|
||||
.br
|
||||
task ... due:yesterday
|
||||
.br
|
||||
task ... due:tomorrow
|
||||
task ... due:tomorrow
|
||||
|
||||
.TP
|
||||
Day number with ordinal
|
||||
task ... due:23rd
|
||||
.br
|
||||
task ... due:3wks
|
||||
.br
|
||||
task ... due:1day
|
||||
.br
|
||||
task ... due:9hrs
|
||||
|
||||
.TP
|
||||
End of week (Friday), month and year
|
||||
Start of (work) week (Monday), calendar week (Sunday or Monday), month and year
|
||||
.br
|
||||
task ... due:sow
|
||||
.br
|
||||
task ... due:soww
|
||||
.br
|
||||
task ... due:socw
|
||||
.br
|
||||
task ... due:som
|
||||
.br
|
||||
task ... due:soy
|
||||
|
||||
.TP
|
||||
End of (work) week (Friday), calendar week (Saturday or Sunday), month and year
|
||||
.br
|
||||
task ... due:eow
|
||||
.br
|
||||
task ... due:eoww
|
||||
.br
|
||||
task ... due:eocw
|
||||
.br
|
||||
task ... due:eom
|
||||
.br
|
||||
task ... due:eoy
|
||||
@@ -311,7 +467,7 @@ task ... due:fri
|
||||
.RE
|
||||
|
||||
.SS FREQUENCIES
|
||||
Recurrence periods. Task supports several ways of specifying the
|
||||
Recurrence periods. Taskwarrior supports several ways of specifying the
|
||||
.I frequency
|
||||
of recurring tasks.
|
||||
|
||||
@@ -351,7 +507,7 @@ Every two years.
|
||||
|
||||
|
||||
.SH COMMAND ABBREVIATION
|
||||
All task commands may be abbreviated as long as a unique prefix is used. E.g.
|
||||
All taskwarrior commands may be abbreviated as long as a unique prefix is used. E.g.
|
||||
|
||||
.RS
|
||||
$ task li
|
||||
@@ -383,7 +539,7 @@ $ task add "quoted ' quote"
|
||||
$ task add escaped \\' quote
|
||||
.RE
|
||||
|
||||
The argument \-\- (a double dash) tells task to treat all other args
|
||||
The argument \-\- (a double dash) tells taskwarrior to treat all other args
|
||||
as description:
|
||||
|
||||
.RS
|
||||
@@ -391,7 +547,7 @@ $ task add -- project:Home needs scheduling
|
||||
.RE
|
||||
|
||||
.SH CONFIGURATION FILE AND OVERRIDE OPTIONS
|
||||
Task stores its configuration in a file in the user's home directory:
|
||||
Taskwarrior stores its configuration in a file in the user's home directory:
|
||||
~/.taskrc . The default configuration file can be overridden with
|
||||
|
||||
.TP
|
||||
@@ -435,21 +591,26 @@ can be configured in the configuration file.
|
||||
~/.task/undo.data The file that contains the information to the "undo" command.
|
||||
|
||||
.SH "CREDITS & COPYRIGHTS"
|
||||
task was written by P. Beckingham <paul@beckingham.net>.
|
||||
Taskwarrior was written by P. Beckingham <paul@beckingham.net>.
|
||||
.br
|
||||
Copyright (C) 2006 \- 2009 P. Beckingham
|
||||
Copyright (C) 2006 \- 2010 P. Beckingham
|
||||
|
||||
This man page was originally written by P.C. Shyamshankar, and has been modified
|
||||
and supplemented by Federico Hernandez.
|
||||
|
||||
task is distributed under the GNU General Public License. See
|
||||
Thank also to T. Charles Yun.
|
||||
|
||||
Taskwarrior is distributed under the GNU General Public License. See
|
||||
http://www.gnu.org/licenses/gpl-2.0.txt for more information.
|
||||
|
||||
.SH SEE ALSO
|
||||
.BR taskrc(5),
|
||||
.BR task-tutorial(5)
|
||||
.BR task-tutorial(5),
|
||||
.BR task-faq(5),
|
||||
.BR task-color(5),
|
||||
.BR task-sync(5)
|
||||
|
||||
For more information regarding task, the following may be referenced:
|
||||
For more information regarding taskwarrior, the following may be referenced:
|
||||
|
||||
.TP
|
||||
The official site at
|
||||
@@ -457,7 +618,7 @@ The official site at
|
||||
|
||||
.TP
|
||||
The official code repository at
|
||||
<http://github.com/pbeckingham/task/>
|
||||
<git://tasktools.org/task.git/>
|
||||
|
||||
.TP
|
||||
You can contact the project by writing an email to
|
||||
@@ -465,5 +626,5 @@ You can contact the project by writing an email to
|
||||
|
||||
.SH REPORTING BUGS
|
||||
.TP
|
||||
Bugs in task may be reported to the issue-tracker at
|
||||
Bugs in taskwarrior may be reported to the issue-tracker at
|
||||
<http://taskwarrior.org>
|
||||
|
||||
724
doc/man/taskrc.5
724
doc/man/taskrc.5
@@ -1,4 +1,4 @@
|
||||
.TH taskrc 5 2009-11-18 "task 1.8.5" "User Manuals"
|
||||
.TH taskrc 5 2010-10-07 "task 1.9.2" "User Manuals"
|
||||
|
||||
.SH NAME
|
||||
taskrc \- Configuration file for the task(1) command
|
||||
@@ -9,7 +9,7 @@ taskrc \- Configuration file for the task(1) command
|
||||
.B task rc:<directory-path>/.taskrc
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B task
|
||||
.B taskwarrior
|
||||
obtains its configuration data from a file called
|
||||
.I .taskrc
|
||||
\&. This file is normally located in the user's home directory:
|
||||
@@ -27,7 +27,7 @@ $ task rc:<directory-path>/.taskrc
|
||||
.RE
|
||||
|
||||
Individual option can be overridden by using the
|
||||
.I rc.<name>:
|
||||
.I rc.<name>:
|
||||
attribute when running task:
|
||||
|
||||
.RS
|
||||
@@ -35,12 +35,14 @@ $ task rc.<name>:<value> ...
|
||||
.RE
|
||||
|
||||
If
|
||||
.B task
|
||||
is run without an existing configuration file it will ask if it should create a default, sample
|
||||
.B taskwarrior
|
||||
is run without an existing configuration file it will ask if it should create a
|
||||
default, sample
|
||||
.I .taskrc
|
||||
file in the user's home directory.
|
||||
|
||||
The task configuration file consists of a series of "assignments" in each line. The "assignments" have the syntax:
|
||||
The taskwarrior configuration file consists of a series of "assignments" in each
|
||||
line. The "assignments" have the syntax:
|
||||
|
||||
.RS
|
||||
<name-of-configuration-variable>=<value-to-be-set>
|
||||
@@ -57,11 +59,70 @@ is one of the variables described below
|
||||
is the value the variable is to be set to.
|
||||
.RE
|
||||
|
||||
and set a configuration variable to a certain value. The equal sign ("=") is used to separate the variable
|
||||
name from the value to be set.
|
||||
and set a configuration variable to a certain value. The equal sign ("=") is
|
||||
used to separate the variable name from the value to be set.
|
||||
|
||||
The hash mark, or pound sign ("#") is used as a "comment" character. It can be used to annotate the
|
||||
configuration file. All text after the character to the end of the line is ignored.
|
||||
The hash mark, or pound sign ("#") is used as a "comment" character. It can be
|
||||
used to annotate the configuration file. All text after the character to the end
|
||||
of the line is ignored.
|
||||
|
||||
Note that taskwarrior is flexible about the values used to represent Boolean
|
||||
items. You can use "on", "yes", "y", "1", "true", "t", "+", "enabled".
|
||||
Anything else means "off".
|
||||
|
||||
.SH EDITING
|
||||
You can edit your .taskrc file by hand if you wish, or you can use the 'config'
|
||||
command. To permanently set a value in your .taskrc file, use this command:
|
||||
|
||||
.RS
|
||||
$ task config nag "You have higher priority tasks!"
|
||||
.RE
|
||||
|
||||
To delete an entry, use this command:
|
||||
|
||||
.RS
|
||||
$ task config nag
|
||||
.RE
|
||||
|
||||
Taskwarrior will then use the default value. To explicitly set a value to
|
||||
blank, and therefore avoid using the default value, use this command:
|
||||
|
||||
.RS
|
||||
$ task config nag ""
|
||||
.RE
|
||||
|
||||
Taskwarrior will also display all your settings with this command:
|
||||
|
||||
.RS
|
||||
$ task config
|
||||
.RE
|
||||
|
||||
and in addition, will also perform a check of all the values in the file,
|
||||
warning you of anything it finds amiss.
|
||||
|
||||
.SH NESTING CONFIGURATION FILES
|
||||
The .taskrc can include other files containing configuration settings by using the
|
||||
.B include
|
||||
statement:
|
||||
|
||||
.RS
|
||||
include <path/to/the/configuration/file/to/be/included>
|
||||
.RE
|
||||
|
||||
By using include files you can divide your main configuration file into several
|
||||
ones containing just the relevant configuration data like colors, etc.
|
||||
|
||||
There are two excellent uses of includes in your .taskrc, shown here:
|
||||
|
||||
.RS
|
||||
include /usr/local/share/doc/task/rc/holidays-US.rc
|
||||
.br
|
||||
include /usr/local/share/doc/task/rc/dark-16.theme
|
||||
.RE
|
||||
|
||||
This includes two standard files that are distributed with taskwarrior, which
|
||||
define a set of US holidays, and set up a 16-color theme to use, to color the
|
||||
reports and calendar.
|
||||
|
||||
.SH CONFIGURATION VARIABLES
|
||||
Valid variable names and their default values are:
|
||||
@@ -70,20 +131,25 @@ Valid variable names and their default values are:
|
||||
|
||||
.TP
|
||||
.B data.location=$HOME/.task
|
||||
This is a path to the directory containing all the task files. By default, it is set up to be ~/.task,
|
||||
for example: /home/paul/.task
|
||||
This is a path to the directory containing all the taskwarrior files. By
|
||||
default, it is set up to be ~/.task, for example: /home/paul/.task
|
||||
|
||||
Note that you can use the
|
||||
.B ~
|
||||
shell meta character, which will be properly expanded.
|
||||
|
||||
.TP
|
||||
.B locking=on
|
||||
Determines whether task uses file locking when accessing the pending.data and completed.data files.
|
||||
Default to "on". Solaris users who store the task data files on an NFS mount may need to set locking
|
||||
to "off". Note that setting this value to "off" is dangerous. It means that another program may write
|
||||
to the task.pending file when task is attempting to do the same.
|
||||
Determines whether to use file locking when accessing the pending.data and
|
||||
completed.data files. Defaults to "on". Solaris users who store the data
|
||||
files on an NFS mount may need to set locking to "off". Note that there is
|
||||
danger in setting this value to "off" - another program (or another instance of
|
||||
task) may write to the task.pending file at the same time.
|
||||
|
||||
.SS TERMINAL
|
||||
.TP
|
||||
.B curses=on
|
||||
Determines whether task uses ncurses to establish the size of the window you are
|
||||
Determines whether to use ncurses to establish the size of the window you are
|
||||
using, for text wrapping.
|
||||
|
||||
.TP
|
||||
@@ -94,216 +160,589 @@ The width of tables used when ncurses support is not available. Defaults to 80.
|
||||
.B editor=vi
|
||||
Specifies which text editor you wish to use for when the
|
||||
.B task edit <ID>
|
||||
command is used. Task will first look for this configuration variable. If found, it is used.
|
||||
Otherwise task will look for the $VISUAL or $EDITOR environment variables, before it defaults
|
||||
to using "vi".
|
||||
command is used. Taskwarrior will first look for this configuration variable. If
|
||||
found, it is used. Otherwise it will look for the $VISUAL or $EDITOR
|
||||
environment variables, before it defaults to using "vi".
|
||||
|
||||
.SS MISCELLANEOUS
|
||||
|
||||
.TP
|
||||
.B locale=en-US
|
||||
The locale is a combination of ISO 639-1 language code and ISO 3166 country
|
||||
code. If not specified, task will assume en-US. If specified, task will locate
|
||||
the correct file of localized strings and proceed. It is an error to specify a
|
||||
locale for which there is no strings file.
|
||||
code. If not specified, will assume en-US. If specified, taskwarrior will
|
||||
locate the correct file of localized strings and proceed. It is an error to
|
||||
specify a locale for which there is no strings file.
|
||||
|
||||
.TP
|
||||
.B verbose=yes
|
||||
Controls some of the verbosity of taskwarrior.
|
||||
|
||||
.TP
|
||||
.B confirmation=yes
|
||||
May be "yes" or "no", and determines whether task will ask for confirmation before deleting a task or doing bulk changes.
|
||||
May be "yes" or "no", and determines whether taskwarrior will ask for
|
||||
confirmation before deleting a task or doing bulk changes. The default value
|
||||
is "yes".
|
||||
|
||||
.TP
|
||||
.B echo.command=yes
|
||||
May be "yes" or "no", and causes task to display the ID and description of any task when you run the start, stop, do, undo or delete commands. The default value is "yes".
|
||||
May be "yes" or "no", and causes the display of the ID and description of any
|
||||
task when you run the start, stop, do, undo or delete commands. The default
|
||||
value is "yes".
|
||||
|
||||
.TP
|
||||
.B annotations=full
|
||||
.TP
|
||||
.B report.X.annotations=full
|
||||
Controls the display of annotations in reports. Defaults to full - all
|
||||
annotations are displayed. Set to "sparse" only the last (newest) annotation
|
||||
is displayed and if there are more than one present for a task a "+" sign is
|
||||
added to the description. Set to "none" the output of annotations is disabled
|
||||
and a "+" sign will be added if there are any annotations present. The default
|
||||
value is "full".
|
||||
|
||||
.TP
|
||||
.B next=2
|
||||
Is a number, defaulting to 2, which is the number of tasks for each project that are shown in the
|
||||
Is a number, defaulting to 2, which is the number of tasks for each project that
|
||||
are shown in the
|
||||
.B task next
|
||||
command.
|
||||
|
||||
.TP
|
||||
.B bulk=2
|
||||
Is a number, defaulting to 2. When more than this number of tasks are modified in a single command, confirmation will be required, unless the
|
||||
Is a number, defaulting to 2. When more than this number of tasks are modified
|
||||
in a single command, confirmation will be required, unless the
|
||||
.B confirmation
|
||||
variable is "no".
|
||||
|
||||
This is useful for preventing large-scale unintended changes.
|
||||
|
||||
.TP
|
||||
.B nag=You have higher priority tasks.
|
||||
This may be a string of text, or blank. It is used as a prompt when a task is completed
|
||||
that is not considered high priority. The "task next" command lists important tasks, and
|
||||
completing one of those does not generate this nagging. Default value is: You have higher
|
||||
priority tasks.
|
||||
This may be a string of text, or blank. It is used as a prompt when a task is
|
||||
started or completed that is not considered high priority. The "task next"
|
||||
command lists important tasks, and completing one of those does not generate
|
||||
this nagging. Default value is: You have higher priority tasks. It is a gentle
|
||||
reminder that you are contradicting your own priority settings.
|
||||
|
||||
.TP
|
||||
.B complete.all.projects=yes
|
||||
May be yes or no, and determines whether the tab completion scripts consider all the
|
||||
project names you have used, or just the ones used in active tasks.
|
||||
May be yes or no, and determines whether the tab completion scripts consider all
|
||||
the project names you have used, or just the ones used in active tasks. The
|
||||
default value is "no".
|
||||
|
||||
.TP
|
||||
.B list.all.projects=yes
|
||||
May be yes or no, and determines whether 'projects' command lists all the project
|
||||
names you have used, or just the ones used in active tasks. The default value is
|
||||
"no".
|
||||
|
||||
.TP
|
||||
.B complete.all.tags=yes
|
||||
May be yes or no, and determines whether the tab completion scripts consider all the
|
||||
tag names you have used, or just the ones used in active tasks.
|
||||
May be yes or no, and determines whether the tab completion scripts consider all
|
||||
the tag names you have used, or just the ones used in active tasks. The default
|
||||
value is "no".
|
||||
|
||||
.TP
|
||||
.B list.all.tags=yes
|
||||
May be yes or no, and determines whether the 'tags' command lists all the tag
|
||||
names you have used, or just the ones used in active tasks. The default value is
|
||||
"no".
|
||||
|
||||
.TP
|
||||
.B search.case.sensitive=yes
|
||||
May be yes or no, and determines whether keyword lookup and substitutions on the
|
||||
description and annotations are done in a case sensitive way. Defaults to yes.
|
||||
|
||||
.TP
|
||||
.B _forcecolor=no
|
||||
Taskwarrior shuts off color automatically when the output is not sent directly
|
||||
to a TTY. For example, this command:
|
||||
|
||||
.RS
|
||||
.RS
|
||||
$ task list > file
|
||||
.RE
|
||||
|
||||
will not use any color. To override this, use:
|
||||
|
||||
.RS
|
||||
$ task rc._forcecolor=yes list > file
|
||||
.RE
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B blanklines=yes
|
||||
Turning this value off causes taskwarrior to generate a more vertically compact
|
||||
output.
|
||||
|
||||
.TP
|
||||
.B shell.prompt=task>
|
||||
The task shell command uses this value as a prompt. You can change it to any
|
||||
string you like.
|
||||
|
||||
.TP
|
||||
.B active.indicator=*
|
||||
The character or string to show in the active column. Defaults to *.
|
||||
|
||||
.TP
|
||||
.B tag.indicator=+
|
||||
The character or string to show in the tag_indicator column. Defaults to +.
|
||||
|
||||
.TP
|
||||
.B recurrence.indicator=R
|
||||
The character or string to show in the recurrence_indicator column. Defaults to R.
|
||||
|
||||
.TP
|
||||
.B recurrence.limit=1
|
||||
The number of future recurring tasks to show. Defaults to 1. For example, if a
|
||||
weekly recurring task is added with a due date of tomorrow, and recurrence.limit
|
||||
is set to 2, then a report will list 2 pending recurring tasks, one for tomorrow,
|
||||
and one for a week from tomorrow.
|
||||
|
||||
.TP
|
||||
.B undo.style=side
|
||||
When the 'undo' command is run, taskwarrior presents a before and after
|
||||
comparison of the data. This can be in either the 'side' style, which compares
|
||||
values side-by-side in a table, or 'diff' style, which uses a format similar to
|
||||
the 'diff' command.
|
||||
|
||||
.TP
|
||||
.B debug=off
|
||||
Taskwarrior has a debug mode that causes diagnostic output to be displayed.
|
||||
Typically this is not something anyone would want, but when reporting a bug,
|
||||
debug output can be useful. It can also help explain how the command line is
|
||||
being parsed, but the information is displayed in a developer-friendly, not a
|
||||
user-friendly way.
|
||||
|
||||
.TP
|
||||
.B alias.rm=delete
|
||||
Taskwarrior supports command aliases. This alias provides an alternate name
|
||||
(rm) for the delete command. You can use aliases to provide alternate names for
|
||||
any of the commands. Several commands you may use are actually aliases -
|
||||
the 'history' report, for example, or 'export'.
|
||||
|
||||
.SS DATES
|
||||
|
||||
.TP
|
||||
.B dateformat=m/d/Y
|
||||
This is a string of characters that define how task formats dates. The default value is: m/d/Y.
|
||||
The string should contain the characters
|
||||
.TP
|
||||
.B dateformat.report=m/d/Y
|
||||
.TP
|
||||
.B dateformat.holiday=YMD
|
||||
.TP
|
||||
.B dateformat.annotation=m/d/Y
|
||||
.TP
|
||||
.B report.X.dateformat=m/d/Y
|
||||
This is a string of characters that define how taskwarrior formats date values.
|
||||
The precedence order for the configuration variable is report.X.dateformat then
|
||||
dateformat.report then dateformat. While report.X.dateformat only formats the
|
||||
due date in reports, dateformat.report formats the due date both in reports
|
||||
and "task info". If both of these are not set then dateformat will be applied
|
||||
to the due date. Entered dates as well as all other displayed dates in reports
|
||||
are formatted according to dateformat.
|
||||
|
||||
The default value is: m/d/Y. The string should contain the characters:
|
||||
|
||||
.RS
|
||||
m minimal-digit month, for example 1 or 12
|
||||
.RS
|
||||
m minimal-digit month, for example 1 or 12
|
||||
.br
|
||||
d minimal-digit day, for example 1 or 30
|
||||
d minimal-digit day, for example 1 or 30
|
||||
.br
|
||||
y two-digit year, for example 09
|
||||
y two-digit year, for example 09
|
||||
.br
|
||||
D two-digit day, for example 01 or 30
|
||||
D two-digit day, for example 01 or 30
|
||||
.br
|
||||
M two-digit month, for example 01 or 12
|
||||
M two-digit month, for example 01 or 12
|
||||
.br
|
||||
Y four-digit year, for example 2009
|
||||
Y four-digit year, for example 2009
|
||||
.br
|
||||
a short name of weekday, for example Mon or Wed
|
||||
.br
|
||||
A long name of weekday, for example Monday or Wednesday
|
||||
.br
|
||||
b short name of month, for example Jan or Aug
|
||||
.br
|
||||
B long name of month, for example January or August
|
||||
.br
|
||||
V weeknumber, for example 03 or 37
|
||||
.br
|
||||
H two-digit hour, for example 03 or 11
|
||||
.br
|
||||
N two-digit minutes, for example 05 or 42
|
||||
.br
|
||||
S two-digit seconds, for example 07 or 47
|
||||
.RE
|
||||
.RE
|
||||
|
||||
The string may also contain other characters to act as spacers, or formatting. Examples for other
|
||||
variable values:
|
||||
.RS
|
||||
The string may also contain other characters to act as spacers, or formatting.
|
||||
Examples for other values of dateformat:
|
||||
.RE
|
||||
|
||||
.RS
|
||||
.RS
|
||||
.br
|
||||
d/m/Y would output 24/7/2009
|
||||
d/m/Y would use for input and output 24/7/2009
|
||||
.br
|
||||
YMD would output 20090724
|
||||
yMD would use for input and output 090724
|
||||
.br
|
||||
m-d-y would output 07-24-09
|
||||
M-D-Y would use for input and output 07-24-2009
|
||||
.RE
|
||||
.RE
|
||||
|
||||
.RS
|
||||
Examples for other values of dateformat.report:
|
||||
.RE
|
||||
|
||||
.RS
|
||||
.RS
|
||||
.br
|
||||
a D b Y (V) would do an output as "Fri 24 Jul 2009 (30)"
|
||||
.br
|
||||
A, B D, Y would do an output as "Friday, July 24, 2009"
|
||||
.br
|
||||
vV a Y-M-D would do an output as "v30 Fri 2009-07-24"
|
||||
.RE
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B weekstart=Sunday
|
||||
Determines the day a week starts. Valid values are Sunday or Monday only.
|
||||
Determines the day a week starts. Valid values are Sunday or Monday only. The
|
||||
default value is "Sunday".
|
||||
|
||||
.TP
|
||||
.B displayweeknumber=yes
|
||||
Determines if week numbers are displayed when using the "task calendar" command.
|
||||
The week number is dependent on the day a week starts.
|
||||
The week number is dependent on the day a week starts. The default value is
|
||||
"yes".
|
||||
|
||||
.TP
|
||||
.B due=7
|
||||
This is the number of days into the future that define when a task is considered due,
|
||||
and is colored accordingly. Defaults to 7.
|
||||
This is the number of days into the future that define when a task is
|
||||
considered due, and is colored accordingly. The default value is 7.
|
||||
|
||||
.TP
|
||||
.B monthsperline=2
|
||||
Determines how many months the "task calendar" command renders across the screen.
|
||||
Defaults to however many will fit. If more months that will fit are specified,
|
||||
task will only show as many that will fit.
|
||||
.B calendar.details=sparse
|
||||
If set to full running "task calendar" will display the details of tasks with
|
||||
due dates that fall into the calendar period. The corresponding days will be
|
||||
color-coded in the calendar. If set to sparse only the corresponding days will
|
||||
be color coded and no details will be displayed. The displaying of due dates
|
||||
with details is turned off by setting the variable to none. The default value
|
||||
is "sparse".
|
||||
|
||||
.TP
|
||||
.B calendar.details.report=list
|
||||
The report to run when displaying the details of tasks with due date when
|
||||
running the "task calendar" command. The default value is "list".
|
||||
|
||||
.TP
|
||||
.B calendar.holidays=full
|
||||
If set to full running "task calendar" will display holidays in the calendar by
|
||||
color-coding the corresponding days. A detailed list with the dates and names
|
||||
of the holidays is also shown. If set to sparse only the days are color-coded
|
||||
and no details on the holidays will be displayed. The displaying of holidays is
|
||||
turned off by setting the variable to none. The default value is "none".
|
||||
|
||||
.SS Journal entries
|
||||
|
||||
.TP
|
||||
.B journal.time=no
|
||||
May be yes or no, and determines whether the 'start' and 'stop' commands should
|
||||
record an annotation when being executed. The default value is "no". The text of
|
||||
the corresponding annotations is controlled by
|
||||
|
||||
.TP journal.time.start.annotation=Started task
|
||||
The text of the annotation that is recorded when executing the start command and
|
||||
having set journal.time.
|
||||
|
||||
.TP journal.time.stop.annotation=Stopped task
|
||||
The text of the annotation that is recorded when executing the stop command and
|
||||
having set journal.time.
|
||||
|
||||
.SS Holidays
|
||||
Holidays are entered either directly in the .taskrc file or via an include file
|
||||
that is specified in .taskrc. For each holiday the name and the date is
|
||||
required to be given:
|
||||
|
||||
.RS
|
||||
.RS
|
||||
.br
|
||||
holiday.towel.name=Day of the towel
|
||||
.br
|
||||
holiday.towel.date=20100525
|
||||
.br
|
||||
holiday.sysadmin.name=System Administrator Appreciation Day
|
||||
.br
|
||||
holiday.sysadmin.date=20100730
|
||||
.RE
|
||||
.RE
|
||||
|
||||
.RS
|
||||
Dates are to be entered according to the setting in the dateformat.holiday
|
||||
variable.
|
||||
.RE
|
||||
|
||||
.RS
|
||||
The following holidays are computed automatically: Good Friday (goodfriday),
|
||||
Easter (easter), Easter monday (eastermonday), Ascension (ascension), Pentecost
|
||||
(pentecost). The date for these holidays is the given keyword:
|
||||
.RE
|
||||
|
||||
.RS
|
||||
.RS
|
||||
.br
|
||||
holiday.eastersunday.name=Easter
|
||||
.br
|
||||
holiday.eastersunday.date=easter
|
||||
.RE
|
||||
.RE
|
||||
|
||||
Note that the taskwarrior distribution contains example holiday files that can
|
||||
be included like this:
|
||||
|
||||
.RS
|
||||
.RS
|
||||
.br
|
||||
include /usr/local/share/doc/task/rc/holidays-US.rc
|
||||
.RE
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B monthsperline=3
|
||||
Determines how many months the "task calendar" command renders across the
|
||||
screen. Defaults to however many will fit. If more months than will fit are
|
||||
specified, taskwarrior will only show as many that will fit.
|
||||
|
||||
.SS DEPENDENCIES
|
||||
|
||||
.TP
|
||||
.B dependency.reminder=on
|
||||
Determines whether dependency chain violations generate reminders.
|
||||
|
||||
.TP
|
||||
.B dependency.confirm=yes
|
||||
Determines whether dependency chain repair requires confirmation.
|
||||
|
||||
.SS COLOR CONTROLS
|
||||
|
||||
.TP
|
||||
.B color=on
|
||||
May be "on" or "off". Determines whether task uses color. When "off", task will
|
||||
use dashes (-----) to underline column headings.
|
||||
May be "on" or "off". Determines whether taskwarrior uses color. When "off",
|
||||
will use dashes (-----) to underline column headings.
|
||||
|
||||
.TP
|
||||
.B fontunderline=on
|
||||
Determines if font underlines or ASCII dashes should be used to underline
|
||||
headers.
|
||||
headers, even when color is enabled.
|
||||
.RE
|
||||
|
||||
Task has a number of coloration rules. They correspond to a particular attribute
|
||||
of a task, such as it being due, or being active, and specifies the automatic
|
||||
coloring of that task. A list of valid color, depending on your terminal, can be
|
||||
obtained by running the command
|
||||
Taskwarrior has a number of coloration rules. They correspond to a particular
|
||||
attribute of a task, such as it being due, or being active, and specifies the
|
||||
automatic coloring of that task. A list of valid colors, depending on your
|
||||
terminal, can be obtained by running the command:
|
||||
|
||||
.RS
|
||||
.B task color
|
||||
.RE
|
||||
|
||||
.RS
|
||||
The coloration rules and their defaults are:
|
||||
Note that no default values are listed here - the defaults now correspond to the
|
||||
dark-256.theme (Linux) and dark-16.theme (other) theme values.
|
||||
The coloration rules are as follows:
|
||||
.RE
|
||||
|
||||
.RS
|
||||
.RS
|
||||
.B color.overdue=bold_red
|
||||
The color for overdue tasks.
|
||||
.B color.due.today
|
||||
Task is due today
|
||||
.br
|
||||
.B color.due=bold_yellow
|
||||
The color of due tasks.
|
||||
.B color.active
|
||||
Task is started, therefore active.
|
||||
.br
|
||||
.B color.pri.H=bold
|
||||
The color of priority:H tasks.
|
||||
.B color.blocked
|
||||
Task is blocked by a dependency.
|
||||
.br
|
||||
.B color.pri.M=on_yellow
|
||||
The color of priority:M tasks.
|
||||
.B color.overdue
|
||||
Task is overdue (due some time prior to now).
|
||||
.br
|
||||
.B color.pri.L=on_green
|
||||
The color of priority:L tasks.
|
||||
.B color.due
|
||||
Task is coming due.
|
||||
.br
|
||||
.B color.pri.none=white on_blue
|
||||
The color of priority: tasks.
|
||||
.B color.project.none
|
||||
Task does not have an assigned project.
|
||||
.br
|
||||
.B color.active=bold_cyan
|
||||
The color of active tasks.
|
||||
.B color.tag.none
|
||||
Task has no tags.
|
||||
.br
|
||||
.B color.tagged=yellow
|
||||
The color of tagged tasks.
|
||||
.B color.tagged
|
||||
Task has at least one tag.
|
||||
.br
|
||||
.B color.recurring=on_red
|
||||
The color for recurring tasks.
|
||||
.B color.recurring
|
||||
Task is recurring.
|
||||
.br
|
||||
.B color.pri.H
|
||||
Task has priority H.
|
||||
.br
|
||||
.B color.pri.M
|
||||
Task has priority M.
|
||||
.br
|
||||
.B color.pri.L
|
||||
Task has priority L.
|
||||
.br
|
||||
.B color.pri.none
|
||||
Task has no priority.
|
||||
.RE
|
||||
.RE
|
||||
|
||||
.RS
|
||||
The value for the coloration rules may be one optional foreground color and one optional
|
||||
color. For example, the value may be
|
||||
.RE
|
||||
|
||||
To disable a coloration rule for which there is a default, set the value to
|
||||
nothing, for example:
|
||||
.RS
|
||||
.RS
|
||||
bold_red on_bright_yellow
|
||||
.B color.tagged=
|
||||
.RE
|
||||
.RE
|
||||
|
||||
.RS
|
||||
Certain attributes like tags, projects and keywords can also have their own coloration rules.
|
||||
See the task-color(5) man pages for color details.
|
||||
.RE
|
||||
|
||||
Certain attributes like tags, projects and keywords can have their own
|
||||
coloration rules.
|
||||
.RE
|
||||
|
||||
.RS
|
||||
.TP
|
||||
.B color.tag.X=yellow
|
||||
Colors any task that has the tag X.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.project.X=on_green
|
||||
.B color.project.X=on green
|
||||
Colors any task assigned to project X.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.keyword.X=on_blue
|
||||
Colors any task where the description contains X.
|
||||
.B color.keyword.X=on blue
|
||||
Colors any task where the description or any annotation contains X.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.header=green
|
||||
Colors any of the messages printed prior to the report output.
|
||||
|
||||
.TP
|
||||
.B color.message=green
|
||||
Colors any of the messages printed after the report output.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.footnote=green
|
||||
Colors any of the messages printed last.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.summary.bar=on green
|
||||
Colors the summary progress bar. Should consist of a background color.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.summary.background=on black
|
||||
Colors the summary progress bar. Should consist of a background color.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.calendar.today=black on cyan
|
||||
Color of today in calendar.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.calendar.due=black on green
|
||||
Color of days with due tasks in calendar.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.calendar.due.today=black on magenta
|
||||
Color of today with due tasks in calendar.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.calendar.overdue=black on red
|
||||
Color of days with overdue tasks in calendar.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.calendar.weekend=bright white on black
|
||||
Color of weekend days in calendar.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.calendar.holiday=black on bright yellow
|
||||
Color of holidays in calendar.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.calendar.weeknumber=black on white
|
||||
Color of weeknumbers in calendar.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.alternate=on rgb253
|
||||
Color of alternate tasks.
|
||||
This is to apply a specific color to every other task in a report,
|
||||
which can make it easier to visually separate tasks. This is especially
|
||||
useful when tasks are displayed over multiple lines due to long descriptions
|
||||
or annotations.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.history.add=on red
|
||||
.RE
|
||||
.br
|
||||
.B color.history.done=on green
|
||||
.RE
|
||||
.br
|
||||
.B color.history.delete=on yellow
|
||||
.RS
|
||||
Colors the bars on the ghistory report graphs. Defaults to red, green and
|
||||
yellow bars.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.undo.before=red
|
||||
.RE
|
||||
.br
|
||||
.B color.undo.after=green
|
||||
.RS
|
||||
Colors used by the undo command, to indicate the values both before and after
|
||||
a change that is to be reverted.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.sync.added=green
|
||||
.RE
|
||||
.br
|
||||
.B color.sync.changed=yellow
|
||||
.RE
|
||||
.br
|
||||
.B color.sync.rejected=red
|
||||
.RS
|
||||
Colors the output of the merge command.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B rule.precedence.color=overdue,tag,project,keyword,active,...
|
||||
.RS
|
||||
This setting specifies the precedence of the color rules, from highest to
|
||||
lowest. Note that the prefix 'color.' is omitted (for brevity), and that any
|
||||
wildcard values (color.tag.XXX) is shortened to 'tag', which places all specific
|
||||
tag rules at the same precedence, again for brevity.
|
||||
.RE
|
||||
|
||||
.SS SHADOW FILE
|
||||
|
||||
.TP
|
||||
.B
|
||||
shadow.file=$HOME/.task/shadow.txt
|
||||
If specified, designates a file path that will be automatically written to by task,
|
||||
whenever the task database changes. In other words, it is automatically kept up to date.
|
||||
The shadow.command configuration variable is used to determine which report is written
|
||||
to the shadow file. There is no color used in the shadow file. This feature can be useful
|
||||
in maintaining a current file for use by programs like GeekTool, Conky or Samurize.
|
||||
If specified, designates a file path that will be automatically written to by
|
||||
taskwarrior, whenever the task database changes. In other words, it is
|
||||
automatically kept up to date. The shadow.command configuration variable is
|
||||
used to determine which report is written to the shadow file. There is no color
|
||||
used in the shadow file. This feature can be useful in maintaining a current
|
||||
file for use by programs like GeekTool, Conky or Samurize.
|
||||
|
||||
.TP
|
||||
.B
|
||||
@@ -317,8 +756,8 @@ configuration variable. The format is identical to that of
|
||||
.TP
|
||||
.B
|
||||
shadow.notify=on
|
||||
When this value is set to "on", task will display a message whenever the shadow
|
||||
file is updated by some task command.
|
||||
When this value is set to "on", taskwarrior will display a message whenever the
|
||||
shadow file is updated by some task command.
|
||||
|
||||
.SS DEFAULTS
|
||||
|
||||
@@ -327,20 +766,20 @@ file is updated by some task command.
|
||||
default.project=foo
|
||||
Provides a default project name for the
|
||||
.I task add
|
||||
command.
|
||||
command, if you don't specify one. The default is blank.
|
||||
|
||||
.TP
|
||||
.B
|
||||
default.priority=M
|
||||
Provides a default priority for the
|
||||
.I task add
|
||||
command.
|
||||
command, if you don't specify one. The default is blank.
|
||||
|
||||
.TP
|
||||
.B
|
||||
default.command=list
|
||||
Provides a default command that is run every time task is invoked with no arguments.
|
||||
For example, if set to:
|
||||
Provides a default command that is run every time taskwarrior is invoked with no
|
||||
arguments. For example, if set to:
|
||||
|
||||
.RS
|
||||
.RS
|
||||
@@ -349,8 +788,8 @@ default.command=list project:foo
|
||||
.RE
|
||||
|
||||
.RS
|
||||
then task will run the "list project:foo" command if no command is specified. This means that
|
||||
by merely typing
|
||||
then taskwarrior will run the "list project:foo" command if no command is
|
||||
specified. This means that by merely typing
|
||||
.RE
|
||||
|
||||
.RS
|
||||
@@ -384,25 +823,44 @@ The description for report X when running the "task help" command.
|
||||
.TP
|
||||
.B report.X.columns
|
||||
The columns that will be used when generating the report X. Valid columns are:
|
||||
id, uuid, project, priority, entry, start, due, recur, recur_indicator, age,
|
||||
age_compact, active, tags, tag_indicator, description, description_only.
|
||||
id, uuid, project, priority, priority_long, entry, start, end, due, countdown,
|
||||
countdown_compact, age, age_compact, active, tags, depends, description_only,
|
||||
description, recur, recurrence_indicator, tag_indicator and wait.
|
||||
The IDs are separated by commas.
|
||||
|
||||
.TP
|
||||
.B report.X.labels
|
||||
The labels for each column that will be used when generating report X. The labels
|
||||
are a comma separated list.
|
||||
The labels for each column that will be used when generating report X. The
|
||||
labels are a comma separated list.
|
||||
|
||||
.TP
|
||||
.B report.X.sort
|
||||
The sort order of the tasks in the generated report X. The sort order is specified
|
||||
by using the column ids post-fixed by a "+" for ascending sort order or a "-" for
|
||||
descending sort order. The sort IDs are separated by commas
|
||||
The sort order of the tasks in the generated report X. The sort order is
|
||||
specified by using the column ids post-fixed by a "+" for ascending sort order
|
||||
or a "-" for descending sort order. The sort IDs are separated by commas.
|
||||
For example:
|
||||
|
||||
report.list.sort=due+,priority-,active-,project+
|
||||
|
||||
.TP
|
||||
.B report.X.filter
|
||||
This adds a filter to the report X so that only tasks matching the filter criteria
|
||||
are displayed in the generated report.
|
||||
This adds a filter to the report X so that only tasks matching the filter
|
||||
criteria are displayed in the generated report.
|
||||
|
||||
.TP
|
||||
.B report.X.dateformat
|
||||
This adds a dateformat to the report X that will be used by the "due date"
|
||||
column. If it is not set then dateformat.report and dateformat will be used in
|
||||
this order. See the
|
||||
.B DATES
|
||||
section for details on the sequence placeholders.
|
||||
|
||||
.TP
|
||||
.B report.X.annotations
|
||||
This adds the possibility to control the output of annotations for a task in a
|
||||
report. See the
|
||||
.B annotations
|
||||
variable for details on the possible values.
|
||||
|
||||
.TP
|
||||
.B report.X.limit
|
||||
@@ -410,7 +868,8 @@ An optional value to a report limiting the number of displayed tasks in the
|
||||
generated report.
|
||||
|
||||
.TP
|
||||
Task comes with a number of predefined reports in its default configuration file. These reports are:
|
||||
Taskwarrior comes with a number of predefined reports in its default
|
||||
configuration file. These reports are:
|
||||
|
||||
.TP
|
||||
.B long
|
||||
@@ -422,6 +881,10 @@ Lists all tasks matching the specified criteria.
|
||||
|
||||
.TP
|
||||
.B ls
|
||||
Short listing of all tasks matching the specified criteria.
|
||||
|
||||
.TP
|
||||
.B minimal
|
||||
Minimal listing of all tasks matching the specified criteria.
|
||||
|
||||
.TP
|
||||
@@ -461,20 +924,23 @@ Lists all tasks matching the specified criteria.
|
||||
Lists all tasks with upcoming due dates matching the specified criteria.
|
||||
|
||||
.SH "CREDITS & COPYRIGHTS"
|
||||
task was written by P. Beckingham <paul@beckingham.net>.
|
||||
Taskwarrior was written by P. Beckingham <paul@beckingham.net>.
|
||||
.br
|
||||
Copyright (C) 2006 \- 2009 P. Beckingham
|
||||
Copyright (C) 2006 \- 2010 P. Beckingham
|
||||
|
||||
This man page was originally written by Federico Hernandez.
|
||||
|
||||
task is distributed under the GNU General Public License. See
|
||||
Taskwarrior is distributed under the GNU General Public License. See
|
||||
http://www.gnu.org/licenses/gpl-2.0.txt for more information.
|
||||
|
||||
.SH SEE ALSO
|
||||
.BR task(1),
|
||||
.BR task-tutorial(5)
|
||||
.BR task-tutorial(5),
|
||||
.BR task-faq(5),
|
||||
.BR task-color(5),
|
||||
.BR task-sync(5)
|
||||
|
||||
For more information regarding task, the following may be referenced:
|
||||
For more information regarding taskwarrior, the following may be referenced:
|
||||
|
||||
.TP
|
||||
The official site at
|
||||
@@ -482,7 +948,7 @@ The official site at
|
||||
|
||||
.TP
|
||||
The official code repository at
|
||||
<http://github.com/pbeckingham/task/>
|
||||
<git://tasktools.org/task.git/>
|
||||
|
||||
.TP
|
||||
You can contact the project by writing an email to
|
||||
@@ -490,5 +956,5 @@ You can contact the project by writing an email to
|
||||
|
||||
.SH REPORTING BUGS
|
||||
.TP
|
||||
Bugs in task may be reported to the issue-tracker at
|
||||
Bugs in taskwarrior may be reported to the issue-tracker at
|
||||
<http://taskwarrior.org>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
# This is a full BNF grammar for the task command line. It is intended that a
|
||||
# future release of task will incorporate a complete lexer/parser implementing
|
||||
# this grammar, which will allow for more sophisticated command lines, for
|
||||
# example:
|
||||
# This is a full BNF grammar for the taskwarrior command line. It is intended
|
||||
# that a future release of taskwarrior will incorporate a complete lexer/parser
|
||||
# implementing this grammar, which will allow for more sophisticated command
|
||||
# lines, for example:
|
||||
#
|
||||
# task delete 1 2 4-7
|
||||
# task add pri:H pro:X -- pro pri 1 ///
|
||||
|
||||
533
doc/misc/run.193
Executable file
533
doc/misc/run.193
Executable file
@@ -0,0 +1,533 @@
|
||||
#! /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 Shell
|
||||
echo Shell --------------------------------------------------------------
|
||||
echo $ task shell
|
||||
#task shell
|
||||
echo '> projects'
|
||||
#> projects
|
||||
echo '> tags'
|
||||
#> tags
|
||||
echo '> list'
|
||||
#> list
|
||||
echo '> quit'
|
||||
#> quit
|
||||
|
||||
# 18 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
|
||||
|
||||
# 19 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
|
||||
|
||||
# 20 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
|
||||
|
||||
# 21 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
|
||||
|
||||
# 22 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
|
||||
|
||||
# 23 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
|
||||
|
||||
# 24 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
|
||||
|
||||
# 25 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 <<EOF >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 <<EOF >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
|
||||
|
||||
# 26 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
|
||||
|
||||
# 27 Wrap up
|
||||
echo Wrap up --------------------------------------------------------------
|
||||
echo $ task version
|
||||
task version
|
||||
|
||||
exit
|
||||
|
||||
71
doc/misc/run.sample.annotate
Executable file
71
doc/misc/run.sample.annotate
Executable file
@@ -0,0 +1,71 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'defaultwidth=120' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
|
||||
echo 'color.alternate=' >> x
|
||||
|
||||
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
|
||||
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
|
||||
echo 'report.list.sort=due+,priority_long-,project+' >> x
|
||||
|
||||
# Import tasks with old timestamps
|
||||
cat <<EOF >file.yaml
|
||||
%YAML 1.1
|
||||
---
|
||||
task:
|
||||
description: Try out the color themes
|
||||
entry: 1281914800
|
||||
start: 1282044800
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Visit http://taskwarrior.org
|
||||
entry: 1281089630
|
||||
tags: www
|
||||
priority: H
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Review task list
|
||||
entry: 1281289630
|
||||
due: 1282844800
|
||||
recur: weekly
|
||||
project: gtd
|
||||
status: pending
|
||||
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Try out latest FireFox beta
|
||||
entry: 1281289630
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
...
|
||||
EOF
|
||||
|
||||
printf "y\n" | task rc:x import file.yaml
|
||||
|
||||
# Now the visible part.
|
||||
echo
|
||||
echo '$ task calendar sep 2010'
|
||||
task rc:x calendar sep 2010
|
||||
|
||||
echo
|
||||
echo '$ task calendar'
|
||||
task rc:x calendar
|
||||
|
||||
echo
|
||||
echo '$ task overdue'
|
||||
task rc:x 2 done
|
||||
|
||||
exit
|
||||
|
||||
71
doc/misc/run.sample.attmod
Executable file
71
doc/misc/run.sample.attmod
Executable file
@@ -0,0 +1,71 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'defaultwidth=120' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
|
||||
echo 'color.alternate=' >> x
|
||||
|
||||
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
|
||||
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
|
||||
echo 'report.list.sort=due+,priority_long-,project+' >> x
|
||||
|
||||
# Import tasks with old timestamps
|
||||
cat <<EOF >file.yaml
|
||||
%YAML 1.1
|
||||
---
|
||||
task:
|
||||
description: Try out the color themes
|
||||
entry: 1281914800
|
||||
start: 1282044800
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Visit http://taskwarrior.org
|
||||
entry: 1281089630
|
||||
tags: www
|
||||
priority: H
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Review task list
|
||||
entry: 1281289630
|
||||
due: 1282844800
|
||||
recur: weekly
|
||||
project: gtd
|
||||
status: pending
|
||||
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Try out latest FireFox beta
|
||||
entry: 1281289630
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
...
|
||||
EOF
|
||||
|
||||
printf "y\n" | task rc:x import file.yaml
|
||||
|
||||
# Now the visible part.
|
||||
echo
|
||||
echo '$ task calendar sep 2010'
|
||||
task rc:x calendar sep 2010
|
||||
|
||||
echo
|
||||
echo '$ task calendar'
|
||||
task rc:x calendar
|
||||
|
||||
echo
|
||||
echo '$ task overdue'
|
||||
task rc:x 2 done
|
||||
|
||||
exit
|
||||
|
||||
74
doc/misc/run.sample.blue
Executable file
74
doc/misc/run.sample.blue
Executable file
@@ -0,0 +1,74 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'defaultwidth=120' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/dark-blue-256.theme' >> x
|
||||
echo 'color.alternate=' >> x
|
||||
|
||||
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
|
||||
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
|
||||
echo 'report.list.sort=due+,priority_long-,project+' >> x
|
||||
|
||||
# Import tasks with old timestamps
|
||||
cat <<EOF >file.yaml
|
||||
%YAML 1.1
|
||||
---
|
||||
task:
|
||||
description: Try out the color themes
|
||||
entry: 1281914800
|
||||
start: 1282044800
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Visit http://taskwarrior.org
|
||||
entry: 1281089630
|
||||
tags: www
|
||||
priority: H
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Review task list
|
||||
entry: 1281289630
|
||||
due: 1282844800
|
||||
recur: weekly
|
||||
project: gtd
|
||||
status: pending
|
||||
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Try out latest FireFox beta
|
||||
entry: 1281289630
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
...
|
||||
EOF
|
||||
|
||||
printf "y\n" | task rc:x import file.yaml
|
||||
|
||||
# Now the visible part.
|
||||
echo
|
||||
echo '$ task 1 annotate Try the blue one first'
|
||||
task rc:x 1 annotate Try the blue one first
|
||||
|
||||
echo
|
||||
echo '$ task list'
|
||||
task rc:x list
|
||||
|
||||
echo
|
||||
echo '$ task list due.before:eow'
|
||||
task rc:x list due.before:eow
|
||||
|
||||
echo
|
||||
echo '$ task 2 done'
|
||||
task rc:x 2 done
|
||||
|
||||
exit
|
||||
|
||||
71
doc/misc/run.sample.cal
Executable file
71
doc/misc/run.sample.cal
Executable file
@@ -0,0 +1,71 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'defaultwidth=120' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
|
||||
echo 'color.alternate=' >> x
|
||||
|
||||
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
|
||||
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
|
||||
echo 'report.list.sort=due+,priority_long-,project+' >> x
|
||||
|
||||
# Import tasks with old timestamps
|
||||
cat <<EOF >file.yaml
|
||||
%YAML 1.1
|
||||
---
|
||||
task:
|
||||
description: Try out the color themes
|
||||
entry: 1281914800
|
||||
start: 1282044800
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Visit http://taskwarrior.org
|
||||
entry: 1281089630
|
||||
tags: www
|
||||
priority: H
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Review task list
|
||||
entry: 1281289630
|
||||
due: 1282844800
|
||||
recur: weekly
|
||||
project: gtd
|
||||
status: pending
|
||||
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Try out latest FireFox beta
|
||||
entry: 1281289630
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
...
|
||||
EOF
|
||||
|
||||
printf "y\n" | task rc:x import file.yaml
|
||||
|
||||
# Now the visible part.
|
||||
echo
|
||||
echo '$ task calendar sep 2010'
|
||||
task rc:x calendar sep 2010
|
||||
|
||||
echo
|
||||
echo '$ task calendar'
|
||||
task rc:x calendar
|
||||
|
||||
echo
|
||||
echo '$ task overdue'
|
||||
task rc:x 2 done
|
||||
|
||||
exit
|
||||
|
||||
19
doc/misc/run.sample.color
Executable file
19
doc/misc/run.sample.color
Executable file
@@ -0,0 +1,19 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/dark-green-256.theme' >> x
|
||||
|
||||
|
||||
# Now the visible part.
|
||||
echo
|
||||
echo '$ task color'
|
||||
task rc:x color
|
||||
|
||||
exit
|
||||
|
||||
38
doc/misc/run.sample.deps
Executable file
38
doc/misc/run.sample.deps
Executable file
@@ -0,0 +1,38 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'defaultwidth=120' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
|
||||
echo 'color.alternate=' >> x
|
||||
|
||||
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
|
||||
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
|
||||
echo 'report.list.sort=due+,priority_long-,project+' >> x
|
||||
|
||||
# Now the visible part.
|
||||
|
||||
echo
|
||||
echo $ task add project:Cake Mix the ingredients
|
||||
task rc:x add project:Cake Mix the ingredients
|
||||
|
||||
echo
|
||||
echo $ task add project:Cake Bake the cake depends:1
|
||||
task rc:x add project:Cake Bake the cake depends:1
|
||||
|
||||
echo
|
||||
echo $ task add project:Cake Eat the cake depends:2
|
||||
task rc:x add project:Cake Eat the cake depends:2
|
||||
|
||||
echo
|
||||
echo $ task 2 info
|
||||
task rc:x 2 info
|
||||
|
||||
exit
|
||||
|
||||
50
doc/misc/run.sample.format
Executable file
50
doc/misc/run.sample.format
Executable file
@@ -0,0 +1,50 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'defaultwidth=95' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/dark-256.theme' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
|
||||
echo 'color.alternate=' >> x
|
||||
echo 'due=6' >> x
|
||||
echo 'dateformat=YMD-H:N' >> x
|
||||
echo 'dateformat.report=YMD-H:N' >> x
|
||||
echo 'color.due=rgb530' >> x
|
||||
|
||||
echo 'report.list.columns=id,project,priority_long,due,recur,description' >> x
|
||||
echo 'report.list.labels=ID,Pro,Pri,Due,Recur,Description' >> x
|
||||
echo 'report.list.sort=due+,priority_long-,project+' >> x
|
||||
|
||||
# Now the visible part.
|
||||
echo
|
||||
echo '$ task config rc.dateformat YMD-H:N'
|
||||
echo "Are you sure you want to add 'dateformat' with a value of 'YMD-H:N'? (y/n) y"
|
||||
echo 'Config file .taskrc modified.'
|
||||
|
||||
echo
|
||||
echo '$ task add Spa appointment due:20100917-11:30'
|
||||
task rc:x add Lunch with Sue due:20100917-11:30
|
||||
|
||||
echo
|
||||
echo '$ task list'
|
||||
task rc:x list
|
||||
|
||||
echo
|
||||
echo '$ task list rc.dateformat.report=m-d-Y'
|
||||
task rc:x list rc.dateformat.report=m-d-Y
|
||||
|
||||
echo
|
||||
echo '$ task list rc.dateformat.report=YMDHNS'
|
||||
task rc:x list rc.dateformat.report=YMDHNS
|
||||
|
||||
echo
|
||||
echo '$ task list rc.dateformat.report="A, B D, Y (wkV)"'
|
||||
task rc:x list rc.dateformat.report="A, B D, Y (wkV)"
|
||||
|
||||
exit
|
||||
|
||||
71
doc/misc/run.sample.ghistory
Executable file
71
doc/misc/run.sample.ghistory
Executable file
@@ -0,0 +1,71 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'defaultwidth=120' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
|
||||
echo 'color.alternate=' >> x
|
||||
|
||||
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
|
||||
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
|
||||
echo 'report.list.sort=due+,priority_long-,project+' >> x
|
||||
|
||||
# Import tasks with old timestamps
|
||||
cat <<EOF >file.yaml
|
||||
%YAML 1.1
|
||||
---
|
||||
task:
|
||||
description: Try out the color themes
|
||||
entry: 1281914800
|
||||
start: 1282044800
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Visit http://taskwarrior.org
|
||||
entry: 1281089630
|
||||
tags: www
|
||||
priority: H
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Review task list
|
||||
entry: 1281289630
|
||||
due: 1282844800
|
||||
recur: weekly
|
||||
project: gtd
|
||||
status: pending
|
||||
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Try out latest FireFox beta
|
||||
entry: 1281289630
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
...
|
||||
EOF
|
||||
|
||||
printf "y\n" | task rc:x import file.yaml
|
||||
|
||||
# Now the visible part.
|
||||
echo
|
||||
echo '$ task calendar sep 2010'
|
||||
task rc:x calendar sep 2010
|
||||
|
||||
echo
|
||||
echo '$ task calendar'
|
||||
task rc:x calendar
|
||||
|
||||
echo
|
||||
echo '$ task overdue'
|
||||
task rc:x 2 done
|
||||
|
||||
exit
|
||||
|
||||
47
doc/misc/run.sample.holidays
Executable file
47
doc/misc/run.sample.holidays
Executable file
@@ -0,0 +1,47 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'defaultwidth=95' >> x
|
||||
echo 'monthsperline=3' >> x
|
||||
echo 'calendar.details.report=list' >> x
|
||||
echo 'calendar.details=full' >> x
|
||||
echo 'calendar.holidays=full' >> x
|
||||
echo 'calendar.legend=yes' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/dark-green-256.theme' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
|
||||
|
||||
# Import tasks with old timestamps
|
||||
cat <<EOF >file.yaml
|
||||
%YAML 1.1
|
||||
---
|
||||
task:
|
||||
description: Put some more sample screenshots on taskwarrior.org
|
||||
entry: 1283593511
|
||||
project: 1.9.3
|
||||
status: pending
|
||||
due: 1284647841
|
||||
uuid: 89295b14-9e15-4771-9dd9-7e82cf8b67b5
|
||||
annotation:
|
||||
entry: 1283593519
|
||||
description: Show the calendar with holidays
|
||||
annotation:
|
||||
entry: 1283693560
|
||||
description: Show a task that is due
|
||||
...
|
||||
EOF
|
||||
|
||||
printf "y\n" | task rc:x import file.yaml
|
||||
|
||||
# Now the visible part.
|
||||
echo
|
||||
echo '$ task calendar'
|
||||
task rc:x calendar
|
||||
|
||||
exit
|
||||
|
||||
39
doc/misc/run.sample.info
Executable file
39
doc/misc/run.sample.info
Executable file
@@ -0,0 +1,39 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'defaultwidth=95' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/light-256.theme' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
|
||||
echo 'color.alternate=on rgb253' >> x
|
||||
echo 'due=6' >> x
|
||||
echo 'color.due=color0' >> x
|
||||
echo 'color.tagged=color0' >> x
|
||||
|
||||
echo 'report.list.columns=id,project,priority_long,due,recur,description' >> x
|
||||
echo 'report.list.labels=ID,Pro,Pri,Due,Recur,Description' >> x
|
||||
echo 'report.list.sort=due+,priority_long-,project+' >> x
|
||||
|
||||
# Now the visible part.
|
||||
echo
|
||||
echo '$ task add Get stationery supplies proj:office pri:H due:sat +@mall +@weekend'
|
||||
task rc:x add Get stationery supplies proj:office pri:H due:sat +@mall +@weekend
|
||||
|
||||
echo
|
||||
echo '$ task annotate 1 Remember to get batteries'
|
||||
task rc:x annotate 1 Remember to get batteries
|
||||
sleep 2
|
||||
|
||||
echo
|
||||
echo '$ task annotate 1 I wonder if they have that antique fanfold computer paper'
|
||||
task rc:x annotate 1 I wonder if they have that antique fanfold computer paper
|
||||
|
||||
echo
|
||||
echo '$ task 1 info'
|
||||
task rc:x 1 info
|
||||
|
||||
42
doc/misc/run.sample.journal
Executable file
42
doc/misc/run.sample.journal
Executable file
@@ -0,0 +1,42 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'defaultwidth=90' >> x
|
||||
echo 'journal.time=yes' >> x
|
||||
echo 'dateformat.annotation=Y/m/d H:N' >> x
|
||||
#echo 'include /usr/local/share/doc/task/rc/dark-256.theme' >> x
|
||||
#echo 'include /usr/local/share/doc/task/rc/dark-green-256.theme' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/dark-yellow-green.theme' >> x
|
||||
|
||||
# Now the visible part.
|
||||
echo
|
||||
echo '$ task add Complete the client report due:friday +@work'
|
||||
task rc:x add Complete the client report due:friday +@work
|
||||
echo
|
||||
echo '$ task config journal.time on'
|
||||
echo "Are you sure you want to add 'journal.time' with a value of 'on'? (y/n) y"
|
||||
echo 'Config file .taskrc modified.'
|
||||
echo
|
||||
echo '$ task start 1'
|
||||
task rc:x start 1
|
||||
echo
|
||||
echo '(some work happens)'
|
||||
sleep 2
|
||||
echo
|
||||
echo '$ task list'
|
||||
task rc:x list
|
||||
echo
|
||||
echo '$ task stop 1'
|
||||
task rc:x stop 1
|
||||
echo
|
||||
echo '$ task list'
|
||||
task rc:x list
|
||||
|
||||
exit
|
||||
|
||||
35
doc/misc/run.sample.recur
Executable file
35
doc/misc/run.sample.recur
Executable file
@@ -0,0 +1,35 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'defaultwidth=95' >> x
|
||||
echo 'monthsperline=3' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
|
||||
echo 'color.alternate=' >> x
|
||||
echo 'due=3' >> x
|
||||
|
||||
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,description' >> x
|
||||
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Description' >> x
|
||||
echo 'report.list.sort=due+,priority_long-,project+' >> x
|
||||
|
||||
# Now the visible part.
|
||||
echo
|
||||
echo '$ task add Deposit paycheck due:friday recur:14days +@bank'
|
||||
task rc:x add Deposit paycheck due:friday recur:14days
|
||||
|
||||
echo
|
||||
echo '$ task calendar rc.recurrence.limit=6'
|
||||
task rc:x calendar rc.recurrence.limit=6
|
||||
|
||||
echo
|
||||
echo '$ task list'
|
||||
task rc:x list
|
||||
|
||||
exit
|
||||
|
||||
74
doc/misc/run.sample.red
Executable file
74
doc/misc/run.sample.red
Executable file
@@ -0,0 +1,74 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'defaultwidth=120' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/dark-red-256.theme' >> x
|
||||
echo 'color.alternate=' >> x
|
||||
|
||||
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
|
||||
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
|
||||
echo 'report.list.sort=due+,priority_long-,project+' >> x
|
||||
|
||||
# Import tasks with old timestamps
|
||||
cat <<EOF >file.yaml
|
||||
%YAML 1.1
|
||||
---
|
||||
task:
|
||||
description: Try out the color themes
|
||||
entry: 1281914800
|
||||
start: 1282044800
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Visit http://taskwarrior.org
|
||||
entry: 1281089630
|
||||
tags: www
|
||||
priority: H
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Review task list
|
||||
entry: 1281289630
|
||||
due: 1282844800
|
||||
recur: weekly
|
||||
project: gtd
|
||||
status: pending
|
||||
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Try out latest FireFox beta
|
||||
entry: 1281289630
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
...
|
||||
EOF
|
||||
|
||||
printf "y\n" | task rc:x import file.yaml
|
||||
|
||||
# Now the visible part.
|
||||
echo
|
||||
echo '$ task 1 annotate Try the red one next'
|
||||
task rc:x 1 annotate Try the red one next
|
||||
|
||||
echo
|
||||
echo '$ task list'
|
||||
task rc:x list
|
||||
|
||||
echo
|
||||
echo '$ task 2 done'
|
||||
task rc:x 2 done
|
||||
|
||||
echo
|
||||
echo '$ task summary'
|
||||
task rc:x summary
|
||||
|
||||
exit
|
||||
|
||||
71
doc/misc/run.sample.summary
Executable file
71
doc/misc/run.sample.summary
Executable file
@@ -0,0 +1,71 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'defaultwidth=120' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
|
||||
echo 'color.alternate=' >> x
|
||||
|
||||
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
|
||||
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
|
||||
echo 'report.list.sort=due+,priority_long-,project+' >> x
|
||||
|
||||
# Import tasks with old timestamps
|
||||
cat <<EOF >file.yaml
|
||||
%YAML 1.1
|
||||
---
|
||||
task:
|
||||
description: Try out the color themes
|
||||
entry: 1281914800
|
||||
start: 1282044800
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Visit http://taskwarrior.org
|
||||
entry: 1281089630
|
||||
tags: www
|
||||
priority: H
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Review task list
|
||||
entry: 1281289630
|
||||
due: 1282844800
|
||||
recur: weekly
|
||||
project: gtd
|
||||
status: pending
|
||||
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Try out latest FireFox beta
|
||||
entry: 1281289630
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
...
|
||||
EOF
|
||||
|
||||
printf "y\n" | task rc:x import file.yaml
|
||||
|
||||
# Now the visible part.
|
||||
echo
|
||||
echo '$ task calendar sep 2010'
|
||||
task rc:x calendar sep 2010
|
||||
|
||||
echo
|
||||
echo '$ task calendar'
|
||||
task rc:x calendar
|
||||
|
||||
echo
|
||||
echo '$ task overdue'
|
||||
task rc:x 2 done
|
||||
|
||||
exit
|
||||
|
||||
63
doc/misc/run.sample.timesheet
Executable file
63
doc/misc/run.sample.timesheet
Executable file
@@ -0,0 +1,63 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Small script to create a fragment of output for display on the front page
|
||||
# of taskwarrior.org, as a teaser.
|
||||
|
||||
rm pending.data completed.data undo.data
|
||||
|
||||
echo 'data.location=.' > x
|
||||
echo '_forcecolor=on' >> x
|
||||
echo 'defaultwidth=120' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
|
||||
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
|
||||
echo 'color.alternate=' >> x
|
||||
|
||||
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
|
||||
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
|
||||
echo 'report.list.sort=due+,priority_long-,project+' >> x
|
||||
|
||||
# Import tasks with old timestamps
|
||||
cat <<EOF >file.yaml
|
||||
%YAML 1.1
|
||||
---
|
||||
task:
|
||||
description: Try out the color themes
|
||||
entry: 1281914800
|
||||
start: 1282044800
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Visit http://taskwarrior.org
|
||||
entry: 1281089630
|
||||
tags: www
|
||||
priority: H
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Review task list
|
||||
entry: 1281289630
|
||||
due: 1282844800
|
||||
recur: weekly
|
||||
project: gtd
|
||||
status: pending
|
||||
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
task:
|
||||
description: Try out latest FireFox beta
|
||||
entry: 1281289630
|
||||
project: software
|
||||
status: pending
|
||||
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
|
||||
...
|
||||
EOF
|
||||
|
||||
printf "y\n" | task rc:x import file.yaml
|
||||
|
||||
# Now the visible part.
|
||||
echo
|
||||
echo '$ task timesheet 2'
|
||||
task rc:x timesheet 2
|
||||
|
||||
exit
|
||||
|
||||
534
doc/misc/script-193.txt
Normal file
534
doc/misc/script-193.txt
Normal file
@@ -0,0 +1,534 @@
|
||||
[Make window 116x32 for movie recording, light text, dark background]
|
||||
|
||||
This is the script from which a 1.9.3-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.
|
||||
|
||||
|
||||
|
||||
---------------------------------------- Intro -----------------------------------------------------
|
||||
|
||||
http://taskwarrior.org Hello, and welcome to this taskwarrior version 1.9.3 demo.
|
||||
I'm going to show you over 100 features, so don't blink, or
|
||||
you'll miss some. Even experienced users are going to learn
|
||||
*something*.
|
||||
|
||||
I will start off with basic usage, and proceed to more
|
||||
sophisticated commands as we go along.
|
||||
|
||||
---------------------------------------- Basic Usage -----------------------------------------------
|
||||
|
||||
Let's get started. We're planning a party, and there is a
|
||||
lot of work to do, so let's capture these tasks.
|
||||
task add Select a free weekend in August First decide 'when'.
|
||||
task add Select and book a venue Then decide 'where'.
|
||||
task add Come up with a guest list Then decide 'who'.
|
||||
task add Mail invitations Let's send out nice invitations.
|
||||
task add Select a caterer And a caterer.
|
||||
|
||||
task list Let's take a look. Good.
|
||||
|
||||
task log Order a special cake Now I've already ordered a cake, so rather than 'add' this,
|
||||
I'm going to 'log' it. This just means that I want to keep
|
||||
track of the task, but I've already done it. It saves me a
|
||||
step.
|
||||
|
||||
task 4 duplicate /Mail/Design/ As for those invitations, I'm going to need to design them
|
||||
task 4 dup /Mail/Print/ first. And I'm also going to need print them. Here we are
|
||||
task list duplicating a task and making a substitution. Notice how
|
||||
the commands can be abbreviated, provided they are still
|
||||
unique.
|
||||
|
||||
task 3 done That looks good - but now I think of it, I already have my
|
||||
task list guest list, so I can mark that one as done.
|
||||
|
||||
And that's basic usage, and you already know enough to be
|
||||
productive using taskwarrior. If you stopped here, you
|
||||
would be perfectly able to manage your task list.
|
||||
|
||||
But if you want to see what it can really do, keep watching...
|
||||
|
||||
---------------------------------------- Projects --------------------------------------------------
|
||||
|
||||
task add Pay teh rent on teh 31st Remember to pay the rent at the end of the month. Oh,
|
||||
task 7 /teh/teh/g that was sloppy, but it can be fixed with a global
|
||||
task list substitution.
|
||||
|
||||
task 7 project:home We can now use projects to separate home chores from the
|
||||
party preparation. Let's assign that last task to the
|
||||
'home' project. Note that a task may only belong to one
|
||||
project.
|
||||
|
||||
task 1-6 project:party And we will put those first six tasks in the 'party'
|
||||
project. See how we specify a range of tasks? Taskwarrior
|
||||
will want to confirm bulk changes like this, but we'll
|
||||
accept all changes here.
|
||||
|
||||
task projects Now that we have multiple projects, as shown here, we can
|
||||
task list project:home use project as a filter for the list report. You can see
|
||||
task li pro:par again that we can abbreviate 'list' and 'project', but when
|
||||
we abbreviate 'party', we are filtering all the projects
|
||||
that begin with 'par'.
|
||||
|
||||
---------------------------------------- Priorities ------------------------------------------------
|
||||
|
||||
task 1-3,5 priority:H Priorities are another way to organize tasks. You can use
|
||||
task list priority values of high, medium and low, and taskwarrior
|
||||
knows these as H, M or L.
|
||||
|
||||
task 3 pri: You can remove priorities by specifying a blank value.
|
||||
|
||||
---------------------------------------- Tags ------------------------------------------------------
|
||||
|
||||
task list A task may only have one project, but it may have any number
|
||||
of tags, which are just single words associated with the task.
|
||||
|
||||
task 3,5,6 +mall I can go to the print shop at the mall, and do all the
|
||||
invitation tasks, so let's tag them all.
|
||||
|
||||
task long The long report shows tags, too,
|
||||
|
||||
task list +mall and I can use tags as a filter to any report too.
|
||||
|
||||
task 3 -mall I made a mistake - I can't mail out the invitations at the
|
||||
mall, so let's remove that tag.
|
||||
|
||||
---------------------------------------- Modifications ---------------------------------------------
|
||||
|
||||
task 7 Pay rent at the end of the month Task 7 is not worded correctly, so I can modify that by
|
||||
specifying a task ID and a new description. This is also
|
||||
considered a bulk change, and so requires confirmation.
|
||||
|
||||
task add music We'll need music.
|
||||
task 8 prepend Select some I can prepend to that.
|
||||
task 8 append for after dinner I can append to that.
|
||||
task list
|
||||
|
||||
task edit I can also go straight into an editor and modify anything.
|
||||
|
||||
task add Hire a band? <--- Sometimes the command will confuse the shell. In this case,
|
||||
what would happen if there was a file named 'bands' in the
|
||||
current directory? The shell would expand that wildcard,
|
||||
so to avoid that, you can...
|
||||
task add Hire a band\? <--- escape the wildcard...
|
||||
task add "Hire a band?" <--- or quote the whole description...
|
||||
|
||||
task add -- Hire a band\? +dj You can also use the minus minus operator which tells
|
||||
taskwarrior to stop being clever and interpret the rest
|
||||
of the arguments as a task description. Otherwise, that
|
||||
+dj would be interpreted as a tag.
|
||||
|
||||
task undo We don't need a band, so the easiest way to get rid of that
|
||||
task is to undo the last change. Taskwarrior has a
|
||||
complete undo stack, so you can undo all the way back to
|
||||
the beginning.
|
||||
task 1 delete The undo operation gets rid of the task completely, but I
|
||||
task undo could also have just deleted the task, then the deletion
|
||||
itself would be tracked, and also undoable.
|
||||
|
||||
---------------------------------------- Info ------------------------------------------------------
|
||||
|
||||
task 1 info During that undo operation, taskwarrior displayed metadata
|
||||
task 1 that is associated with the task. You can display this
|
||||
with the info command, and its shortcut.
|
||||
|
||||
task stats There are also statistics that taskwarrior gathers, which
|
||||
I can display.
|
||||
|
||||
---------------------------------------- Annotations -----------------------------------------------
|
||||
|
||||
task 1 annotate the 12th looks good Annotations are little notes that can be added to a task.
|
||||
task 1 annotate or the 13th There can be any number, and each has a time stamp.
|
||||
task list
|
||||
task list rc.annotations:full You can choose to display annotations in different ways.
|
||||
task list rc.annotations:sparse
|
||||
task list rc.annotations:none
|
||||
|
||||
task 1 denotate 13th Annotations can be removed by providing a matching pattern.
|
||||
task list
|
||||
|
||||
---------------------------------------- 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.
|
||||
|
||||
---------------------------------------- Defaults --------------------------------------------------
|
||||
|
||||
task config default.command list There is a default command, which can be set to anything,
|
||||
task in this case it is set to the 'list' report. Then running
|
||||
taskwarrior with no command name runs the default command.
|
||||
|
||||
task config default.priority H I can also specify a default priority and project, which
|
||||
task config default.project Work means that any tasks added will use them, unless an
|
||||
task add New task alternative is provided.
|
||||
task list
|
||||
|
||||
task undo Let's just revert those changes, to clean up.
|
||||
task config default.priority
|
||||
task config default.project
|
||||
|
||||
---------------------------------------- Aliases ---------------------------------------------------
|
||||
|
||||
task config alias.zzz list You can create aliases to effectively rename commands.
|
||||
task zzz
|
||||
|
||||
task z You can abbreviate those, too.
|
||||
|
||||
---------------------------------------- Color -----------------------------------------------------
|
||||
|
||||
task config color on All the examples so far have been shown with color turned
|
||||
task list off. How about some color?
|
||||
|
||||
What you see is the result of a set of color rules being
|
||||
applied to the tasks. There is a hierarchy of color rules
|
||||
that colorize a task based on the metadata
|
||||
|
||||
task 1 "bg:on red" Here is an example of an explicit override to the color
|
||||
task list rules where a specific task is given a red background.
|
||||
task 1 bg: Note that the quotes are necessary, otherwise the shell
|
||||
will consider "bg:on" and "red" to be separate arugments.
|
||||
|
||||
task color Taskwarrior supports 256 colors on certain terminal
|
||||
emulators, and this shows the range of colors available.
|
||||
|
||||
task color white on red This is how to show a color sample.
|
||||
|
||||
task color legend Or samples of all the active color settings.
|
||||
|
||||
Themes are a simple way to use coordinated color schemes
|
||||
so by including a color theme into the configuration file,
|
||||
you can see some striking effects.
|
||||
|
||||
A blue theme.
|
||||
|
||||
# include /usr/local/share/doc/task/rc/dark-blue-256.theme
|
||||
vi ~/.taskrc
|
||||
task color legend
|
||||
task list
|
||||
A red theme.
|
||||
|
||||
# include /usr/local/share/doc/task/rc/dark-red-256.theme
|
||||
vi ~/.taskrc
|
||||
task color legend
|
||||
task list
|
||||
A general dark theme.
|
||||
|
||||
# include /usr/local/share/doc/task/rc/dark-256.theme
|
||||
vi ~/.taskrc
|
||||
task list
|
||||
|
||||
Here is are two color rules that specify a dark blue
|
||||
background for all tasks that are part of the 'party'
|
||||
project, and uses bold to identify any tasks with the
|
||||
keyword 'invitations' in the description.
|
||||
|
||||
task "rc.color.project.party=on rgb001" rc.color.keyword.invit=bold list
|
||||
|
||||
man task-color There is a man page with a writeup of all the color
|
||||
capabilities.
|
||||
|
||||
---------------------------------------- Active tasks ----------------------------------------------
|
||||
|
||||
task 2 start I'm selecting a venue, so let's indicate that task 2 is
|
||||
task list active by starting it. See how active tasks are affected
|
||||
by the color rules.
|
||||
|
||||
task active There is an active report that shows only active tasks, and
|
||||
task 2 stop you can mark any active task as inactive, by stopping it.
|
||||
|
||||
task config journal.time on (y) There is a journalling feature that records the start and
|
||||
|
||||
task config dateformat.annotation 'Y/m/d H:N' (y)
|
||||
|
||||
task 2 start stop times as annotations. We'll turn that on, and add
|
||||
task list venue the time to the annotation date format.
|
||||
task 2 stop
|
||||
task list venue
|
||||
|
||||
---------------------------------------- Due dates -------------------------------------------------
|
||||
|
||||
task 1 due:7/31/2010 Due dates can be specified as dates...
|
||||
task 1 due:2wks as some distance into the future...
|
||||
task 1 due:-2wks or past...
|
||||
task 1 due:eom or by mnemonic (end of month)...
|
||||
task 2 due:8th or by ordinal...
|
||||
task 2 due:sunday or by day of week...
|
||||
task 5 due:eow
|
||||
task list Some of these dates are in the past, so now you see there
|
||||
task overdue are overdue tasks. Due dates have different colors for
|
||||
due, imminent, today and overdue values.
|
||||
|
||||
task rc.dateformat.report:Y-M-DTH:N:SZ list
|
||||
You can also choose the format - for input and output.
|
||||
|
||||
---------------------------------------- Calendar --------------------------------------------------
|
||||
|
||||
task calendar When tasks have due dates, you can see them on the calendar.
|
||||
|
||||
vi ~/.taskrc
|
||||
# include /usr/local/share/doc/task/rc/holidays-US.rc
|
||||
task calendar
|
||||
Taskwarrior provides sample holiday files. You can create
|
||||
your own, or use one of the samples to show holidays on the
|
||||
calendar.
|
||||
|
||||
task cal 2010 You can see the whole year.
|
||||
task rc.calendar.details:full cal You can see the tasks with due dates also.
|
||||
task rc.calendar.holidays:full cal And you can see the holidays.
|
||||
|
||||
---------------------------------------- Recurrence ------------------------------------------------
|
||||
|
||||
task 7 info Remember the task we added to pay the rent? We're going to
|
||||
task 7 due:eom recur:monthly need to do that every month. Recurring tasks allow us to
|
||||
task 7 set up a single task that keeps coming back, just as you'd
|
||||
expect.
|
||||
|
||||
task 7 until:eoy You can also limit the extent of the recurrence. Let's make
|
||||
sure the task doesn't recur after the lease ends.
|
||||
|
||||
task recurring And there is a recurring report that shows you only the
|
||||
recurring tasks.
|
||||
|
||||
To illustrate a point, let's set up a recurring annual task
|
||||
as a reminder to pay taxes, and put the due date in the past.
|
||||
This will cause task to fill in the gaps, and create a series
|
||||
of severely overdue tasks.
|
||||
|
||||
task add Pay taxes due:4/15/2007 recur:yearly
|
||||
task long
|
||||
|
||||
task 11 delete # y y Deletions to recurring tasks can be escalated to include all
|
||||
task list the recurrences of a task.
|
||||
|
||||
---------------------------------------- Shell -----------------------------------------------------
|
||||
|
||||
task shell You can use the shell command to create a more immersive
|
||||
task> projects environment. Any task command you run outside the shell
|
||||
task> tags can also be run inside the shell, without the need to prefix
|
||||
task> list every command with "task".
|
||||
task> quit
|
||||
|
||||
---------------------------------------- Special Tags ----------------------------------------------
|
||||
|
||||
task 6 +nocolor You've seen tags, but there are also 'special tags' that
|
||||
task list have effects on individual tasks. The 'nocolor' special
|
||||
tag causes the color rules to be bypassed.
|
||||
|
||||
task tags Special tags are highlighted by the 'tags' command.
|
||||
|
||||
task 6 -nocolor There are others - the 'nonag' special tag prevents the
|
||||
generation of nag messages when you work on low priority
|
||||
tasks when there are more important ones.
|
||||
|
||||
The 'nocal' special tag will prevent a task from appearing
|
||||
on the calendar.
|
||||
|
||||
---------------------------------------- Waiting ---------------------------------------------------
|
||||
|
||||
task add Look for new apartment due:eoy When you have a task with a due date that is far out into
|
||||
task list the future, you may want to hide that task for a while.
|
||||
|
||||
task 10 wait:12/1/2010 You can provide a wait date for a task, and it will remain
|
||||
task list hidden until that date. It will no longer be cluttering
|
||||
task waiting your task list, but it is still there, and visible using
|
||||
the 'waiting' report. When the wait date comes, the task
|
||||
will just pop back into the list.
|
||||
|
||||
task add Do something in a few seconds To illustrate this, let's set up a task with a very short
|
||||
task 11 wait:5s wait time of five seconds.
|
||||
|
||||
task list It's gone.
|
||||
(sleep 5) We wait for 5 seconds...
|
||||
task list And it's back.
|
||||
task 11 rc.confirmation:no delete And now it's deleted.
|
||||
|
||||
---------------------------------------- Dependencies ----------------------------------------------
|
||||
|
||||
task list pro:party Taskwarrior supports dependencies. Let's take a look at the
|
||||
party planning tasks, and assign dependencies.
|
||||
|
||||
task 3 depends:6 Let's see. I can't mail invitations until they are printed.
|
||||
task 6 dep:5 I can't print them until I design them.
|
||||
task 2 dep:1 I need to select a weekend before a location.
|
||||
task 5 dep:1,2 Design depends on location and weekend.
|
||||
task 4 dep:1 And the caterer needs to know where.
|
||||
|
||||
task long pro:party All my tasks are blocked except task 1. That makes sense.
|
||||
|
||||
task 5 dep:-1 Hmm, that double dependency isn't right.
|
||||
|
||||
task blocked Here are the blocked tasks.
|
||||
task unblocked and the opposite, the unblocked tasks.
|
||||
|
||||
task 1 info If we look at task 1 closely, we can see that it is blocking
|
||||
task 2 info 2 and 4. And if we look at task 2, we see that it is
|
||||
blocked by 1, and blocking 5.
|
||||
|
||||
This is called a dependency chain, which is a string of tasks
|
||||
that are all connected not only by their project, but by
|
||||
dependencies.
|
||||
|
||||
Now we understand that task 1 should be done first, but you
|
||||
may still violate the laws of physics if you wish. Let's
|
||||
complete task 2 and see what happens.
|
||||
|
||||
task 2 done (y) Taskwarrior realizes what you are doing, and offers to fix
|
||||
task 1 info the dependency chain to reflect what you have done.
|
||||
|
||||
---------------------------------------- Reports ---------------------------------------------------
|
||||
|
||||
task minimal Taskwarrior has a good many reports. There is the bare minimum.
|
||||
task ls The simple.
|
||||
task list The standard.
|
||||
task long The kitchen sink.
|
||||
task all The packrat.
|
||||
task completed Nostalgia.
|
||||
task recurring Groundhog day.
|
||||
task waiting Surprises.
|
||||
task blocked Wedged.
|
||||
task unblocked Unencumbered.
|
||||
task oldest Ancient history.
|
||||
task newest Contemporary.
|
||||
task timesheet Corporate.
|
||||
task next And "what should I work on next?" This one can be useful
|
||||
because it pulls a few of the highest priority tasks from
|
||||
all the projects. It's the report we should all be using.
|
||||
|
||||
---------------------------------------- Custom Report ---------------------------------------------
|
||||
|
||||
You can even define your own custom report. Let's quickly
|
||||
create a custom report - we'll call it foo - and I can
|
||||
choose from a long list of fields to include in the report,
|
||||
but I want to see the ID, the date when I entered the task,
|
||||
and the description. I can specify the labels for those
|
||||
columns, the sort order of the report, and I can filter.
|
||||
|
||||
cat >> ~/.taskrc
|
||||
report.foo.description=My own report
|
||||
report.foo.columns=id,entry,description
|
||||
report.foo.labels=ID,Entered,Description
|
||||
report.foo.sort=entry+,description+
|
||||
report.foo.filter=status:pending
|
||||
|
||||
task help | grep foo Custom reports also show up on the help output.
|
||||
|
||||
task show report.foo I can inspect the configuration.
|
||||
|
||||
task foo And they can be run just like the other reports.
|
||||
|
||||
---------------------------------------- Charts ----------------------------------------------------
|
||||
|
||||
task history The history report gives monthly totals of tasks added,
|
||||
task history.annual completed and deleted. There is also an annual version.
|
||||
|
||||
task ghistory There is a graphical monthly...
|
||||
task ghistory.annual and annual version.
|
||||
|
||||
task summary There is a project summary report that shows progress in
|
||||
all the projects.
|
||||
|
||||
---------------------------------------- Advanced Filters ------------------------------------------
|
||||
|
||||
task list Filters are a very powerful tool. First here is an
|
||||
task list invit unfiltered list, which shows all tasks. Now again, but with
|
||||
the text 'invit', which acts as a filter on the description
|
||||
field.
|
||||
|
||||
task list description.contains:invit This is the equivalent form using attribute modifiers. In
|
||||
this example we are filtering on descriptions that contain
|
||||
the word fragment. Here we are using the 'contains'
|
||||
modifier, but there are many others.
|
||||
|
||||
task list desc.word:the All tasks containing the whole word 'the'. See how
|
||||
annotations are also searched?
|
||||
|
||||
task list desc.noword:invitations Here is a list of all tasks that do not contain the whole
|
||||
word 'invitations'.
|
||||
|
||||
task list pro:party Here list all tasks in the 'party' project.
|
||||
task list pro.is:party And the full equivalent.
|
||||
task list pro.not:party Here list tasks that are not in the 'party' project. I
|
||||
could have also used 'isnt' here - there are several
|
||||
synonyms for modifiers, so that the filter can be written
|
||||
so that it reads naturally.
|
||||
|
||||
task list pro:party pri.over:L Here the 'over' modifier is filtering on priorities that
|
||||
sort higher than 'Low', and also filtering on the 'party'
|
||||
project. There are two terms in this filter.
|
||||
|
||||
task list pro:party limit:2 Same again, but only show me the first two tasks.
|
||||
task list limit:page Now all tasks, but just show the first page of tasks. I
|
||||
don't have a page full of tasks here, but you get the idea.
|
||||
|
||||
task all status:pending Now you can see how some of the built-in reports work. The
|
||||
'list' report is just all tasks, filtered so that only the
|
||||
pending tasks are shown.
|
||||
|
||||
task all status:waiting The 'waiting' report is similarly defined.
|
||||
|
||||
---------------------------------------- Import/Export ---------------------------------------------
|
||||
|
||||
task export.csv You can export your tasks. Here you see all tasks being
|
||||
exported in CSV format.
|
||||
|
||||
task export.csv venue Let's just export one task in CSV format...
|
||||
task export.vcalendar venue Or in VCalendar format...
|
||||
task export.yaml venue Or YAML.
|
||||
|
||||
cat file.text I can also import. Here I am importing simple lines of
|
||||
task import file.text text. Taskwarrior recognizes the format and confirms.
|
||||
|
||||
cat file.yaml Here is a YAML example. Taskwarrior can read several
|
||||
task import file.yaml formats, including old versions of its data files. Using
|
||||
YAML, you can round-trip the data without loss.
|
||||
|
||||
task new limit:2 Here are the imported tasks.
|
||||
|
||||
---------------------------------------- Help ------------------------------------------------------
|
||||
|
||||
task help You'll find a quick reference page built in, with the 'help'
|
||||
man task command, or perhaps you'll want to take a look at the several
|
||||
man taskrc man pages installed. This demo has superficially shown
|
||||
man task-color many features which have more capability and depth which you
|
||||
can find in the man pages, and online.
|
||||
|
||||
man task-tutorial This screencast is actually just a recording of me going
|
||||
through the tutorial.
|
||||
|
||||
man task-faq Some frequently asked questions are answered here.
|
||||
|
||||
man task-sync You've patiently watched this whole movie, so here's your
|
||||
reward - taskwarrior 1.9.3 has network synchronization
|
||||
features, for sharing tasks across computers. But this is
|
||||
just a teaser - synch will be shown in the next movie.
|
||||
|
||||
---------------------------------------- Wrap up ---------------------------------------------------
|
||||
|
||||
task version And that's it. Don't forget to take a look at
|
||||
taskwarrior.org.
|
||||
|
||||
Thank you for watching.
|
||||
|
||||
---------------------------------------- End -------------------------------------------------------
|
||||
|
||||
34
doc/misc/script-color.txt
Normal file
34
doc/misc/script-color.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
Hello. This is a demonstration of the
|
||||
taskwarrior color capabilities coming
|
||||
in version 1.9.
|
||||
|
||||
task color The color command shows the various
|
||||
supported colors. For this you will
|
||||
need an xterm with 256-color support,
|
||||
or an equivalent.
|
||||
|
||||
This demo uses iTerm running on Snow
|
||||
Leopard.
|
||||
|
||||
task add Prepare 1.9 for release Let's create a few tasks, to illustrate
|
||||
task add Update the various docs the features. Five should be enough.
|
||||
task add Run the regression tests
|
||||
task add Make the packages
|
||||
task add Upload to distributions
|
||||
|
||||
--- NOTES
|
||||
|
||||
16-color mode
|
||||
upgrade
|
||||
blending
|
||||
alternate lines
|
||||
|
||||
--- NOTES
|
||||
|
||||
task ls Okay, let's color any tasks that
|
||||
mention tests a nice medium blue.
|
||||
|
||||
echo 'color.keyword.test=color23' >> ~/.taskrc
|
||||
|
||||
|
||||
|
||||
40
doc/misc/script-hooks-2.txt
Normal file
40
doc/misc/script-hooks-2.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
$ # Q: What is a formatting hook?
|
||||
$ # A: Lua code that modifies taskwarrior output at run time.
|
||||
$
|
||||
$ cat > hooks.lua
|
||||
|
||||
-- Make ID not show up
|
||||
function id (name, value)
|
||||
return "(shhh - it's a secret)", 0, nil
|
||||
end
|
||||
|
||||
-- Decorate the UUID
|
||||
function uuid (name, value)
|
||||
return '<<<' .. value .. '>>>', 0, nil
|
||||
end
|
||||
|
||||
^D
|
||||
|
||||
$ # Q: What is a command hook?
|
||||
$ # A: Lua code that changes the way commands work.
|
||||
$
|
||||
$ cat >> hooks.lua
|
||||
|
||||
-- Disable tags
|
||||
function notags ()
|
||||
return 1, 'Tags have been disabled'
|
||||
end
|
||||
|
||||
^D
|
||||
|
||||
$
|
||||
$ task config -- hook.format-id ~/demo/hooks.lua:id
|
||||
$ task config -- hook.format-uuid ~/demo/hooks.lua:uuid
|
||||
$ task config -- hook.pre-tag ~/demo/hooks.lua:notags
|
||||
$ task list
|
||||
$ task add Demonstrate formatting hooks
|
||||
$ task 1 info
|
||||
$ task config hooks on
|
||||
$ task 1 info
|
||||
$ task 1 +try_to_tag
|
||||
|
||||
33
doc/misc/script-hooks.txt
Normal file
33
doc/misc/script-hooks.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
$
|
||||
$ # Taskwarrior now has Lua 5.1.4 built in.
|
||||
$
|
||||
$ task version
|
||||
$ cat > hooks.lua
|
||||
function foo ()
|
||||
print ("Hello from Lua")
|
||||
return 0, nil
|
||||
end
|
||||
^D
|
||||
$
|
||||
$ # Taskwarrior can call into Lua at many points during execution.
|
||||
$ # This one is called immediately before taskwarrior quits.
|
||||
$
|
||||
$ task rc.hook.pre-exit=~/hooks.lua:foo version
|
||||
$
|
||||
$ # While taskwarrior is calling Lua code, the Lua can also call
|
||||
$ # back into a taskwarrior API, for information.
|
||||
$
|
||||
$ cat > hooks.lua
|
||||
function foo ()
|
||||
print "Lua version is " .. task_lua_version ())
|
||||
print "Taskwarrior version is " .. task_version ())
|
||||
return 0, nil
|
||||
end
|
||||
^D
|
||||
$
|
||||
$ cat >> .taskrc
|
||||
hook.pre-exit=~/hooks.lua:foo
|
||||
^D
|
||||
$
|
||||
$ task version
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Hello, and welcome to this quick demo of the task program.
|
||||
Hello, and welcome to this quick demo of the
|
||||
taskwarrior program.
|
||||
|
||||
task add do laundry Let's add some tasks
|
||||
I need to do laundry
|
||||
@@ -68,7 +69,6 @@ task 3 fg:
|
||||
|
||||
task colors There are many combinations to choose from
|
||||
|
||||
(Slashes!!!)
|
||||
task 1 due:6/8/2008 Let's add a due date
|
||||
date
|
||||
|
||||
|
||||
67
doc/rc/dark-16.theme
Normal file
67
doc/rc/dark-16.theme
Normal file
@@ -0,0 +1,67 @@
|
||||
################################################################################
|
||||
# Sample taskwarrior 1.9 (or later) dark 16-color theme
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006 - 2010, Paul Beckingham.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
color=on
|
||||
color.header=yellow
|
||||
color.footnote=yellow
|
||||
color.debug=yellow
|
||||
|
||||
color.summary.bar=on green
|
||||
color.summary.background=on black
|
||||
|
||||
color.history.add=black on red
|
||||
color.history.done=black on green
|
||||
color.history.delete=black on yellow
|
||||
|
||||
color.undo.before=red
|
||||
color.undo.after=green
|
||||
|
||||
color.calendar.today=bold white on bright blue
|
||||
color.calendar.due=white on red
|
||||
color.calendar.due.today=bold white on red
|
||||
color.calendar.overdue=black on bright red
|
||||
color.calendar.weekend=white on bright black
|
||||
color.calendar.holiday=black on bright yellow
|
||||
color.calendar.weeknumber=bold blue
|
||||
|
||||
color.recurring=magenta
|
||||
color.overdue=bold red
|
||||
color.due.today=red
|
||||
color.due=red
|
||||
color.active=black on bright green
|
||||
color.pri.none=
|
||||
color.pri.H=bold white
|
||||
color.pri.M=white
|
||||
color.pri.L=
|
||||
color.tagged=green
|
||||
color.blocked=black on white
|
||||
color.project.none=
|
||||
color.tag.none=
|
||||
color.alternate=
|
||||
|
||||
67
doc/rc/dark-256.theme
Normal file
67
doc/rc/dark-256.theme
Normal file
@@ -0,0 +1,67 @@
|
||||
###############################################################################
|
||||
# Sample taskwarrior 1.9 (or later) dark 256-color theme
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006 - 2010, Paul Beckingham.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
color=on
|
||||
color.header=color3
|
||||
color.footnote=color3
|
||||
color.debug=color3
|
||||
|
||||
color.summary.bar=on rgb141
|
||||
color.summary.background=on color0
|
||||
|
||||
color.history.add=color0 on rgb500
|
||||
color.history.done=color0 on rgb050
|
||||
color.history.delete=color0 on rgb550
|
||||
|
||||
color.undo.before=color1
|
||||
color.undo.after=color2
|
||||
|
||||
color.calendar.today=color15 on rgb013
|
||||
color.calendar.due=color0 on color1
|
||||
color.calendar.due.today=color15 on color1
|
||||
color.calendar.overdue=color0 on color9
|
||||
color.calendar.weekend=on color235
|
||||
color.calendar.holiday=color0 on color11
|
||||
color.calendar.weeknumber=rgb013
|
||||
|
||||
color.recurring=rgb013
|
||||
color.overdue=color9
|
||||
color.due.today=rgb400
|
||||
color.due=color1
|
||||
color.active=rgb555 on rgb410
|
||||
color.pri.none=
|
||||
color.pri.H=color255
|
||||
color.pri.M=color250
|
||||
color.pri.L=color245
|
||||
color.tagged=rgb031
|
||||
color.blocked=white on color8
|
||||
color.project.none=
|
||||
color.tag.none=
|
||||
color.alternate=on color233
|
||||
|
||||
67
doc/rc/dark-blue-256.theme
Normal file
67
doc/rc/dark-blue-256.theme
Normal file
@@ -0,0 +1,67 @@
|
||||
###############################################################################
|
||||
# Sample taskwarrior 1.9 (or later) dark 256-color theme, featuring blue.
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006 - 2010, Paul Beckingham.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
color=on
|
||||
color.header=rgb013
|
||||
color.footnote=rgb013
|
||||
color.debug=rgb013
|
||||
|
||||
color.summary.bar=on rgb003
|
||||
color.summary.background=on color0
|
||||
|
||||
color.history.add=color0 on rgb015
|
||||
color.history.done=color0 on rgb025
|
||||
color.history.delete=color0 on rgb035
|
||||
|
||||
color.undo.before=rgb013
|
||||
color.undo.after=rgb035
|
||||
|
||||
color.calendar.today=color0 on rgb115
|
||||
color.calendar.due=color0 on color249
|
||||
color.calendar.due.today=color0 on color252
|
||||
color.calendar.overdue=color0 on color255
|
||||
color.calendar.weekend=on color235
|
||||
color.calendar.holiday=color255 on rgb013
|
||||
color.calendar.weeknumber=rgb015
|
||||
|
||||
color.recurring=rgb115
|
||||
color.overdue=color255
|
||||
color.due.today=color252
|
||||
color.due=color249
|
||||
color.active=rgb045 on rgb015
|
||||
color.pri.none=
|
||||
color.pri.H=rgb035
|
||||
color.pri.M=rgb025
|
||||
color.pri.L=rgb015
|
||||
color.tagged=color246
|
||||
color.blocked=white on rgb001
|
||||
color.project.none=
|
||||
color.tag.none=
|
||||
color.alternate=on color233
|
||||
|
||||
67
doc/rc/dark-green-256.theme
Normal file
67
doc/rc/dark-green-256.theme
Normal file
@@ -0,0 +1,67 @@
|
||||
###############################################################################
|
||||
# Sample taskwarrior 1.9 (or later) dark 256-color theme, featuring green.
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006 - 2010, Paul Beckingham.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
color=on
|
||||
color.header=rgb031
|
||||
color.footnote=rgb031
|
||||
color.debug=rgb031
|
||||
|
||||
color.summary.bar=on rgb030
|
||||
color.summary.background=on color0
|
||||
|
||||
color.history.add=color0 on rgb010
|
||||
color.history.done=color0 on rgb030
|
||||
color.history.delete=color0 on rgb050
|
||||
|
||||
color.undo.before=rgb031
|
||||
color.undo.after=rgb053
|
||||
|
||||
color.calendar.today=color0 on rgb151
|
||||
color.calendar.due=color0 on color249
|
||||
color.calendar.due.today=color0 on color225
|
||||
color.calendar.overdue=color0 on color255
|
||||
color.calendar.weekend=on color235
|
||||
color.calendar.holiday=rgb151 on rgb020
|
||||
color.calendar.weeknumber=rgb010
|
||||
|
||||
color.recurring=rgb151
|
||||
color.overdue=color255
|
||||
color.due.today=color252
|
||||
color.due=color249
|
||||
color.active=rgb050 on rgb010
|
||||
color.pri.none=
|
||||
color.pri.H=rgb050
|
||||
color.pri.M=rgb030
|
||||
color.pri.L=rgb010
|
||||
color.tagged=color246
|
||||
color.blocked=white on rgb010
|
||||
color.project.none=
|
||||
color.tag.none=
|
||||
color.alternate=on color233
|
||||
|
||||
67
doc/rc/dark-red-256.theme
Normal file
67
doc/rc/dark-red-256.theme
Normal file
@@ -0,0 +1,67 @@
|
||||
###############################################################################
|
||||
# Sample taskwarrior 1.9 (or later) dark 256-color theme, featuring red.
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006 - 2010, Paul Beckingham.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
color=on
|
||||
color.header=rgb100
|
||||
color.footnote=rgb100
|
||||
color.debug=rgb100
|
||||
|
||||
color.summary.bar=on rgb300
|
||||
color.summary.background=on color0
|
||||
|
||||
color.history.add=color0 on rgb100
|
||||
color.history.done=color0 on rgb300
|
||||
color.history.delete=color0 on rgb500
|
||||
|
||||
color.undo.before=rgb301
|
||||
color.undo.after=rgb503
|
||||
|
||||
color.calendar.today=color0 on rgb511
|
||||
color.calendar.due=color0 on color249
|
||||
color.calendar.due.today=color0 on color252
|
||||
color.calendar.overdue=color0 on color255
|
||||
color.calendar.weekend=on color235
|
||||
color.calendar.holiday=rgb522 on rgb300
|
||||
color.calendar.weeknumber=rgb100
|
||||
|
||||
color.recurring=rgb511
|
||||
color.overdue=color255
|
||||
color.due.today=color252
|
||||
color.due=color249
|
||||
color.active=rgb500 on rgb100
|
||||
color.pri.none=
|
||||
color.pri.H=rgb500
|
||||
color.pri.M=rgb400
|
||||
color.pri.L=rgb300
|
||||
color.tagged=color246
|
||||
color.blocked=white on rgb100
|
||||
color.project.none=
|
||||
color.tag.none=
|
||||
color.alternate=on color233
|
||||
|
||||
67
doc/rc/dark-violets-256.theme
Normal file
67
doc/rc/dark-violets-256.theme
Normal file
@@ -0,0 +1,67 @@
|
||||
################################################################################
|
||||
# Sample taskwarrior 1.9 (or later) dark violet 256-color theme
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2010, Kathryn Andersen
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
color=on
|
||||
color.header=rgb013
|
||||
color.footnote=rgb013
|
||||
color.debug=rgb013
|
||||
|
||||
color.summary.bar=on rgb103
|
||||
color.summary.background=on color0
|
||||
|
||||
color.history.add=color0 on rgb105
|
||||
color.history.done=color0 on rgb205
|
||||
color.history.delete=color0 on rgb305
|
||||
|
||||
color.undo.before=rgb103
|
||||
color.undo.after=rgb305
|
||||
|
||||
color.calendar.today=color15 on rgb103
|
||||
color.calendar.due=color0 on rgb325
|
||||
color.calendar.due.today=color0 on rgb404
|
||||
color.calendar.overdue=color0 on color9
|
||||
color.calendar.weekend=gray12 on gray3
|
||||
color.calendar.holiday=color15 on rgb022
|
||||
color.calendar.weeknumber=rgb104
|
||||
|
||||
color.recurring=rgb115
|
||||
color.overdue=color9
|
||||
color.due.today=rgb533
|
||||
color.due=rgb055
|
||||
color.active=rgb445 on rgb213
|
||||
color.pri.none=
|
||||
color.pri.H=rgb404
|
||||
color.pri.M=rgb304
|
||||
color.pri.L=rgb325
|
||||
color.tagged=rgb334
|
||||
color.blocked=white on rgb101
|
||||
color.project.none=
|
||||
color.tag.none=
|
||||
color.alternate=on gray2
|
||||
|
||||
67
doc/rc/dark-yellow-green.theme
Normal file
67
doc/rc/dark-yellow-green.theme
Normal file
@@ -0,0 +1,67 @@
|
||||
################################################################################
|
||||
# Sample taskwarrior 1.9 (or later) dark-yellow-green 256-color theme
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2010, Kathryn Andersen
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
color=on
|
||||
color.header=rgb031
|
||||
color.footnote=rgb031
|
||||
color.debug=rgb031
|
||||
|
||||
color.summary.bar=on rgb030
|
||||
color.summary.background=on color0
|
||||
|
||||
color.history.add=color0 on rgb010
|
||||
color.history.done=color0 on rgb030
|
||||
color.history.delete=color0 on rgb050
|
||||
|
||||
color.undo.before=rgb031
|
||||
color.undo.after=rgb053
|
||||
|
||||
color.calendar.today=color15 on rgb110
|
||||
color.calendar.due=color0 on rgb430
|
||||
color.calendar.due.today=color0 on rgb410
|
||||
color.calendar.overdue=color0 on rgb400
|
||||
color.calendar.weekend=on color235
|
||||
color.calendar.holiday=rgb151 on rgb020
|
||||
color.calendar.weeknumber=rgb110
|
||||
|
||||
color.recurring=rgb343
|
||||
color.overdue=rgb400
|
||||
color.due.today=rgb410
|
||||
color.due=rgb420
|
||||
color.active=rgb451 on rgb310
|
||||
color.pri.none=
|
||||
color.pri.H=rgb450
|
||||
color.pri.M=rgb030
|
||||
color.pri.L=rgb010
|
||||
color.tagged=rgb342
|
||||
color.blocked=white on rgb110
|
||||
color.project.none=
|
||||
color.tag.none=
|
||||
color.alternate=on gray0
|
||||
|
||||
76
doc/rc/holidays-CA.rc
Normal file
76
doc/rc/holidays-CA.rc
Normal file
@@ -0,0 +1,76 @@
|
||||
################################################################################
|
||||
# Sample calendar for Canada
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2010, Cory Donnelly.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
calendar.holidays=sparse
|
||||
|
||||
# 2010
|
||||
holiday.labourday.name=Labour Day
|
||||
holiday.labourday.date=20100906
|
||||
holiday.thanksgiving.name=Thanksgiving Day
|
||||
holiday.thanksgiving.date=20101011
|
||||
holiday.remembranceday.name=Remembrance Day
|
||||
holiday.remembranceday.date=20101111
|
||||
holiday.christmasday.name=Christmas Day
|
||||
holiday.christmasday.date=20101225
|
||||
holiday.boxingday.name=Boxing Day
|
||||
holiday.boxingday.date=20101226
|
||||
holiday.newyearseve.name=New Year's Eve
|
||||
holiday.newyearseve.date=20101231
|
||||
|
||||
# 2011
|
||||
holiday.newyearsday.name=New Year's Day
|
||||
holiday.newyearsday.date=20110101
|
||||
holiday.familyday.name=Family Day
|
||||
holiday.familyday.date=20110117
|
||||
holiday.goodfriday.name=Good Friday
|
||||
holiday.goodfriday.date=20110422
|
||||
holiday.eastermonday.name=Easter Monday
|
||||
holiday.eastermonday.date=20110425
|
||||
holiday.victoriaday.name=Victoria Day
|
||||
holiday.victoriaday.date=20110524
|
||||
holiday.canadaday.name=Canada Day
|
||||
holiday.canadaday.date=20110701
|
||||
holiday.firstmondayofaugust.name=First Monday of August
|
||||
holiday.firstmondayofaugust.date=20110801
|
||||
|
||||
# Commented out to prevent collision with names of 2010 holidays
|
||||
# that haven't happened yet
|
||||
|
||||
#holiday.labourday.name=Labour Day
|
||||
#holiday.labourday.date=20110905
|
||||
#holiday.thanksgiving.name=Thanksgiving Day
|
||||
#holiday.thanksgiving.date=20111010
|
||||
#holiday.remembranceday.name=Remembrance Day
|
||||
#holiday.remembranceday.date=20111111
|
||||
#holiday.christmasday.name=Christmas Day
|
||||
#holiday.christmasday.date=20111225
|
||||
#holiday.boxingday.name=Boxing Day
|
||||
#holiday.boxingday.date=20111226
|
||||
#holiday.newyearseve.name=New Year's Eve
|
||||
#holiday.newyearseve.date=20111231
|
||||
87
doc/rc/holidays-DE.rc
Normal file
87
doc/rc/holidays-DE.rc
Normal file
@@ -0,0 +1,87 @@
|
||||
################################################################################
|
||||
# Sample calendar for Germany
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2010, Federico Hernandez.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
calendar.holidays=sparse
|
||||
|
||||
# 2010
|
||||
holiday.reformationstag.name=Reformationstag (BB,MV,SN,ST,TH)
|
||||
holiday.reformationstag.date=20101031
|
||||
holiday.allerheiligen.name=Allerheiligen (BW,BY,NRW,RP,SL)
|
||||
holiday.allerheiligen.date=20101101
|
||||
holiday.bussundbettag.name=Buss und Bettag (SN)
|
||||
holiday.bussundbettag.date=20101117
|
||||
holiday.heiligabend.name=Heilig Abend
|
||||
holiday.heiligabend.date=20101224
|
||||
holiday.weihnachtstag.name=Weihnachtstag
|
||||
holiday.weihnachtstag.date=20101225
|
||||
holiday.zweiterweihnachtstag.name=Zweiter Weihnachtstag
|
||||
holiday.zweiterweihnachtstag.date=20101226
|
||||
holiday.sylvester.name=Sylvester
|
||||
holiday.sylvester.date=20101231
|
||||
|
||||
# 2011
|
||||
holiday.neujahr.name=Neujahr
|
||||
holiday.neujahr.date=20110101
|
||||
holiday.heiligedreikonige.name=Heilige drei Könige (BW,BY,ST)
|
||||
holiday.heiligedreikonige.date=20110106
|
||||
holiday.karfreitag.name=Karfreitag
|
||||
holiday.karfreitag.date=20110422
|
||||
holiday.ostern.name=Ostern
|
||||
holiday.ostern.date=20110424
|
||||
holiday.ostermontag.name=Ostermontag
|
||||
holiday.ostermontag.date=20110425
|
||||
holiday.maifeiertag.name=Erster Maifeiertag
|
||||
holiday.maifeiertag.date=20110501
|
||||
holiday.christihimmelfahrt.name=Christi Himmelfahrt
|
||||
holiday.christihimmelfahrt.date=20110602
|
||||
holiday.pfingstsonntag.name=Pfingstsonntag
|
||||
holiday.pfingstsonntag.date=20110612
|
||||
holiday.pfingstmontag.name=Pfingstmontag
|
||||
holiday.pfingstmontag.date=20110613
|
||||
holiday.fronleichnam.name=Fronleichnam (BW,BY,HE,NRW,RP,SL,(SN,TH))
|
||||
holiday.fronleichnam.date=20110623
|
||||
holiday.mariahimmelfahrt.name=Mariä Himmelfahrt (SL)
|
||||
holiday.mariahimmelfahrt.date=20110815
|
||||
holiday.einheit.name=Tag der Deutschen Einheit
|
||||
holiday.einheit.date=20111003
|
||||
|
||||
#holiday.reformationstag.name=Reformationstag (BB,MV,SN,ST,TH)
|
||||
#holiday.reformationstag.date=20111031
|
||||
#holiday.allerheiligen.name=Allerheiligen (BW,BY,NRW,RP,SL)
|
||||
#holiday.allerheiligen.date=20111101
|
||||
#holiday.bussundbettag.name=Buss und Bettag (SN)
|
||||
#holiday.bussundbettag.date=20111116
|
||||
#holiday.heiligabend.name=Heilig Abend
|
||||
#holiday.heiligabend.date=20111224
|
||||
#holiday.weihnachtstag.name=Weihnachtstag
|
||||
#holiday.weihnachtstag.date=20111225
|
||||
#holiday.zweiterweihnachtstag.name=Zweiter Weihnachtstag
|
||||
#holiday.zweiterweihnachtstag.date=20111226
|
||||
#holiday.sylvester.name=Sylvester
|
||||
#holiday.sylvester.date=20111231
|
||||
73
doc/rc/holidays-ES.rc
Normal file
73
doc/rc/holidays-ES.rc
Normal file
@@ -0,0 +1,73 @@
|
||||
################################################################################
|
||||
# Sample calendar for Spain
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2010, Federico Hernandez.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
calendar.holidays=sparse
|
||||
|
||||
# 2010
|
||||
holiday.fiestanacional.name=Fiesta Nacional de España
|
||||
holiday.fiestanacional.date=20101012
|
||||
holiday.santos.name=Dia de todos los Santos
|
||||
holiday.santos.date=20101101
|
||||
holiday.constitucion.name=Dia de la Constitución
|
||||
holiday.constitucion.date=20101206
|
||||
holiday.concepcion.name=Inmaculada Concepción
|
||||
holiday.concepcion.date=20101208
|
||||
holiday.nochebuena.name=Noche Buena
|
||||
holiday.nochebuena.date=20101224
|
||||
holiday.navidad.name=Navidad
|
||||
holiday.navidad.date=20101225
|
||||
holiday.nochevieja.name=Noche Vieja
|
||||
holiday.nochevieja.date=20101231
|
||||
|
||||
# 2011
|
||||
holiday.anonuevo.name=Año Nuevo
|
||||
holiday.anonuevo.date=20110101
|
||||
holiday.reyes.name=Día de los Reyes
|
||||
holiday.reyes.date=20110106
|
||||
holiday.viernessanto.name=Viernes Santo
|
||||
holiday.viernessanto.date=20110422
|
||||
holiday.trabajo.name=Fiesta del Trabajo
|
||||
holiday.trabajo.date=20110501
|
||||
holiday.virgen.name=Asunción de la Virgen
|
||||
holiday.virgen.date=20110815
|
||||
|
||||
#holiday.fiestanacional.name=Fiesta Nacional de España
|
||||
#holiday.fiestanacional.date=20111012
|
||||
#holiday.santos.name=Dia de todos los Santos
|
||||
#holiday.santos.date=20111101
|
||||
#holiday.constitucion.name=Dia de la Constitución
|
||||
#holiday.constitucion.date=20111206
|
||||
#holiday.concepcion.name=Inmaculada Concepción
|
||||
#holiday.concepcion.date=20111208
|
||||
#holiday.nochebuena.name=Noche Buena
|
||||
#holiday.nochebuena.date=20111224
|
||||
#holiday.navidad.name=Navidad
|
||||
#holiday.navidad.date=20111225
|
||||
#holiday.nochevieja.name=Noche Vieja
|
||||
#holiday.nochevieja.date=20111231
|
||||
62
doc/rc/holidays-FR.rc
Normal file
62
doc/rc/holidays-FR.rc
Normal file
@@ -0,0 +1,62 @@
|
||||
################################################################################
|
||||
# Sample calendar for France
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2010, Paul Beckingham.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
calendar.holidays=sparse
|
||||
|
||||
# 2010
|
||||
holiday.toussaint.name=La Toussaint
|
||||
holiday.toussaint.date=20101101
|
||||
holiday.armistice.name=Jour d'armistice
|
||||
holiday.armistice.date=20101111
|
||||
holiday.noël.name=Noël
|
||||
holiday.noël.date=20101225
|
||||
|
||||
# 2011
|
||||
holiday.jourdelan.name=Jour de l'an
|
||||
holiday.jourdelan.date=20110101
|
||||
holiday.travail.name=Fête du premier mai
|
||||
holiday.travail.date=20110501
|
||||
holiday.victoire.name=la Fête de Victoire 45
|
||||
holiday.victoire.date=20110508
|
||||
holiday.ascencion.name=l'Ascencion
|
||||
holiday.ascencion.date=20110602
|
||||
holiday.pentecôte.name=la Pentecôte
|
||||
holiday.pentecôte.date=20110612
|
||||
holiday.bastille.name=Fête nationale
|
||||
holiday.bastille.date=20110714
|
||||
holiday.assomption.name=Assomption
|
||||
holiday.assomption.date=20110815
|
||||
|
||||
#holiday.toussaint.name=La Toussaint
|
||||
#holiday.toussaint.date=20111101
|
||||
#holiday.armistice.name=Jour d'armistice
|
||||
#holiday.armistice.date=20111111
|
||||
#holiday.noël.name=Noël
|
||||
#holiday.noël.date=20111225
|
||||
|
||||
101
doc/rc/holidays-NL.rc
Normal file
101
doc/rc/holidays-NL.rc
Normal file
@@ -0,0 +1,101 @@
|
||||
################################################################################
|
||||
# Sample calendar for the Netherlands
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2010, Charles T. Yun
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
calendar.holidays=sparse
|
||||
|
||||
# 2010
|
||||
holiday.sinterklaas.name=Sinterklaas
|
||||
holiday.sinterklaas.date=20101205
|
||||
holiday.koninkrijksdag.name=Koninkrijksdag
|
||||
holiday.koninkrijksdag.date=20101215
|
||||
holiday.kerstmis.name=Kerstmis
|
||||
holiday.kerstmis.date=20101225
|
||||
holiday.kerstmis.name=Tweede Kerstdag
|
||||
holiday.kerstmis.date=20101226
|
||||
|
||||
# 2011
|
||||
holiday.nieuwjaar.name=Nieuwjaar
|
||||
holiday.nieuwjaar.date=20110101
|
||||
holiday.goedevrijdag.name=Goede Vrijdag
|
||||
holiday.goedevrijdag.date=20110422
|
||||
holiday.pasen.name=Pasen
|
||||
holiday.pasen.date=20110424
|
||||
holiday.pasen.name=Tweede Paasdag
|
||||
holiday.pasen.date=20100425
|
||||
holiday.koninginnedag.name=Koninginnedag
|
||||
holiday.koninginnedag.date=20110430
|
||||
holiday.dodenherdenking.name=Dodenherdenking
|
||||
holiday.dodenherdenking.date=20110504
|
||||
holiday.bevrijdingsdag.name=Bevrijdingsdag
|
||||
holiday.bevrijdingsdag.date=20110505
|
||||
holiday.hemelvaartsdag.name=Hemelvaartsdag
|
||||
holiday.hemelvaartsdag.date=20110602
|
||||
holiday.pinksteren.name= Pinksteren
|
||||
holiday.pinksteren.date=20110612
|
||||
holiday.pinksteren.name=Tweede Pinksterdag
|
||||
holiday.pinksteren.date=20110613
|
||||
#holiday.sinterklaas.name=Sinterklaas
|
||||
#holiday.sinterklaas.date=20111205
|
||||
#holiday.koninkrijksdag.name=Koninkrijksdag
|
||||
#holiday.koninkrijksdag.date=20111215
|
||||
#holiday.kerstmis.name=Kerstmis
|
||||
#holiday.kerstmis.date=20111225
|
||||
#holiday.kerstmis.name=Tweede Kerstdag
|
||||
#holiday.kerstmis.date=20111226
|
||||
|
||||
# 2012
|
||||
#holiday.nieuwjaar.name=Nieuwjaar
|
||||
#holiday.nieuwjaar.date=20120101
|
||||
#holiday.goedevrijdag.name=Goede Vrijdag
|
||||
#holiday.goedevrijdag.date=20120406
|
||||
#holiday.pasen.name=Pasen
|
||||
#holiday.pasen.date=20120408
|
||||
#holiday.pasen.name=Tweede Pasdag
|
||||
#holiday.pasen.date=20120409
|
||||
#holiday.koninginnedag.name=Koninginnedag
|
||||
#holiday.koninginnedag.date=20120430
|
||||
#holiday.dodenherdenking.name=Dodenherdenking
|
||||
#holiday.dodenherdenking.date=20120504
|
||||
#holiday.bevrijdingsdag.name=Bevrijdingsdag
|
||||
#holiday.bevrijdingsdag.date=20120505
|
||||
#holiday.hemelvaartsdag.name=Hemelvaartsdag
|
||||
#holiday.hemelvaartsdag.date=20120617
|
||||
#holiday.pinksteren.name= Pinksteren
|
||||
#holiday.pinksteren.date=20120627
|
||||
#holiday.pinksteren.name=Tweede Pinksterdag
|
||||
#holiday.pinksteren.date=20120628
|
||||
#holiday.sinterklaas.name=Sinterklaas
|
||||
#holiday.sinterklaas.date=20121205
|
||||
#holiday.koninkrijksdag.name=Koninkrijksdag
|
||||
#holiday.koninkrijksdag.date=20121215
|
||||
#holiday.kerstmis.name=Kerstmis
|
||||
#holiday.kerstmis.date=20121225
|
||||
#holiday.kerstmis.name=Tweede Kerstdag
|
||||
#holiday.kerstmis.date=20121226
|
||||
|
||||
113
doc/rc/holidays-NO.rc
Normal file
113
doc/rc/holidays-NO.rc
Normal file
@@ -0,0 +1,113 @@
|
||||
################################################################################
|
||||
# Sample calendar for Norway
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2010, Jostein Berntsen
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
calendar.holidays=sparse
|
||||
|
||||
# 2010
|
||||
holiday.julaften.name=Julaften
|
||||
holiday.julaften.date=20101224
|
||||
holiday.juledag.name=Juledag
|
||||
holiday.juledag.date=20101225
|
||||
holiday.juledag2.name=Juledag
|
||||
holiday.juledag2.date=20101226
|
||||
holiday.nyttårsaften.name=Nyttårsaften
|
||||
holiday.nyttårsaften.date=20101231
|
||||
|
||||
# 2011
|
||||
holiday.nyttårsdag.name=Nyttårsdag
|
||||
holiday.nyttårsdag.date=20110101
|
||||
holiday.fastelavn.name=Fastelavn
|
||||
holiday.fastelavn.date=20110306
|
||||
holiday.palmesøndag.name=Palmesøndag
|
||||
holiday.palmesøndag.date=20110417
|
||||
holiday.skjærtorsdag.name=Skjærtorsdag
|
||||
holiday.skjærtorsdag.date=20110421
|
||||
holiday.langfredag.name=Langfredag
|
||||
holiday.langfredag.date=20110422
|
||||
holiday.påskedag.name=Påskedag
|
||||
holiday.påskedag.date=20110424
|
||||
holiday.påskedag2.name=Påskedag
|
||||
holiday.påskedag2.date=20110425
|
||||
holiday.offentlighøytidsdag.name=Offentlig Høytidsdag
|
||||
holiday.offentlighøytidsdag.date=20110501
|
||||
holiday.frigjøringsdag.name=Frigjøringsdag 1945
|
||||
holiday.frigjøringsdag.date=20110508
|
||||
holiday.grunnlovsdag.name=Grunnlovsdag
|
||||
holiday.grunnlovsdag.date=20110517
|
||||
holiday.KristiHimmelfartsdag.name=Kristi Himmelfartsdag
|
||||
holiday.KristiHimmelfartsdag.date=20110602
|
||||
holiday.pinsedag.name=Pinsedag
|
||||
holiday.pinsedag.date=20110612
|
||||
holiday.pinsedag2.name=Pinsedag
|
||||
holiday.pinsedag2.date=20110613
|
||||
#holiday.julaften.name=Julaften
|
||||
#holiday.julaften.date=20111224
|
||||
#holiday.juledag.name=Juledag
|
||||
#holiday.juledag.date=20111225
|
||||
#holiday.juledag2.name=Juledag
|
||||
#holiday.juledag2.date=20111226
|
||||
#holiday.nyttårsaften.name=Nyttårsaften
|
||||
#holiday.nyttårsaften.date=20111231
|
||||
|
||||
# 2012
|
||||
#holiday.nyttårsdag.name=Nyttårsdag
|
||||
#holiday.nyttårsdag.date=20120101
|
||||
#holiday.fastelavn.name=Fastelavn
|
||||
#holiday.fastelavn.date=20120219
|
||||
#holiday.palmesøndag.name=Palmesøndag
|
||||
#holiday.palmesøndag.date=20120401
|
||||
#holiday.skjærtorsdag.name=Skjærtorsdag
|
||||
#holiday.skjærtorsdag.date=20120405
|
||||
#holiday.langfredag.name=Langfredag
|
||||
#holiday.langfredag.date=20120406
|
||||
#holiday.påskedag.name=Påskedag
|
||||
#holiday.påskedag.date=20120408
|
||||
#holiday.påskedag2.name=Påskedag
|
||||
#holiday.påskedag2.date=20120409
|
||||
#holiday.offentlighøytidsdag.name=Offentlig Høytidsdag
|
||||
#holiday.offentlighøytidsdag.date=20120501
|
||||
#holiday.frigjøringsdag.name=Frigjøringsdag 1945
|
||||
#holiday.frigjøringsdag.date=20120508
|
||||
#holiday.grunnlovsdag.name=Grunnlovsdag
|
||||
#holiday.grunnlovsdag.date=20120517
|
||||
#holiday.KristiHimmelfartsdag.name=Kristi Himmelfartsdag
|
||||
#holiday.KristiHimmelfartsdag.date=20120517
|
||||
#holiday.pinsedag.name=Pinsedag
|
||||
#holiday.pinsedag.date=20120527
|
||||
#holiday.pinsedag2.name=Pinsedag
|
||||
#holiday.pinsedag2.date=20120528
|
||||
#holiday.julaften.name=Julaften
|
||||
#holiday.julaften.date=20121224
|
||||
#holiday.juledag.name=Juledag
|
||||
#holiday.juledag.date=20121225
|
||||
#holiday.juledag2.name=Juledag
|
||||
#holiday.juledag2.date=20121226
|
||||
#holiday.nyttårsaften.name=Nyttårsaften
|
||||
#holiday.nyttårsaften.date=20121231
|
||||
|
||||
79
doc/rc/holidays-SE.rc
Normal file
79
doc/rc/holidays-SE.rc
Normal file
@@ -0,0 +1,79 @@
|
||||
################################################################################
|
||||
# Sample calendar for Sweden
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2010, Federico Hernandez.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
calendar.holidays=sparse
|
||||
|
||||
# 2010
|
||||
holiday.allahelgonsdag.name=Alla Helgons Dag
|
||||
holiday.allahelgonsdag.date=20101106
|
||||
holiday.julafton.name=Julafton
|
||||
holiday.julafton.date=20101224
|
||||
holiday.juldagen.name=Juldagen
|
||||
holiday.juldagen.date=20101225
|
||||
holiday.annandagjul.name=Annandag jul
|
||||
holiday.annandagjul.date=20101226
|
||||
holiday.nyårsafton.name=Nyårsafton
|
||||
holiday.nyårsafton.date=20101231
|
||||
|
||||
# 2011
|
||||
holiday.nyårsdagen.name=Nyårsdagen
|
||||
holiday.nyårsdagen.date=20110101
|
||||
holiday.trettondedagjul.name=Trettondedag jul
|
||||
holiday.trettondedagjul.date=20110106
|
||||
holiday.långfredagen.name=Långfredagen
|
||||
holiday.långfredagen.date=20110422
|
||||
holiday.påskdagen.name=Påskdagen
|
||||
holiday.påskdagen.date=20110424
|
||||
holiday.annandagpåsk.name=Annandag påsk
|
||||
holiday.annandagpåsk.date=20110425
|
||||
holiday.valborgmässoafton.name=Valborgmässoafton
|
||||
holiday.valborgmässoafton.date=20110430
|
||||
holiday.förstamaj.name=Första maj
|
||||
holiday.förstamaj.date=20110501
|
||||
holiday.kristihimmelfärdsdag.name=Kristi Himmelsfärdsdag
|
||||
holiday.kristihimmelfärdsdag.date=20110602
|
||||
holiday.nationaldagen.name=Nationaldagen
|
||||
holiday.nationaldagen.date=20110606
|
||||
holiday.pingstdagen.name=Pingstdagen
|
||||
holiday.pingstdagen.date=20110612
|
||||
holiday.midsommarafton.name=Midsommarafton
|
||||
holiday.midsommarafton.date=20110624
|
||||
holiday.midsommardagen.name=Midsommardagen
|
||||
holiday.midsommardagen.date=20110625
|
||||
|
||||
# holiday.allahelgonsdag.name=Alla Helgons Dag
|
||||
# holiday.allahelgonsdag.date=20111105
|
||||
# holiday.julafton.name=Julafton
|
||||
# holiday.julafton.date=20111224
|
||||
# holiday.juldagen.name=Juldagen
|
||||
# holiday.juldagen.date=20111225
|
||||
# holiday.annandagjul.name=Annandag jul
|
||||
# holiday.annandagjul.date=20111226
|
||||
# holiday.nyårsafton.name=Nyårsafton
|
||||
# holiday.nyårsafton.date=20111231
|
||||
56
doc/rc/holidays-UK.rc
Normal file
56
doc/rc/holidays-UK.rc
Normal file
@@ -0,0 +1,56 @@
|
||||
################################################################################
|
||||
# Sample calendar for the UK
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2010, Federico Hernandez.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
calendar.holidays=sparse
|
||||
|
||||
# 2010
|
||||
holiday.christmas.name=Christmas Day
|
||||
holiday.christmas.date=20101225
|
||||
holiday.boxingday.name=Boxing Day
|
||||
holiday.boxingday.date=20101226
|
||||
|
||||
# 2011
|
||||
holiday.newyear.name=New Year's Day
|
||||
holiday.newyear.date=20110101
|
||||
holiday.goodfriday.name=Good Friday
|
||||
holiday.goodfriday.date=20110422
|
||||
holiday.eastermonday.name=Easter Monday
|
||||
holiday.eastermonday.date=20110425
|
||||
holiday.may.name=Early May Bank Holiday
|
||||
holiday.may.name=20110502
|
||||
holiday.spring.name=Spring Bank Holiday
|
||||
holiday.spring.name=20110530
|
||||
holiday.august.name=August Bank Holiday
|
||||
holiday.august.name=20110829
|
||||
|
||||
#holiday.christmas.name=Christmas Day
|
||||
#holiday.christmas.date=20111225
|
||||
#holiday.boxingday.name=Boxing Day
|
||||
#holiday.boxingday.date=20111226
|
||||
|
||||
72
doc/rc/holidays-US.rc
Normal file
72
doc/rc/holidays-US.rc
Normal file
@@ -0,0 +1,72 @@
|
||||
################################################################################
|
||||
# Sample calendar for the US
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2010, Federico Hernandez.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
calendar.holidays=sparse
|
||||
|
||||
# 2010
|
||||
holiday.laborday.name=Labor Day
|
||||
holiday.laborday.date=20100906
|
||||
holiday.columbusday.name=Columbus Day
|
||||
holiday.columbusday.date=20101011
|
||||
holiday.veteransdays.name=Veterans Day
|
||||
holiday.veteransdays.date=20101111
|
||||
holiday.thanksgiving.name=Thanksgiving Day
|
||||
holiday.thanksgiving.date=20101125
|
||||
holiday.christmasday.name=Christmas Day
|
||||
holiday.christmasday.date=20101225
|
||||
holiday.newyearseve.name=New Year's Eve
|
||||
holiday.newyearseve.date=20101231
|
||||
|
||||
# 2011
|
||||
holiday.newyearsday.name=New Year's Day
|
||||
holiday.newyearsday.date=20110101
|
||||
holiday.martinlutherkingday.name=Birthday of Martin Luther King, Jr.
|
||||
holiday.martinlutherkingday.date=20110117
|
||||
holiday.presidentsday.name=Washington's Birthday
|
||||
holiday.presidentsday.date=20110221
|
||||
holiday.patriotsday.name=Patriots' Day
|
||||
holiday.patriotsday.date=20110419
|
||||
holiday.memorialday.name=Memorial Day
|
||||
holiday.memorialday.date=20110530
|
||||
holiday.independenceday.name=Independence Day
|
||||
holiday.independenceday.date=20110704
|
||||
|
||||
# holiday.laborday.name=Labor Day
|
||||
# holiday.laborday.date=20110905
|
||||
# holiday.columbusday.name=Columbus Day
|
||||
# holiday.columbusday.date=20111010
|
||||
# holiday.veteransdays.name=Veterans Day
|
||||
# holiday.veteransdays.date=20111111
|
||||
# holiday.thanksgiving.name=Thanksgiving Day
|
||||
# holiday.thanksgiving.date=20111124
|
||||
# holiday.christmasday.name=Christmas Day
|
||||
# holiday.christmasday.date=20111225
|
||||
# holiday.newyearseve.name=New Year's Eve
|
||||
# holiday.newyearseve.date=20111231
|
||||
|
||||
67
doc/rc/light-16.theme
Normal file
67
doc/rc/light-16.theme
Normal file
@@ -0,0 +1,67 @@
|
||||
###############################################################################
|
||||
# Sample taskwarrior 1.9 (or later) light 16-color theme
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006 - 2010, Paul Beckingham.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
|
||||
color=on
|
||||
color.header=blue
|
||||
color.footnote=blue
|
||||
color.debug=blue
|
||||
|
||||
color.summary.bar=on green
|
||||
color.summary.background=on black
|
||||
|
||||
color.history.add=black on red
|
||||
color.history.done=black on green
|
||||
color.history.delete=black on yellow
|
||||
|
||||
color.undo.before=red
|
||||
color.undo.after=green
|
||||
|
||||
color.calendar.today=black on bright blue
|
||||
color.calendar.due=white on red
|
||||
color.calendar.due.today=bold white on red
|
||||
color.calendar.overdue=black on bright red
|
||||
color.calendar.weekend=white on bright black
|
||||
color.calendar.holiday=black on yellow
|
||||
color.calendar.weeknumber=bold blue
|
||||
|
||||
color.recurring=blue
|
||||
color.overdue=bold red
|
||||
color.due.today=red
|
||||
color.due=red
|
||||
color.active=black on green
|
||||
color.pri.none=
|
||||
color.pri.H=bold black
|
||||
color.pri.M=black
|
||||
color.pri.L=
|
||||
color.tagged=green
|
||||
color.blocked=white on black
|
||||
color.project.none=
|
||||
color.tag.none=
|
||||
color.alternate=
|
||||
|
||||
66
doc/rc/light-256.theme
Normal file
66
doc/rc/light-256.theme
Normal file
@@ -0,0 +1,66 @@
|
||||
###############################################################################
|
||||
# Sample taskwarrior 1.9 (or later) light 256-color theme
|
||||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006 - 2010, Paul Beckingham.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
################################################################################
|
||||
color=on
|
||||
color.header=color4
|
||||
color.footnote=color4
|
||||
color.debug=color4
|
||||
|
||||
color.summary.bar=on rgb141
|
||||
color.summary.background=on color0
|
||||
|
||||
color.history.add=color0 on rgb500
|
||||
color.history.done=color0 on rgb050
|
||||
color.history.delete=color0 on rgb550
|
||||
|
||||
color.undo.before=color1
|
||||
color.undo.after=color2
|
||||
|
||||
color.calendar.today=color15 on rgb013
|
||||
color.calendar.due=color0 on color9
|
||||
color.calendar.due.today=color15 on color1
|
||||
color.calendar.overdue=color0 on color1
|
||||
color.calendar.weekend=on color253
|
||||
color.calendar.holiday=color0 on color3
|
||||
color.calendar.weeknumber=rgb013
|
||||
|
||||
color.recurring=rgb013
|
||||
color.overdue=color1
|
||||
color.due.today=rgb400
|
||||
color.due=color9
|
||||
color.active=rgb555 on rgb520
|
||||
color.pri.none=
|
||||
color.pri.H=color232
|
||||
color.pri.M=color237
|
||||
color.pri.L=color242
|
||||
color.tagged=rgb020
|
||||
color.blocked=gray12 on gray4
|
||||
color.project.none=
|
||||
color.tag.none=
|
||||
color.alternate=on color254
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# This is an example strings.en-US file.
|
||||
#
|
||||
# The task program has a built-in set of default strings, which are UTF8 encoded
|
||||
# for the en-US locale. A file such as this is used to override those defaults.
|
||||
# This means that a strings file is merely a delta applied to the built-in
|
||||
# strings, so an empty string file means you get en-US.
|
||||
# The taskwarrior program has a built-in set of default strings, which are UTF8
|
||||
# encoded for the en-US locale. A file such as this is used to override those
|
||||
# defaults. This means that a strings file is merely a delta applied to the
|
||||
# built-in strings, so an empty string file means you get en-US.
|
||||
#
|
||||
# To use another string file, add the following entry to your .taskrc file:
|
||||
#
|
||||
@@ -18,7 +18,7 @@
|
||||
105 Inverted sequence range high-low
|
||||
106 ID Range too large
|
||||
107 Not a sequence.
|
||||
108 Interactive task is only available when built with ncurses support.
|
||||
108 Interactive mode is only available when built with ncurses support.
|
||||
109 Empty record in input
|
||||
110 Unrecognized characters at end of line
|
||||
111 Record not recognized as format 4
|
||||
@@ -40,13 +40,12 @@
|
||||
208 done
|
||||
209 duplicate
|
||||
210 edit
|
||||
211 export
|
||||
|
||||
212 help
|
||||
213 history
|
||||
214 ghistory
|
||||
|
||||
215 import
|
||||
216 info
|
||||
|
||||
217 prepend
|
||||
218 overdue
|
||||
219 projects
|
||||
220 start
|
||||
@@ -55,10 +54,14 @@
|
||||
223 summary
|
||||
224 tags
|
||||
225 timesheet
|
||||
|
||||
226 log
|
||||
227 undo
|
||||
228 version
|
||||
229 shell
|
||||
230 config
|
||||
231 show
|
||||
|
||||
235 diagnostics
|
||||
|
||||
# 3xx Attributes - must be sequential
|
||||
300 project
|
||||
@@ -99,57 +102,20 @@
|
||||
# 5xx Colors
|
||||
500 bold
|
||||
501 underline
|
||||
502 bold_underline
|
||||
503 black
|
||||
504 red
|
||||
505 green
|
||||
506 yellow
|
||||
507 blue
|
||||
508 magenta
|
||||
509 cyan
|
||||
510 white
|
||||
511 bold_black
|
||||
512 bold_red
|
||||
513 bold_green
|
||||
514 bold_yellow
|
||||
515 bold_blue
|
||||
516 bold_magenta
|
||||
517 bold_cyan
|
||||
518 bold_white
|
||||
519 underline_black
|
||||
520 underline_red
|
||||
521 underline_green
|
||||
522 underline_yellow
|
||||
523 underline_blue
|
||||
524 underline_magenta
|
||||
525 underline_cyan
|
||||
526 underline_white
|
||||
527 bold_underline_black
|
||||
528 bold_underline_red
|
||||
529 bold_underline_green
|
||||
530 bold_underline_yellow
|
||||
531 bold_underline_blue
|
||||
532 bold_underline_magenta
|
||||
533 bold_underline_cyan
|
||||
534 bold_underline_white
|
||||
535 on_black
|
||||
536 on_red
|
||||
537 on_green
|
||||
538 on_yellow
|
||||
539 on_blue
|
||||
540 on_magenta
|
||||
541 on_cyan
|
||||
542 on_white
|
||||
543 on_bright_black
|
||||
544 on_bright_red
|
||||
545 on_bright_green
|
||||
546 on_bright_yellow
|
||||
547 on_bright_blue
|
||||
548 on_bright_magenta
|
||||
549 on_bright_cyan
|
||||
550 on_bright_white
|
||||
551 off
|
||||
552 Unknown color name
|
||||
502 on
|
||||
503 bright
|
||||
|
||||
504 black
|
||||
505 red
|
||||
506 green
|
||||
507 yellow
|
||||
508 blue
|
||||
509 magenta
|
||||
510 cyan
|
||||
511 white
|
||||
|
||||
520 off
|
||||
521 Unknown color name
|
||||
|
||||
# 6xx Config
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# This is an example strings.en-US file.
|
||||
#
|
||||
# The task program has a built-in set of default strings, which are UTF8 encoded
|
||||
# for the en-US locale. A file such as this is used to override those defaults.
|
||||
# This means that a strings file is merely a delta applied to the built-in
|
||||
# strings, so an empty string file means you get en-US.
|
||||
# The taskwarrior program has a built-in set of default strings, which are UTF8
|
||||
# encoded for the en-US locale. A file such as this is used to override those
|
||||
# default. This means that a strings file is merely a delta applied to the
|
||||
# built-in strings, so an empty string file means you get en-US.
|
||||
#
|
||||
# To use another string file, add the following entry to your .taskrc file:
|
||||
#
|
||||
|
||||
@@ -1,5 +1,72 @@
|
||||
%
|
||||
first tip
|
||||
For bash users, try 'alias t=task' to save some keystrokes.
|
||||
%
|
||||
second tip
|
||||
Have you tried 'task edit 1' to use your text editor to modify all aspects of
|
||||
task 1?
|
||||
%
|
||||
Did you know that 'task 1 wait:eom' will hide task 1 until the end of the
|
||||
month? You can then see all waiting tasks with 'task waiting'.
|
||||
%
|
||||
Did you know that 'task 1 wait:' will restore a waiting task to pending status?
|
||||
%
|
||||
If you put 'default.command=list project:home' in your .taskrc file, then just
|
||||
running 'task' will automatically run 'task list project:home' for you. Save
|
||||
some keystrokes!
|
||||
%
|
||||
If you edit your pending.data file, make sure that your text editor doesn't
|
||||
strip the trailing \n characters from the end of the file.
|
||||
%
|
||||
If you must edit your pending.data file, make sure that your text editor doesn't
|
||||
convert from a Unix to a DOS file encoding.
|
||||
%
|
||||
Did you build task from source? If you didn't have ncurses installed at the
|
||||
time, then you're missing out on text wrapping and task cannot take advantage of
|
||||
the full terminal width. Consider rebuilding with ncurses installed, or install
|
||||
from a pre-built package for your OS.
|
||||
%
|
||||
Do you have the latest version of task installed? Check http://taskwarrior.org
|
||||
periodically for news of updates. That feature you wanted might be ready...
|
||||
%
|
||||
Don't forget the online docs at http://taskwarrior.org/wiki/taskwarrior, and if
|
||||
you find errors, please let us know. Then again, it is a wiki, so feel free to
|
||||
correct them yourself.
|
||||
%
|
||||
Don't forget the online docs at http://taskwarrior.org/wiki/taskwarrior, but if
|
||||
you cannot find documentation on a particular topic, either create a ticket
|
||||
requesting it, email support@taskwarrior.org asking for it, or start it
|
||||
yourself.
|
||||
%
|
||||
Did you know there are man pages for task? Try 'man task', 'man taskrc',
|
||||
'man task-tutorial', 'man task-color' and 'man task-faq'.
|
||||
%
|
||||
Did you know there are several 256-color themes available for task?
|
||||
%
|
||||
Did you know that running 'task show' will perform various checks on your
|
||||
.taskrc file, looking for errors?
|
||||
%
|
||||
Are you making the most of color? Try 'task color' to see what colors your
|
||||
system supports.
|
||||
%
|
||||
Are you using projects? If you do, taskwarrior will keep track of the project
|
||||
completion percentage and report it to you whenever it changes.
|
||||
%
|
||||
Did you know you can list tasks that have priorities like 'task list
|
||||
priority.above:L'?
|
||||
%
|
||||
The http://tasktools.org/latest URL can tell you which is the latest version.
|
||||
%
|
||||
To make your task list clear and actionable, always describe it starting with a
|
||||
verb, like "call" or "clean" or "get".
|
||||
%
|
||||
Don't like the name of a command? Create an alias.
|
||||
%
|
||||
You can choose whether your searches are case sensitive or not, by running
|
||||
'task config search.case.sensitive yes'
|
||||
%
|
||||
Back up your data files by making copies of the ~/.taskrc file and ~/.task
|
||||
directory.
|
||||
%
|
||||
Accidentally changed a task? The undo command makes it a breeze to recover from
|
||||
any inadvertent change -- even a deletion!
|
||||
%
|
||||
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
%
|
||||
första tips
|
||||
För bash användare, med 'alias t=task' kan du spara på nedslagningar på tangentbordet.
|
||||
%
|
||||
andra tips
|
||||
Har du försökt att använda 'task edit 1' för att ändra alla aspekter av task 1 i din texteditor?
|
||||
%
|
||||
Med 'task 1 wait:eom' kan du göma task 1 fram till slutet av månaden. För att se
|
||||
alla task som väntar kan du använda 'task waiting'.
|
||||
%
|
||||
Visste du att 'task 1 wait:' återställa en väntande task till "peding" igen?
|
||||
%
|
||||
Skriv 'default.command=list project:home' i din .taskrc fil. När du sen använder
|
||||
'task' körs det en 'task list project:home' istäälet för dig. Spara på nedslagningar
|
||||
på tangetbordet.
|
||||
%
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Name: task
|
||||
Version: 1.8.1
|
||||
Version: 1.9.1
|
||||
Release: 1%{?dist}
|
||||
Summary: A command-line to do list manager
|
||||
|
||||
@@ -17,7 +17,7 @@ support for GTD functionality and includes the
|
||||
following features: tags, colorful tabular output,
|
||||
reports and graphs, lots of manipulation commands,
|
||||
low-level API, abbreviations for all commands and
|
||||
options, multiuser file locking, recurring tasks.
|
||||
options, multi-user file locking, recurring tasks.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
@@ -40,15 +40,37 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS ChangeLog COPYING NEWS README scripts i18n
|
||||
%doc AUTHORS ChangeLog COPYING NEWS README scripts i18n doc/rc
|
||||
%{_bindir}/task
|
||||
%{_mandir}/man1/task.1.gz
|
||||
%{_mandir}/man5/taskrc.5.gz
|
||||
%{_mandir}/man5/task-tutorial.5.gz
|
||||
%{_mandir}/man5/task-color.5.gz
|
||||
%{_mandir}/man5/task-faq.5.gz
|
||||
%config(noreplace) %{_sysconfdir}/bash_completion.d
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon May 22 2010 Federico Hernandez <ultrafredde@gmail.com> - 1.9.1-1
|
||||
Intial RPM for task beta release 1.9.1
|
||||
* Mon Feb 22 2010 Federico Hernandez <ultrafredde@gmail.com> - 1.9.0-1
|
||||
Intial RPM for task beta release 1.9.0
|
||||
* Mon Feb 15 2010 Federico Hernandez <ultrafredde@gmail.com> - 1.9.0.beta3-1
|
||||
Intial RPM for task beta release 1.9.0.beta3
|
||||
* Mon Feb 08 2010 Federico Hernandez <ultrafredde@gmail.com> - 1.9.0.beta2-1
|
||||
Intial RPM for task beta release 1.9.0.beta2
|
||||
* Wed Feb 03 2010 Federico Hernandez <ultrafredde@gmail.com> - 1.9.0.beta1-1
|
||||
Intial RPM for task beta release 1.9.0.beta1
|
||||
* Sat Dec 05 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.8.5-2
|
||||
Fixed wrong ChangeLog file
|
||||
* Sat Dec 05 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.8.5-1
|
||||
Intial RPM for task bugfix release 1.8.5
|
||||
* Tue Nov 17 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.8.4-1
|
||||
Intial RPM for task bugfix release 1.8.4
|
||||
* Wed Oct 21 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.8.3-1
|
||||
Intial RPM for task bugfix release 1.8.3
|
||||
* Mon Sep 07 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.8.2-1
|
||||
Intial RPM for task bugfix release 1.8.2
|
||||
* Thu Aug 20 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.8.1-1
|
||||
Intial RPM for task bugfix release 1.8.1
|
||||
* Tue Jul 21 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.8.0-1
|
||||
@@ -60,12 +82,12 @@ rm -rf $RPM_BUILD_ROOT
|
||||
* Tue Jul 07 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.8.0.beta1-1
|
||||
Intial RPM for task beta release 1.8.0.beta1
|
||||
* Tue Jun 08 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.7.1-2
|
||||
- Fixed inclusion of manpages.
|
||||
Fixed inclusion of manpages.
|
||||
* Tue Jun 08 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.7.1-1
|
||||
- Initial RPM for bugfix release 1.7.1.
|
||||
- Updated references to new project homepage in spec file.
|
||||
Initial RPM for bugfix release 1.7.1.
|
||||
Updated references to new project homepage in spec file.
|
||||
* Tue May 19 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.7.0-2
|
||||
- Changed license to GPLv2+ and removed Requires macro.
|
||||
- See https://bugzilla.redhat.com/show_bug.cgi?id=501498
|
||||
Changed license to GPLv2+ and removed Requires macro.
|
||||
See https://bugzilla.redhat.com/show_bug.cgi?id=501498
|
||||
* Tue May 19 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.7.0-1
|
||||
- Initial RPM.
|
||||
Initial RPM.
|
||||
|
||||
BIN
package-config/osx/OSX-packaging.pdf
Normal file
BIN
package-config/osx/OSX-packaging.pdf
Normal file
Binary file not shown.
280
package-config/osx/README
Normal file
280
package-config/osx/README
Normal file
@@ -0,0 +1,280 @@
|
||||
How to make an OSX package
|
||||
--------------------------
|
||||
|
||||
Note: This is being written from the OSX 10.6 perspective, and may therefore
|
||||
contain steps that are different for 10.5, although I don't recall any
|
||||
actual differences.
|
||||
|
||||
|
||||
0. Philosophy
|
||||
|
||||
Only Fredde tags releases. We only make builds from tagged commits. We
|
||||
only release builds that build cleanly without errors or warnings. We only
|
||||
release builds that pass 100% of the unit tests.
|
||||
|
||||
|
||||
1. Prerequisites
|
||||
|
||||
You will need an Intel Mac, running OSX 10.5 or later.
|
||||
You will need to install the Developer Tools, which are found on your OSX DVD.
|
||||
You will need git installed, version 1.5 or later. See http://git-scm.com
|
||||
You will need autotools installed. See http://www.gnu.org/software/autoconf
|
||||
|
||||
2. Get the code
|
||||
|
||||
2.1 Clone the task git repository. It is important that this is a throwaway
|
||||
clone of the repository, because we will do (locally) destructive things
|
||||
to it.
|
||||
|
||||
$ git clone git://tasktools.org/task.git ~/task-package.git
|
||||
...
|
||||
$ cd ~/task-package.git
|
||||
|
||||
2.2 Making sure you have the right version of the code. This assumes you are
|
||||
building taskwarrior 1.9.2, but any version number is interchangeable.
|
||||
Check out the correct branch, and make sure it is sitting at the correct
|
||||
commit, via a tag. Note that while 1.9.2 is a branch name, v1.9.2 is a tag
|
||||
name.
|
||||
|
||||
$ git checkout 1.9.2
|
||||
$ git reset --hard v1.9.2
|
||||
|
||||
If there is an error in this step, stop, capture the output, and report the
|
||||
errors.
|
||||
|
||||
3. Build taskwarrior
|
||||
|
||||
3.1 First build the task binary. Note the "-j 2" tells make to use both cores
|
||||
in your dual-core Intel CPU, which means faster compiles. If you own a quad
|
||||
core Mac, use "-j 4". If you own a single core Mac, just type "make".
|
||||
|
||||
$ autoreconf -f
|
||||
$ ./configure
|
||||
...
|
||||
|
||||
If any errors are reported, stop, capture the output, and report the errors.
|
||||
|
||||
$ make -j 2
|
||||
|
||||
If there are any errors, or there are any warnings generated by the compiler
|
||||
stop, capture the output, and report the problem. You'll need to watch as
|
||||
it builds.
|
||||
|
||||
4. Build the test suite
|
||||
|
||||
4.1 The test suite exists to prove that we do not break taskwarrior features
|
||||
from one release to the next. While this is not a perfect solution, it has
|
||||
saved us many times from releasing code that is inferior.
|
||||
|
||||
The first step is to modify the test suite Makefile to remove the Lua line.
|
||||
This is because we do not yet have dynamic detection of the Lua library for
|
||||
the unit tests.
|
||||
|
||||
$ cd ~/task-package.git/src/tests
|
||||
$ vi Makefile
|
||||
|
||||
Any text editor will do, but look for this line (line 5):
|
||||
|
||||
LFLAGS = -L/usr/local/lib -lncurses -llua
|
||||
|
||||
and change it to:
|
||||
|
||||
LFLAGS = -L/usr/local/lib -lncurses
|
||||
|
||||
Now build the unit tests:
|
||||
|
||||
$ make -j 2
|
||||
...
|
||||
|
||||
4.2 Run all the unit tests.
|
||||
|
||||
$ ./run_all
|
||||
Skipping benchmarks
|
||||
|
||||
Pass: 4241
|
||||
Fail: 0
|
||||
Skipped: 0
|
||||
Runtime: 86
|
||||
|
||||
The output should look something like this, with 0 failed, and 0 skipped
|
||||
tests. If there are any failures or skips, stop and mailed the log file,
|
||||
named 'all.log' to Paul & Fredde.
|
||||
|
||||
5. Assemble the parts
|
||||
|
||||
5.1 There is a script that copies all the necessary files (binary, man pages
|
||||
etc) in the right place, ready for packaging. Run this:
|
||||
|
||||
$ cd ~/task-package.git/package-config/osx
|
||||
$ ./update
|
||||
|
||||
6. Adjust the package details
|
||||
|
||||
6.1 Launch the package manager.
|
||||
|
||||
$ open -a /Developer/Applications/Utilities/PackageManager.app
|
||||
|
||||
6.2 Close the 'Untitled' window that opens - we will be using a different
|
||||
file. Note that PackageManager is still running - it just has no windows.
|
||||
|
||||
6.3 Using the File -> Open menu, open the file
|
||||
|
||||
~/task-package.git/package-config/osx/task.pmdoc
|
||||
|
||||
<figure 1>
|
||||
|
||||
This is the file from the last time a package was created. It needs some
|
||||
adjustments. Start by clicking on the "Taskwarrior x.x.x Distribution" with
|
||||
a package icon in the top left part of the window.
|
||||
|
||||
6.4 Click on the "Configuration" button/tab.
|
||||
|
||||
- Change the "Title" to "Taskwarrior 1.9.2"
|
||||
- Change the "Description" to "Taskwarrior 1.9.2 install for Snow Leopard"
|
||||
|
||||
<figure 2>
|
||||
|
||||
6.5 Click on "Edit Interface..."
|
||||
|
||||
There are 5 radio buttons on the left hand side - we will visit each and
|
||||
make changes. Click on "Background", make sure it matches the figure.
|
||||
|
||||
<figure 3>
|
||||
|
||||
Click on "Introduction", make sure it matches the figure.
|
||||
|
||||
<figure 4>
|
||||
|
||||
Click on "Read Me", and on the right hand side, under "Read Me Panel", click
|
||||
on "File" and select the file:
|
||||
|
||||
/Users/<your-account>/task-package.git/package-config/osx/README.txt
|
||||
|
||||
<figure 5>
|
||||
|
||||
Click on "License", and on the right hand side, under "License Panel", click
|
||||
on "File" and select the file:
|
||||
|
||||
/Users/<your-account>/task-package.git/package-config/osx/COPYING.txt
|
||||
|
||||
<figure 6>
|
||||
|
||||
Click on "Finish Up", and make sure it matches the figure.
|
||||
|
||||
<figure 7>
|
||||
|
||||
Close the Interface Editor window (it saves automatically).
|
||||
|
||||
6.6 Back in the "task.pmdoc" window, click on the "Requirements" tab/button,
|
||||
then click on the "+" button, and add a requirement rule as shown in the
|
||||
figure. The minimum system should be 10.5.0 or 10.6.0, depending on which
|
||||
package is being built.
|
||||
|
||||
<figure 8>
|
||||
|
||||
6.7 Click on the "Actions" tab/button and make sure it matches the figure.
|
||||
|
||||
<figure 9>
|
||||
|
||||
6.8 Click on the triangle next to the "local" item in the "Contents" vertical
|
||||
bar on the left to expand and show a folder called "local", with the path
|
||||
"/usr/local", but click on the "local" next to the blue radio button, not
|
||||
the one next to the folder. Then click on the "Configuration" tab/button.
|
||||
|
||||
- Change the "Choice Name" to "local"
|
||||
- Leave the "Identifier" alone - it is automatic
|
||||
- Make sure "Selected" and "Enabled" are checked, but "Hidden" is not
|
||||
|
||||
<figure 10>
|
||||
|
||||
6.9 Click on the "Requirements" tab/button and make sure it is all blank.
|
||||
|
||||
<figure 11>
|
||||
|
||||
6.10 Click on the blue folder on the left, which is labelled "local", and has
|
||||
a path of "/usr/local". Click on the "Configuration" tab/button.
|
||||
|
||||
- Change the "Install" to /Users/<your-account>/task-package.git/package-config/osx/local
|
||||
- Make sure the "Destination" is "/usr/local"
|
||||
- Make sure "Allow custom location" is checked
|
||||
- Make sure the "Package Identifier is "com.beckingham.task192.local.pkg"
|
||||
- Make sure the "Package Version" is 1.0. If you needed to make a
|
||||
subsequent OSX package, *for the same version of task*, then this number
|
||||
would be increased to show OSX that this package supersedes the earlier
|
||||
one
|
||||
- Make sure "Restart Action" is "None"
|
||||
- Make sure "Require admin authentication" is checked
|
||||
- Make sure "Package Location" is "Self-Contained"
|
||||
|
||||
<figure 12>
|
||||
|
||||
6.11 Click on the "Contents" tab/button.
|
||||
|
||||
- Click on all the triangles in the "local" folder to expand all directories
|
||||
- Make sure "Include root in package is not checked"
|
||||
- Click on the "Apply Recommendations" button
|
||||
|
||||
Make sure it matches the figure.
|
||||
|
||||
<figure 13>
|
||||
|
||||
6.12 Click on the "Components" tab/button, make sure it is all blank.
|
||||
|
||||
6.13 Click on the "Scripts" tab/button, make sure it is all blank.
|
||||
|
||||
7. Building the package
|
||||
|
||||
7.1 Click on the "Build" hammer icon to build the package.
|
||||
|
||||
Provide a filename of "task-1.9.1-sl.pkg" for Snow Leopard (10.6), or
|
||||
"task-1.9.2.pkg" for Leopard (10.5), and save it somewhere, for example the
|
||||
Desktop.
|
||||
|
||||
All should succeed. You can click on the "Return" button to end the build
|
||||
phase, and you can quit PackageManager, but make sure you save the changes
|
||||
you made, because you may need to go through the whole process again, if there
|
||||
is an emergency change, or the package is somehow corrupt.
|
||||
|
||||
<figure 14>
|
||||
|
||||
8. Test the package
|
||||
|
||||
8.1 Double-click on the package you just created, and install taskwarrior.
|
||||
You should see the README file in the UI, and the COPYING file on another
|
||||
page. It should succeed.
|
||||
|
||||
<figure 14>
|
||||
<figure 15>
|
||||
<figure 16>
|
||||
<figure 17>
|
||||
<figure 18>
|
||||
<figure 19>
|
||||
<figure 20>
|
||||
<figure 21>
|
||||
|
||||
8.2 Run the following commands to test the installation
|
||||
|
||||
$ /usr/local/bin/task version
|
||||
|
||||
task 1.9.2 built for darwin-ncurses
|
||||
Copyright (C) 2006 - 2010 P. Beckingham, F. Hernandez.
|
||||
|
||||
Taskwarrior may be copied only under the terms of the GNU General Public
|
||||
License, which may be found in the taskwarrior source kit.
|
||||
|
||||
Documentation for taskwarrior can be found using 'man task', 'man taskrc',
|
||||
'man task-tutorial', 'man task-color', 'man task-faq' or at
|
||||
http://taskwarrior.org
|
||||
|
||||
$ man task
|
||||
...
|
||||
...
|
||||
task 1.9.2 2010-05-22 task 1.9.2
|
||||
|
||||
The man page should list 1.9.2 as the version number, but the date will be
|
||||
different.
|
||||
|
||||
9. Email the package to Fredde.
|
||||
|
||||
---
|
||||
|
||||
@@ -1,281 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
|
||||
Thank you for taking a look at task!
|
||||
|
||||
Task is a GTD, todo list, task management, command line utility with a multitude
|
||||
of features. It is a portable, well supported, very active project, and it is
|
||||
Open Source. Task has binary distributions, online documentation, demonstration
|
||||
movies, and you'll find all the details at the site:
|
||||
|
||||
http://taskwarrior.org
|
||||
|
||||
At the site you'll find a wiki, discussion forums, downloads, news and more.
|
||||
|
||||
|
||||
Your contributions are especially welcome. Whether it comes in the form of
|
||||
code patches, ideas, discussion, bug reports or just encouragement, your input
|
||||
is needed.
|
||||
|
||||
Please send your support questions and code patches to:
|
||||
|
||||
support@taskwarrior.org
|
||||
|
||||
Consider joining taskwarrior.org and participating in the future of task.
|
||||
|
||||
---
|
||||
1
package-config/osx/task.pmdoc/01local-contents.xml
Normal file
1
package-config/osx/task.pmdoc/01local-contents.xml
Normal file
@@ -0,0 +1 @@
|
||||
<pkg-contents spec="1.12"><f n="local" o="root" g="wheel" p="16877" pt="/Users/paul/task-1.9.1.git/package-config/osx/local" m="false" t="file"><f n="bin" o="root" g="wheel" p="16877"><f n="task" o="root" g="wheel" p="33261"/></f><f n="share" o="root" g="wheel" p="16877"><f n="doc" o="root" g="wheel" p="16877"><f n="task" o="root" g="wheel" p="16877"><f n="AUTHORS" o="root" g="wheel" p="33188"/><f n="ChangeLog" o="root" g="wheel" p="33188"/><f n="COPYING" o="root" g="wheel" p="33188"/><f n="NEWS" o="root" g="wheel" p="33188"/><f n="README" o="root" g="wheel" p="33188"/><f n="scripts" o="root" g="wheel" p="16877"><f n="bash" o="root" g="wheel" p="16877"><f n="task_completion.sh" o="root" g="wheel" p="33188"/></f><f n="vim" o="root" g="wheel" p="16877"><f n="ftdetect" o="root" g="wheel" p="16877"><f n="task.vim" o="root" g="wheel" p="33188"/></f><f n="README" o="root" g="wheel" p="33188"/><f n="syntax" o="root" g="wheel" p="16877"><f n="taskdata.vim" o="root" g="wheel" p="33188"/><f n="taskedit.vim" o="root" g="wheel" p="33188"/><f n="taskrc.vim" o="root" g="wheel" p="33188"/></f></f><f n="zsh" o="root" g="wheel" p="16877"><f n="_task" o="root" g="wheel" p="33188"/></f></f></f></f><f n="man" o="root" g="wheel" p="17917"><f n="man1" o="root" g="wheel" p="17901"><f n="task.1" o="root" g="wheel" p="33188"/><mod>group</mod><mod>owner</mod></f><f n="man5" o="root" g="wheel" p="17901"><f n="task-color.5" o="root" g="wheel" p="33188"/><f n="task-faq.5" o="root" g="wheel" p="33188"/><f n="task-tutorial.5" o="root" g="wheel" p="33188"/><f n="taskrc.5" o="root" g="wheel" p="33188"/><mod>group</mod><mod>owner</mod></f><mod>group</mod><mod>owner</mod></f></f><mod>group</mod><mod>owner</mod></f></pkg-contents>
|
||||
1
package-config/osx/task.pmdoc/01local.xml
Normal file
1
package-config/osx/task.pmdoc/01local.xml
Normal file
@@ -0,0 +1 @@
|
||||
<pkgref spec="1.12" uuid="B93940C5-2C4F-47D6-8038-3D24062FBC85"><config><identifier>com.beckingham.task191.local.pkg</identifier><version>1.0</version><description/><post-install type="none"/><requireAuthorization/><installFrom>/Users/paul/task-1.9.1.git/package-config/osx/local</installFrom><installTo mod="true" relocatable="true">/usr/local</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>installTo.path</mod><mod>identifier</mod><mod>parent</mod><mod>installTo</mod><mod>relocatable</mod></config><contents><file-list>01local-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
|
||||
@@ -1 +0,0 @@
|
||||
<pkg-contents spec="1.12"><f n="task" o="root" g="wheel" p="33261" pt="/Users/paul/task.git/package-config/osx/binary/task" m="false" t="file"><mod>group</mod><mod>owner</mod></f></pkg-contents>
|
||||
@@ -1 +0,0 @@
|
||||
<pkgref spec="1.12" uuid="C71026FD-E252-42CD-89C3-2F6F087AAF17"><config><identifier>com.beckingham.task182.task.pkg</identifier><version>1.8.2</version><description></description><post-install type="none"/><requireAuthorization/><installFrom mod="true">/Users/paul/task.git/package-config/osx/binary/task</installFrom><installTo mod="true" relocatable="true">/usr/local/bin</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo</mod><mod>locationType</mod><mod>relocatable</mod><mod>identifier</mod><mod>parent</mod><mod>version</mod><mod>installTo.path</mod></config><contents><file-list>01task-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
|
||||
@@ -1 +1 @@
|
||||
<pkmkdoc spec="1.12"><properties><title>Task 1.8.2</title><build>/Users/paul/Desktop/task-1.8.2.pkg</build><organization>com.beckingham</organization><userSees ui="both"/><min-target os="3"/><domain anywhere="true" system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><contents><choice title="task" id="choice0" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="com.beckingham.task182.task.pkg"/><choice-reqs><requirement id="tosv" operator="ge" value="'10.6.0'" selected="no" enabled="no" hidden="unchanged" startSelected="unchanged" startEnabled="unchanged" startHidden="unchanged"/></choice-reqs></choice></contents><resources bg-scale="proportional" bg-align="center"><locale lang="en"><resource mod="true" type="license">/Users/paul/task.git/package-config/osx/binary/COPYING.txt</resource><resource mod="true" type="readme">/Users/paul/task.git/package-config/osx/binary/README.txt</resource></locale></resources><flags/><item type="file">01task.xml</item><mod>properties.title</mod><mod>properties.customizeOption</mod><mod>properties.anywhereDomain</mod><mod>properties.systemDomain</mod></pkmkdoc>
|
||||
<pkmkdoc spec="1.12"><properties><title>Task 1.9.1</title><build>/Users/paul/Desktop/task-1.9.1-sl.pkg</build><organization>com.beckingham</organization><userSees ui="both"/><min-target os="3"/><domain anywhere="true" system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>Task 1.9.1 install for Snow Leopard.</description><contents><choice title="local" id="choice37" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="com.beckingham.task191.local.pkg"/></choice></contents><resources bg-scale="proportional" bg-align="center"><locale lang="en"><resource mod="true" type="license">/Users/paul/task-1.9.1.git/package-config/osx/COPYING.txt</resource><resource mod="true" type="readme">/Users/paul/task-1.9.1.git/package-config/osx/README.txt</resource></locale></resources><requirements><requirement id="tosv" operator="ge" value="'10.6.0'"><message>Task requires Mac OSX 10.6.0 (Snow Leopard) or later.</message></requirement></requirements><flags/><item type="file">01local.xml</item><mod>properties.title</mod><mod>properties.customizeOption</mod><mod>description</mod><mod>properties.anywhereDomain</mod><mod>properties.systemDomain</mod></pkmkdoc>
|
||||
36
package-config/osx/update
Executable file
36
package-config/osx/update
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p local/bin
|
||||
mkdir -p local/share/doc/task/scripts/bash
|
||||
mkdir -p local/share/doc/task/scripts/vim/ftdetect
|
||||
mkdir -p local/share/doc/task/scripts/vim/syntax
|
||||
mkdir -p local/share/doc/task/scripts/zsh
|
||||
mkdir -p local/share/doc/task/scripts/fish
|
||||
mkdir -p local/share/doc/task/rc
|
||||
mkdir -p local/share/man/man1
|
||||
mkdir -p local/share/man/man5
|
||||
|
||||
cp ../../README README.txt
|
||||
cp ../../COPYING COPYING.txt
|
||||
|
||||
cp ../../src/task local/bin/
|
||||
|
||||
cp ../../AUTHORS local/share/doc/task/
|
||||
cp ../../ChangeLog local/share/doc/task/
|
||||
cp ../../COPYING local/share/doc/task/
|
||||
cp ../../NEWS local/share/doc/task/
|
||||
cp ../../README local/share/doc/task/
|
||||
|
||||
cp ../../scripts/bash/* local/share/doc/task/scripts/bash
|
||||
cp ../../scripts/vim/README local/share/doc/task/scripts/vim
|
||||
cp ../../scripts/vim/ftdetect/* local/share/doc/task/scripts/vim/ftdetect
|
||||
cp ../../scripts/vim/syntax/* local/share/doc/task/scripts/vim/syntax
|
||||
cp ../../scripts/zsh/* local/share/doc/task/scripts/zsh
|
||||
cp ../../scripts/fish/* local/share/doc/task/scripts/fish
|
||||
|
||||
cp ../../doc/rc/*.theme local/share/doc/task/rc
|
||||
cp ../../doc/rc/holidays* local/share/doc/task/rc
|
||||
|
||||
cp ../../doc/man/*.1 local/share/man/man1
|
||||
cp ../../doc/man/*.5 local/share/man/man5
|
||||
|
||||
@@ -1,3 +1,75 @@
|
||||
task (1.9.1-2ubuntu1) lucid; urgency=low
|
||||
|
||||
* Initial deb package for task release 1.9.1 on lucid lynx
|
||||
|
||||
-- Federico Hernandez <ultrafredde@gmail.com> Sun, 23 May 2010 00:24:42 +0200
|
||||
|
||||
task (1.9.0-2ubuntu1) lucid; urgency=low
|
||||
|
||||
* Initial deb package for task release 1.9.0 on lucid lynx
|
||||
|
||||
-- Federico Hernandez <ultrafredde@gmail.com> Sat, 15 May 2010 11:02:17 +0200
|
||||
|
||||
task (1.9.0-1ubuntu1) karmic; urgency=low
|
||||
|
||||
* Initial deb package for task beta release 1.9.0 on karmic koala
|
||||
|
||||
-- Federico Hernandez <ultrafredde@gmail.com> Mon, 22 Feb 2010 22:08:41 +0100
|
||||
|
||||
task (1.9.0-1ubuntu1~beta3) karmic; urgency=low
|
||||
|
||||
* Initial deb package for task beta release 1.9.0.beta3 on karmic koala
|
||||
|
||||
-- Federico Hernandez <ultrafredde@gmail.com> Tue, 16 Feb 2010 00:29:31 +0100
|
||||
|
||||
task (1.9.0-1ubuntu1~beta2) karmic; urgency=low
|
||||
|
||||
* Initial deb package for task beta release 1.9.0.beta2 on karmic koala
|
||||
|
||||
-- Federico Hernandez <ultrafredde@gmail.com> Mon, 08 Feb 2010 22:09:41 +0100
|
||||
|
||||
task (1.9.0-1ubuntu1~beta1) karmic; urgency=low
|
||||
|
||||
* Initial deb package for task beta release 1.9.0.beta1 on karmic koala
|
||||
|
||||
-- Federico Hernandez <ultrafredde@gmail.com> Wed, 03 Feb 2010 23:51:08 +0100
|
||||
|
||||
task (1.8.5-1ubuntu2) karmic; urgency=low
|
||||
|
||||
* Fixed wrong ChangeLog file
|
||||
|
||||
-- Federico Hernandez <ultrafredde@gmail.com> Sat, 05 Dec 2009 23:58:36 +0100
|
||||
|
||||
task (1.8.5-1ubuntu1) karmic; urgency=low
|
||||
|
||||
* Initial deb package for task bugfix release 1.8.5
|
||||
|
||||
-- Federico Hernandez <ultrafredde@gmail.com> Sat, 05 Dec 2009 23:56:36 +0100
|
||||
|
||||
task (1.8.4-1ubuntu1) karmic; urgency=low
|
||||
|
||||
* Initial deb package for task bugfix release 1.8.4 on karmic koala
|
||||
|
||||
-- Federico Hernandez <ultrafredde@gmail.com> Tue, 17 Nov 2009 13:12:28 +0100
|
||||
|
||||
task (1.8.3-1ubuntu1) karmic; urgency=low
|
||||
|
||||
* Initial deb package for task bugfix release 1.8.3 on karmic koala
|
||||
|
||||
-- Federico Hernandez <ultrafredde@gmail.com> Sat, 31 Oct 2009 22:45:10 +0100
|
||||
|
||||
task (1.8.3-0ubuntu1) jaunty; urgency=low
|
||||
|
||||
* Initial deb package for task bugfix release 1.8.3
|
||||
|
||||
-- Federico Hernandez <ultrafredde@gmail.com> Wed, 21 Oct 2009 23:22:25 +0200
|
||||
|
||||
task (1.8.2-0ubuntu1) jaunty; urgency=low
|
||||
|
||||
* Initial deb package for task bugfix release 1.8.2
|
||||
|
||||
-- Federico Hernandez <ultrafredde@gmail.com> Mon, 07 Sep 2009 11:35:22 +0200
|
||||
|
||||
task (1.8.1-0ubuntu1) jaunty; urgency=low
|
||||
|
||||
* Initial deb package for task bugfix release 1.8.1
|
||||
|
||||
@@ -3,13 +3,13 @@ Section: utils
|
||||
Priority: optional
|
||||
Maintainer: Federico Hernandez <ultrafredde@gmail.com>
|
||||
XSBC-Original-Maintainer: Federico Hernandez <ultrafredde@gmail.com>
|
||||
Build-Depends: debhelper (>= 7), autotools-dev, libncurses5-dev
|
||||
Standards-Version: 3.8.0.1
|
||||
Build-Depends: cdbs, debhelper (>= 7), autotools-dev, libncurses5-dev
|
||||
Standards-Version: 3.8.4
|
||||
Homepage: http://taskwarrior.org
|
||||
|
||||
Package: task
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: A command-line to do list manager
|
||||
Task is a command-line to do list manager. It has
|
||||
support for GTD functionality and includes the
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
This package was debianized by:
|
||||
|
||||
Federico Hernandez <ultrafredde@gmail.com> on Thu, 20 Aug 2009 20:26:33 +0200
|
||||
Federico Hernandez <ultrafredde@gmail.com> on Sun, 23 May 2010 00:24:42 +0200
|
||||
|
||||
It was downloaded from:
|
||||
|
||||
@@ -25,13 +25,19 @@ Upstream Authors:
|
||||
Johan Friis
|
||||
Steven de Brouwer
|
||||
Pietro Cerutti
|
||||
Cory Donnelly
|
||||
Alexander Neumann
|
||||
Emil Sköldberg
|
||||
Johannes Schlatow
|
||||
|
||||
Copyright:
|
||||
|
||||
Copyright 2006 - 2009, Paul Beckingham
|
||||
Copyright 2009 Federico Hernandez
|
||||
Copyright 2006 - 2010, Paul Beckingham
|
||||
Copyright 2009 - 2010 Federico Hernandez
|
||||
Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez
|
||||
Copyright 2009 - 2010 John Florian
|
||||
Copyright 2009 P.C. Shyamshankar
|
||||
Copyright 2009 John Florian
|
||||
Copyright © 1994–2008 Lua.org, PUC-Rio
|
||||
|
||||
License:
|
||||
|
||||
@@ -54,6 +60,6 @@ Public License can be found in `/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
The Debian packaging is:
|
||||
|
||||
Copyright (C) 2009, Federico Hernandez <ultrafredde@gmail.com>
|
||||
Copyright (C) 2009 - 2010, Federico Hernandez <ultrafredde@gmail.com>
|
||||
|
||||
and is licensed under the GPL, see above.
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
scripts
|
||||
i18n
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
config.status: configure
|
||||
dh_testdir
|
||||
./configure $(CROSS) --prefix=/usr --docdir=$(DATADIR)/doc/task
|
||||
./configure $(CROSS) --prefix=/usr
|
||||
|
||||
build: build-stamp
|
||||
|
||||
@@ -31,9 +31,7 @@ binary-arch: install
|
||||
dh_installchangelogs
|
||||
dh_installdocs
|
||||
dh_installman
|
||||
dh_installexamples
|
||||
install -D -m644 scripts/bash/task_completion.sh $(CURDIR)/debian/task/etc/bash_completion.d/task
|
||||
rm -rf $(CURDIR)/debian/task/usr/share/doc/task-1.8.1
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
|
||||
1
package-config/ubuntu/debian/source/format
Normal file
1
package-config/ubuntu/debian/source/format
Normal file
@@ -0,0 +1 @@
|
||||
1.0
|
||||
@@ -1,3 +1,5 @@
|
||||
# Compulsory line, this is a version 3 file
|
||||
version=3
|
||||
|
||||
http://taskwarrior.org/download/task-(.*)\.tar\.gz
|
||||
|
||||
# the main taskwarrior download website
|
||||
http://taskwarrior.org/wiki/taskwarrior/Download http://www.taskwarrior.org/download/task-(.*)\.tar\.gz
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# bash completion support for task
|
||||
# bash completion support for taskwarrior
|
||||
#
|
||||
# Copyright 2009 Federico Hernandez
|
||||
# Copyright 2009-2010 Federico Hernandez
|
||||
# All rights reserved.
|
||||
#
|
||||
# This script is part of the task project.
|
||||
# This script is part of the taskwarrior project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -117,6 +117,32 @@ _task()
|
||||
COMPREPLY=( $(compgen -W "${config}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
case "${prev}" in
|
||||
merge)
|
||||
local servers=$(_task_get_config | grep merge | grep uri | sed 's/^merge\.\(.*\)\.uri/\1/')
|
||||
COMPREPLY=( $(compgen -W "${servers}" -- ${cur}) )
|
||||
_known_hosts_real -a "$cur"
|
||||
return 0
|
||||
;;
|
||||
push)
|
||||
local servers=$(_task_get_config | grep push | grep uri | sed 's/^push\.\(.*\)\.uri/\1/')
|
||||
COMPREPLY=( $(compgen -W "${servers}" -- ${cur}) )
|
||||
_known_hosts_real -a "$cur"
|
||||
return 0
|
||||
;;
|
||||
pull)
|
||||
local servers=$(_task_get_config | grep pull | grep uri | sed 's/^pull\.\(.*\)\.uri/\1/')
|
||||
COMPREPLY=( $(compgen -W "${servers}" -- ${cur}) )
|
||||
_known_hosts_real -a "$cur"
|
||||
return 0
|
||||
;;
|
||||
import)
|
||||
COMPREPLY=( $(compgen -o "default" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
138
scripts/fish/task.fish
Normal file
138
scripts/fish/task.fish
Normal file
@@ -0,0 +1,138 @@
|
||||
# Taskwarrior <http://taskwarrior.org> tab completions for the Fish shell
|
||||
# <http://fishshell.org>.
|
||||
#
|
||||
# Copy this script to ~/.config/fish/completions/task.fish, open a new shell,
|
||||
# and enjoy.
|
||||
#
|
||||
# Objects completed:
|
||||
# * Commands
|
||||
# * Projects
|
||||
# * Priorities
|
||||
# * Tags
|
||||
# * Attribute names and modifiers
|
||||
#
|
||||
# License:
|
||||
# Copyright 2009 Mick Koch <kchmck@gmail.com>
|
||||
#
|
||||
# This script is free software. It comes without any warranty, to the extent
|
||||
# permitted by applicable law. You can redistribute it and/or modify it under
|
||||
# the terms of the Do What The Fuck You Want To Public License, Version 2, as
|
||||
# published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
|
||||
# details.
|
||||
|
||||
function __fish.task.bare
|
||||
test (count (commandline -c -o)) -eq 1
|
||||
end
|
||||
|
||||
function __fish.task.complete
|
||||
complete -c task -u $argv
|
||||
end
|
||||
|
||||
function __fish.task.head
|
||||
task _ids
|
||||
task _commands
|
||||
end
|
||||
|
||||
function __fish.task.attrs
|
||||
echo project
|
||||
echo priority
|
||||
echo due
|
||||
echo recur
|
||||
echo until
|
||||
echo limit
|
||||
echo wait
|
||||
echo rc
|
||||
end
|
||||
|
||||
function __fish.task.mods
|
||||
echo before
|
||||
echo after
|
||||
echo over
|
||||
echo under
|
||||
echo none
|
||||
echo is
|
||||
echo isnt
|
||||
echo has
|
||||
echo hasnt
|
||||
echo startswith
|
||||
echo endswith
|
||||
echo word
|
||||
echo noword
|
||||
end
|
||||
|
||||
function __fish.task.combos
|
||||
echo $argv[1]:$argv[2]
|
||||
|
||||
for mod in (__fish.task.mods)
|
||||
echo $argv[1].$mod:$argv[2]
|
||||
end
|
||||
end
|
||||
|
||||
function __fish.task.combos.simple
|
||||
__fish.task.combos $argv ""
|
||||
end
|
||||
|
||||
function __fish.task.projects
|
||||
__fish.task.combos.simple project
|
||||
|
||||
for project in (task _projects)
|
||||
__fish.task.combos project $project
|
||||
end
|
||||
end
|
||||
|
||||
function __fish.task.priorities
|
||||
__fish.task.combos.simple priority
|
||||
|
||||
for priority in H M L
|
||||
__fish.task.combos priority $priority
|
||||
end
|
||||
end
|
||||
|
||||
function __fish.task.rc
|
||||
echo rc:
|
||||
|
||||
for value in (task _config)
|
||||
echo rc.$value:
|
||||
end
|
||||
end
|
||||
|
||||
function __fish.task.tags
|
||||
for tag in (task _tags)
|
||||
echo +$tag
|
||||
echo -$tag
|
||||
end
|
||||
end
|
||||
|
||||
function __fish.task.match
|
||||
__fish.task.attrs | grep \^(echo $argv | sed -E "s/(\w+).+/\1/")
|
||||
end
|
||||
|
||||
function __fish.task.attr
|
||||
for attr in (__fish.task.match $argv)
|
||||
switch $attr
|
||||
case project
|
||||
__fish.task.projects
|
||||
case priority
|
||||
__fish.task.priorities
|
||||
case rc
|
||||
__fish.task.rc
|
||||
case "*"
|
||||
__fish.task.combos.simple $attr
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function __fish.task.body
|
||||
set token (commandline -ct)
|
||||
|
||||
if test -n $token
|
||||
__fish.task.attr $token
|
||||
else
|
||||
__fish.task.attrs
|
||||
end
|
||||
|
||||
__fish.task.tags
|
||||
end
|
||||
|
||||
__fish.task.complete -f -n __fish.task.bare -a "(__fish.task.head)"
|
||||
__fish.task.complete -f -n "not __fish.task.bare" -a "(__fish.task.body)"
|
||||
@@ -1,22 +1,22 @@
|
||||
|
||||
Configure VIM for Syntax Highlighting of Task Data
|
||||
Configure VIM for Syntax Highlighting of Taskwarrior Data
|
||||
|
||||
|
||||
The task data files (pending.data, completed.data and undo.data) as well as
|
||||
edits made via commands like "task 1 edit" can be color-highlighted if you
|
||||
happen to use VIM as your preferred text editor. Eventually this will happen
|
||||
automatically in newer versions of VIM, but for now you have to do a little
|
||||
bit of file shuffling.
|
||||
The task data files (pending.data, completed.data and undo.data),
|
||||
configuration file (.taskrc) as well as edits made via commands like "task 1
|
||||
edit" can be color-highlighted if you happen to use VIM as your preferred text
|
||||
editor. Eventually this will happen automatically in newer versions of VIM,
|
||||
but for now you have to do a little bit of file shuffling.
|
||||
|
||||
|
||||
Prerequisites
|
||||
|
||||
For this to work, you need to first have syntax highlighting enabled when you
|
||||
use VIM. This happens to be the default for most VIM installations, but it is
|
||||
usually quite simple if that doesn't happen to be so in your case. Rather than
|
||||
repeat the excellent VIM documentation here, please see the appropriate VIM
|
||||
documentation itself. Generally this can be made seen by starting vim/gvim and
|
||||
issuing the following command:
|
||||
use VIM. This happens to be the default for most VIM installations, but it is
|
||||
usually quite simple if that doesn't happen to be so in your case. Rather
|
||||
than repeat the excellent VIM documentation here, please see the appropriate
|
||||
VIM documentation itself. Generally this can be made seen by starting
|
||||
vim/gvim and issuing the following command:
|
||||
|
||||
:help syntax
|
||||
|
||||
@@ -24,21 +24,23 @@ You may prefer instead to read the help online at:
|
||||
http://vimdoc.sourceforge.net/htmldoc/syntax.html#syntax
|
||||
|
||||
|
||||
Configuring VIM to Understand Task Data
|
||||
Configuring VIM to Understand Taskwarrior Data
|
||||
|
||||
Once you have VIM's syntax highlighting enabled and working with other file
|
||||
types properly, configuring it for use with task is simple. You simply need to
|
||||
copy some files that came with task into your home directory so that you have:
|
||||
types properly, configuring it for use with taskwarrior is simple. You simply
|
||||
need to copy some files that came with taskwarrior into your home directory so
|
||||
that you have:
|
||||
|
||||
~/.vim/ftdetect/task.vim
|
||||
~/.vim/syntax/taskdata.vim
|
||||
~/.vim/syntax/taskedit.vim
|
||||
~/.vim/syntax/taskrc.vim
|
||||
|
||||
The source of these files varies depending on how you installed task. If you
|
||||
The source of these files varies depending on how you installed task. If you
|
||||
installed task via a regular package (rpm or deb) you can find these files in
|
||||
/usr/share/doc/task-VERSION/scripts/vim/. If you built task yourself from the
|
||||
/usr/share/doc/task-VERSION/scripts/vim/. If you built task yourself from the
|
||||
tarball (using the default configure options), these will be in
|
||||
/usr/local/share/doc/task-VERSION/scripts/vim/ instead. So you should be able
|
||||
/usr/local/share/doc/task-VERSION/scripts/vim/ instead. So you should be able
|
||||
to do one of the following:
|
||||
|
||||
cp -av /usr/share/doc/task-VERSION/scripts/vim/* ~/.vim/
|
||||
@@ -49,9 +51,9 @@ or
|
||||
|
||||
You should then be ready to go.
|
||||
---
|
||||
All three above mentioned files are
|
||||
All four above mentioned files are
|
||||
|
||||
Copyright 2009 John Florian
|
||||
Copyright 2009-2010 John Florian
|
||||
|
||||
and are available under the GNU Public License version 2 or later.
|
||||
For the full text of this license, see COPYING.
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
" Vim support file to detect task data files and single task edits
|
||||
" Vim support file to detect Taskwarrior data and configuration files and
|
||||
" single task edits
|
||||
"
|
||||
" Maintainer: John Florian <jflorian@doubledog.org>
|
||||
" Updated: Wed Jul 8 19:45:55 EDT 2009
|
||||
" Updated: Thu Dec 10 18:28:26 EST 2009
|
||||
"
|
||||
" Copyright 2009 John Florian
|
||||
" Copyright 2009-2010 John Florian
|
||||
"
|
||||
" This file is available under the GNU Public License version 2 or later.
|
||||
" For the full text of this license, see COPYING.
|
||||
|
||||
|
||||
" for the raw data files
|
||||
" Taskwarrior data files
|
||||
au BufRead,BufNewFile {pending,completed,undo}.data set filetype=taskdata
|
||||
|
||||
" for 'task 42 edit'
|
||||
" Taskwarrior configuration file
|
||||
au BufRead,BufNewFile .taskrc set filetype=taskrc
|
||||
|
||||
" Taskwarrior handling of 'task 42 edit'
|
||||
au BufRead,BufNewFile *.task set filetype=taskedit
|
||||
|
||||
" vim:noexpandtab
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: task data
|
||||
" Language: taskwarrior data
|
||||
" Maintainer: John Florian <jflorian@doubledog.org>
|
||||
" Updated: Wed Jul 8 19:46:20 EDT 2009
|
||||
"
|
||||
" Copyright 2009 John Florian
|
||||
" Copyright 2009-2010 John Florian
|
||||
"
|
||||
" This file is available under the GNU Public License version 2 or later.
|
||||
" For the full text of this license, see COPYING.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: John Florian <jflorian@doubledog.org>
|
||||
" Updated: Wed Jul 8 19:46:32 EDT 2009
|
||||
"
|
||||
" Copyright 2009 John Florian
|
||||
" Copyright 2009-2010 John Florian
|
||||
"
|
||||
" This file is available under the GNU Public License version 2 or later.
|
||||
" For the full text of this license, see COPYING.
|
||||
|
||||
52
scripts/vim/syntax/taskrc.vim
Normal file
52
scripts/vim/syntax/taskrc.vim
Normal file
@@ -0,0 +1,52 @@
|
||||
" Vim syntax file
|
||||
" Language: support for editing taskwarrior configuration file
|
||||
" Maintainer: John Florian <jflorian@doubledog.org>
|
||||
" Updated: Sat Feb 20 14:14:44 EST 2010
|
||||
"
|
||||
" Copyright 2009-2010 John Florian
|
||||
"
|
||||
" This file is available under the GNU Public License version 2 or later.
|
||||
" For the full text of this license, see COPYING.
|
||||
|
||||
|
||||
" For version 5.x: Clear all syntax items.
|
||||
" For version 6.x: Quit when a syntax file was already loaded.
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match taskrcVal ".\{-}$" contains=taskrcComment
|
||||
syn match taskrcEqual "="
|
||||
syn match taskrcKey "^\s*.\{-}="he=e-1 contains=taskrcEqual
|
||||
|
||||
syn keyword taskrcGoodKey locking curses confirmation next bulk nag weekstart displayweeknumber defaultwidth editor monthsperline annotations _forcecolor blanklines debug hooks fontunderline
|
||||
|
||||
syn match taskrcGoodKey "\(active\|tag\|recurrence\)\.indicator"
|
||||
syn match taskrcGoodKey "alias\.\S\{-}="he=e-1
|
||||
syn match taskrcGoodKey "calendar\.\(legend\|holidays\|details\(\.report\)\?\)"
|
||||
syn match taskrcGoodKey "color\(\.\(alternate\|overdue\|due\(\.today\)\?\|pri\.\([HML]\|none\)\|active\|tagged\|recurring\|header\|footnote\|\(\(tag\|project\|keyword\)\.\S\{-}\)\|debug\|\(calendar\.\(today\|due\(\.today\)\?\|overdue\|weekend\|holiday\|weeknumber\)\)\)\)\?="he=e-1
|
||||
syn match taskrcGoodKey "complete\.all\.\(projects\|tags\)"
|
||||
syn match taskrcGoodKey "data\.location"
|
||||
syn match taskrcGoodKey "dateformat\(\.\(holiday\|report\)\)\?"
|
||||
syn match taskrcGoodKey "default\.\(command\|project\|priority\)"
|
||||
syn match taskrcGoodKey "due="he=e-1
|
||||
syn match taskrcGoodKey "echo\.command"
|
||||
syn match taskrcGoodKey "import\.synonym\.\(bg\|description\|due\|end\|entry\|fg\|id\|priority\|project\|recur\|start\|status\|tags\|uuid\)"
|
||||
syn match taskrcGoodKey "report\.\S\{-}\.\(description\|columns\|labels\|sort\|filter\|dateformat\|annotations\)="he=e-1
|
||||
syn match taskrcGoodKey "search\.case\.sensitive"
|
||||
syn match taskrcGoodKey "shadow\.\(file\|command\|notify\)"
|
||||
syn match taskrcGoodKey "shell\.prompt"
|
||||
|
||||
syn match taskrcComment "#.*$"
|
||||
|
||||
" The default methods for highlighting. Can be overridden later.
|
||||
hi def link taskrcComment Comment
|
||||
hi def link taskrcKey Statement
|
||||
hi def link taskrcVal String
|
||||
hi def link taskrcGoodKey Function
|
||||
|
||||
let b:current_syntax = "taskrc"
|
||||
|
||||
" vim:noexpandtab
|
||||
@@ -1,10 +1,17 @@
|
||||
#compdef task
|
||||
# zsh completion for task
|
||||
#
|
||||
# This script is currently unmaintained and was released for an earlier version
|
||||
# of taskwarrior. We welcome any zsh user that wants to contribute to
|
||||
# taskwarrior to take a look at this script and either confirm its working
|
||||
# status or improve it. Please contact us at support@taskwarrior.org if you
|
||||
# have further questions on how to contribute to taskwarrior.
|
||||
#
|
||||
# zsh completion for taskwarrior
|
||||
#
|
||||
# Copyright 2009 P.C. Shyamshankar
|
||||
# All rights reserved.
|
||||
#
|
||||
# This script is part of the task project.
|
||||
# This script is part of the taskwarrior project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -27,10 +34,7 @@
|
||||
#
|
||||
|
||||
typeset -g _task_cmds
|
||||
_task_cmds=($(task rubbish-command | sed -n -e 's/^\s\+task \(\w\+\) .*/\1/p' | grep -v ID))
|
||||
|
||||
# As of task 1.7.0,
|
||||
# _task_cmds=(add append annotate completed edit duplicate delete undelete info start stop done undo projects tags summary timesheet history ghistory next calendar active overdue stats import export color version help list long ls newest oldest)
|
||||
_task_cmds=($(task _commands))
|
||||
|
||||
_task() {
|
||||
_arguments -s -S \
|
||||
|
||||
1
src/.gitignore
vendored
1
src/.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
*.o
|
||||
Makefile.in
|
||||
*_test
|
||||
|
||||
794
src/API.cpp
Normal file
794
src/API.cpp
Normal file
@@ -0,0 +1,794 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Taskwarrior Lua API
|
||||
//
|
||||
// Copyright 2006 - 2010, Paul Beckingham.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free Software
|
||||
// Foundation; either version 2 of the License, or (at your option) any later
|
||||
// version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
// details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program; if not, write to the
|
||||
//
|
||||
// Free Software Foundation, Inc.,
|
||||
// 51 Franklin Street, Fifth Floor,
|
||||
// Boston, MA
|
||||
// 02110-1301
|
||||
// USA
|
||||
//
|
||||
// -------------
|
||||
//
|
||||
// Copyright © 1994–2008 Lua.org, PUC-Rio.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include "Context.h"
|
||||
#include "API.h"
|
||||
|
||||
extern Context context;
|
||||
Task* the_task = NULL;
|
||||
|
||||
#ifdef HAVE_LIBLUA
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Returns a string representing the taskwarrior version number, such as
|
||||
// '1.9.0'.
|
||||
static int api_task_version (lua_State* L)
|
||||
{
|
||||
lua_pushstring (L, PACKAGE_VERSION);
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Returns a string representing the Lua version number, such as '5.1.4'.
|
||||
// Lua 5.2.0 has a 'lua_version' call, but 5.1.4 is the target.
|
||||
static int api_task_lua_version (lua_State* L)
|
||||
{
|
||||
// Convert "Lua 5.1.4" -> "5.1.4"
|
||||
std::string ver = LUA_RELEASE;
|
||||
lua_pushstring (L, ver.substr (4, std::string::npos).c_str ());
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Returns the type of OS that task is running on.
|
||||
static int api_task_os (lua_State* L)
|
||||
{
|
||||
#if defined (DARWIN)
|
||||
lua_pushstring (L, "darwin");
|
||||
#elif defined (SOLARIS)
|
||||
lua_pushstring (L, "solaris");
|
||||
#elif defined (CYGWIN)
|
||||
lua_pushstring (L, "cygwin");
|
||||
#elif defined (OPENBSD)
|
||||
lua_pushstring (L, "openbsd");
|
||||
#elif defined (HAIKU)
|
||||
lua_pushstring (L, "haiku");
|
||||
#elif defined (FREEBSD)
|
||||
lua_pushstring (L, "freebsd");
|
||||
#elif defined (LINUX)
|
||||
lua_pushstring (L, "linux");
|
||||
#else
|
||||
lua_pushstring (L, "unknown");
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_feature (lua_State* L)
|
||||
{
|
||||
std::string name = luaL_checkstring (L, 1);
|
||||
bool value = false;
|
||||
|
||||
if (name == "readline")
|
||||
{
|
||||
#ifdef HAVE_READLINE
|
||||
value = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
else if (name == "ncurses")
|
||||
{
|
||||
#ifdef HAVE_NCURSES
|
||||
value = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
else if (name == "lua")
|
||||
value = true;
|
||||
|
||||
lua_pushboolean (L, value ? 1 : 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_aliases ()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Returns values from .taskrc, by name.
|
||||
static int api_task_get_config (lua_State* L)
|
||||
{
|
||||
std::string name = luaL_checkstring (L, 1);
|
||||
lua_pushstring (L, context.config.get (name).c_str ());
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
-- Temporarily sets .taskrc values, by name.
|
||||
static int api_task_set_config (name, value)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
-- Returns an internationalized string, by string ID, from the appropriate
|
||||
-- locale-based strings file.
|
||||
static int api_task_i18n_string (id)
|
||||
{
|
||||
return "le foo"
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
-- Returns a list of tips, from the appropriate locale-based tips file.
|
||||
static int api_task_i18n_tips ()
|
||||
{
|
||||
return {}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
-- Returns the name of the current command.
|
||||
static int api_task_get_command ()
|
||||
{
|
||||
return "list"
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
-- Returns a list of string messages generated so far.
|
||||
static int api_task_get_header_messages ()
|
||||
{
|
||||
return {}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_footnote_messages ()
|
||||
{
|
||||
return {}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_debug_messages (lua_State* L)
|
||||
{
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_header_message (lua_State* L)
|
||||
{
|
||||
std::string message = luaL_checkstring (L, 1);
|
||||
context.header (message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_footnote_message (lua_State* L)
|
||||
{
|
||||
std::string message = luaL_checkstring (L, 1);
|
||||
context.footnote (message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_debug_message (lua_State* L)
|
||||
{
|
||||
std::string message = luaL_checkstring (L, 1);
|
||||
context.debug (message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Causes the shell or interactive mode task to exit. Ordinarily this does not
|
||||
// occur.
|
||||
static int api_task_exit (lua_State* L)
|
||||
{
|
||||
// TODO Is this the correct exception? How does the shell handle this?
|
||||
std::cout << "Exiting." << std::endl;
|
||||
exit (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
-- Shuts off the hook system for any subsequent hook calls for this command.
|
||||
static int api_task_inhibit_further_hooks ()
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
-- Returns a table that contains a complete copy of the task.
|
||||
static int api_task_get (lua_State* L)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
-- Creates a new task from the data specified in the table t.
|
||||
static int api_task_add (t)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
-- Modifies the task described in the table t.
|
||||
static int api_task_modify (t)
|
||||
{
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// -- 'id' is the task id passed to the hook function. Date attributes are
|
||||
// -- returned as a numeric epoch offset. Tags and annotations are returned
|
||||
// -- as tables. A nil value indicates a missing value.
|
||||
static int api_task_get_uuid (lua_State* L)
|
||||
{
|
||||
if (the_task != NULL)
|
||||
lua_pushstring (L, the_task->get ("uuid").c_str ());
|
||||
else
|
||||
lua_pushnil (L);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_description (lua_State* L)
|
||||
{
|
||||
if (the_task != NULL)
|
||||
lua_pushstring (L, the_task->get ("description").c_str ());
|
||||
else
|
||||
lua_pushnil (L);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_annotations (id)
|
||||
{
|
||||
return task.annotations
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_project (lua_State* L)
|
||||
{
|
||||
if (the_task != NULL)
|
||||
lua_pushstring (L, the_task->get ("project").c_str ());
|
||||
else
|
||||
lua_pushnil (L);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_priority (lua_State* L)
|
||||
{
|
||||
if (the_task != NULL)
|
||||
lua_pushstring (L, the_task->get ("priority").c_str ());
|
||||
else
|
||||
lua_pushnil (L);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_tags (id)
|
||||
{
|
||||
return task.tags
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_status (lua_State* L)
|
||||
{
|
||||
if (the_task != NULL)
|
||||
lua_pushstring (L, Task::statusToText (the_task->getStatus ()).c_str ());
|
||||
else
|
||||
lua_pushnil (L);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_due (lua_State* L)
|
||||
{
|
||||
if (the_task != NULL)
|
||||
{
|
||||
unsigned int value = (unsigned int) the_task->get_ulong ("due");
|
||||
if (value)
|
||||
{
|
||||
lua_pushinteger (L, value);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
lua_pushnil (L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_entry (lua_State* L)
|
||||
{
|
||||
if (the_task != NULL)
|
||||
{
|
||||
unsigned int value = (unsigned int) the_task->get_ulong ("entry");
|
||||
if (value)
|
||||
{
|
||||
lua_pushinteger (L, value);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
lua_pushnil (L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_start (lua_State* L)
|
||||
{
|
||||
if (the_task != NULL)
|
||||
{
|
||||
unsigned int value = (unsigned int) the_task->get_ulong ("start");
|
||||
if (value)
|
||||
{
|
||||
lua_pushinteger (L, value);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
lua_pushnil (L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_end (lua_State* L)
|
||||
{
|
||||
if (the_task != NULL)
|
||||
{
|
||||
unsigned int value = (unsigned int) the_task->get_ulong ("end");
|
||||
if (value)
|
||||
{
|
||||
lua_pushinteger (L, value);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
lua_pushnil (L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_recur (id)
|
||||
{
|
||||
return task.recur
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_until (lua_State* L)
|
||||
{
|
||||
if (the_task != NULL)
|
||||
{
|
||||
unsigned int value = (unsigned int) the_task->get_ulong ("until");
|
||||
if (value)
|
||||
{
|
||||
lua_pushinteger (L, value);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
lua_pushnil (L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_get_wait (lua_State* L)
|
||||
{
|
||||
if (the_task != NULL)
|
||||
{
|
||||
unsigned int value = (unsigned int) the_task->get_ulong ("wait");
|
||||
if (value)
|
||||
{
|
||||
lua_pushinteger (L, value);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
lua_pushnil (L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
-- 'id' is the task id passed to the hook function. Date attributes are
|
||||
-- expected as numeric epoch offsets. Tags and annotations are expected
|
||||
-- as tables. A nil value indicates a missing value.
|
||||
static int api_task_set_description (id, value)
|
||||
{
|
||||
task.description = value
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_set_annotations (id, value)
|
||||
{
|
||||
task.annotations = value
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_set_project (id, value)
|
||||
{
|
||||
task.project = value
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_set_priority (id, value)
|
||||
{
|
||||
task.priority = value
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_set_tags (id, value)
|
||||
{
|
||||
task.tags = value
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_set_status (id, value)
|
||||
{
|
||||
task.status = value
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_set_due (id, value)
|
||||
{
|
||||
task.due_date = value
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_set_start (id, value)
|
||||
{
|
||||
task.start_date = value
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_set_recur (id, value)
|
||||
{
|
||||
task.recur = value
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_set_until (id, value)
|
||||
{
|
||||
task.until_date = value
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static int api_task_set_wait (id, value)
|
||||
{
|
||||
task.wait_date = value
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
API::API ()
|
||||
: L (NULL)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
API::~API ()
|
||||
{
|
||||
if (L)
|
||||
{
|
||||
lua_close (L);
|
||||
L = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void API::initialize ()
|
||||
{
|
||||
// Initialize Lua.
|
||||
L = lua_open ();
|
||||
luaL_openlibs (L); // TODO Error handling
|
||||
|
||||
// Register all the API functions in Lua global space.
|
||||
lua_pushcfunction (L, api_task_version); lua_setglobal (L, "task_version");
|
||||
lua_pushcfunction (L, api_task_lua_version); lua_setglobal (L, "task_lua_version");
|
||||
lua_pushcfunction (L, api_task_os); lua_setglobal (L, "task_os");
|
||||
lua_pushcfunction (L, api_task_feature); lua_setglobal (L, "task_feature");
|
||||
/*
|
||||
lua_pushcfunction (L, api_task_aliases); lua_setglobal (L, "task_aliases");
|
||||
*/
|
||||
lua_pushcfunction (L, api_task_get_config); lua_setglobal (L, "task_get_config");
|
||||
/*
|
||||
lua_pushcfunction (L, api_task_set_config); lua_setglobal (L, "task_set_config");
|
||||
lua_pushcfunction (L, api_task_i18n_string); lua_setglobal (L, "task_i18n_string");
|
||||
lua_pushcfunction (L, api_task_i18n_tips); lua_setglobal (L, "task_i18n_tips");
|
||||
lua_pushcfunction (L, api_task_get_command); lua_setglobal (L, "task_get_command");
|
||||
lua_pushcfunction (L, api_task_get_header_messages); lua_setglobal (L, "task_get_header_messages");
|
||||
lua_pushcfunction (L, api_task_get_footnote_messages); lua_setglobal (L, "task_get_footnote_messages");
|
||||
lua_pushcfunction (L, api_task_get_debug_messages); lua_setglobal (L, "task_get_debug_messages");
|
||||
*/
|
||||
lua_pushcfunction (L, api_task_header_message); lua_setglobal (L, "task_header_message");
|
||||
lua_pushcfunction (L, api_task_footnote_message); lua_setglobal (L, "task_footnote_message");
|
||||
lua_pushcfunction (L, api_task_debug_message); lua_setglobal (L, "task_debug_message");
|
||||
lua_pushcfunction (L, api_task_exit); lua_setglobal (L, "task_exit");
|
||||
/*
|
||||
lua_pushcfunction (L, api_task_inhibit_further_hooks); lua_setglobal (L, "task_inhibit_further_hooks");
|
||||
lua_pushcfunction (L, api_task_get); lua_setglobal (L, "task_get");
|
||||
lua_pushcfunction (L, api_task_add); lua_setglobal (L, "task_add");
|
||||
lua_pushcfunction (L, api_task_modify); lua_setglobal (L, "task_modify");
|
||||
*/
|
||||
lua_pushcfunction (L, api_task_get_uuid); lua_setglobal (L, "task_get_uuid");
|
||||
lua_pushcfunction (L, api_task_get_description); lua_setglobal (L, "task_get_description");
|
||||
/*
|
||||
lua_pushcfunction (L, api_task_get_annotations); lua_setglobal (L, "task_get_annotations");
|
||||
*/
|
||||
lua_pushcfunction (L, api_task_get_project); lua_setglobal (L, "task_get_project");
|
||||
lua_pushcfunction (L, api_task_get_priority); lua_setglobal (L, "task_get_priority");
|
||||
/*
|
||||
lua_pushcfunction (L, api_task_get_tags); lua_setglobal (L, "task_get_tags");
|
||||
*/
|
||||
lua_pushcfunction (L, api_task_get_status); lua_setglobal (L, "task_get_status");
|
||||
lua_pushcfunction (L, api_task_get_due); lua_setglobal (L, "task_get_due");
|
||||
lua_pushcfunction (L, api_task_get_entry); lua_setglobal (L, "task_get_entry");
|
||||
lua_pushcfunction (L, api_task_get_start); lua_setglobal (L, "task_get_start");
|
||||
lua_pushcfunction (L, api_task_get_end); lua_setglobal (L, "task_get_end");
|
||||
/*
|
||||
lua_pushcfunction (L, api_task_get_recur); lua_setglobal (L, "task_get_recur");
|
||||
*/
|
||||
lua_pushcfunction (L, api_task_get_until); lua_setglobal (L, "task_get_until");
|
||||
lua_pushcfunction (L, api_task_get_wait); lua_setglobal (L, "task_get_wait");
|
||||
/*
|
||||
lua_pushcfunction (L, api_task_set_description); lua_setglobal (L, "task_set_description");
|
||||
lua_pushcfunction (L, api_task_set_annotations); lua_setglobal (L, "task_set_annotations");
|
||||
lua_pushcfunction (L, api_task_set_project); lua_setglobal (L, "task_set_project");
|
||||
lua_pushcfunction (L, api_task_set_priority); lua_setglobal (L, "task_set_priority");
|
||||
lua_pushcfunction (L, api_task_set_tags); lua_setglobal (L, "task_set_tags");
|
||||
lua_pushcfunction (L, api_task_set_status); lua_setglobal (L, "task_set_status");
|
||||
lua_pushcfunction (L, api_task_set_due); lua_setglobal (L, "task_set_due");
|
||||
lua_pushcfunction (L, api_task_set_start); lua_setglobal (L, "task_set_start");
|
||||
lua_pushcfunction (L, api_task_set_recur); lua_setglobal (L, "task_set_recur");
|
||||
lua_pushcfunction (L, api_task_set_until); lua_setglobal (L, "task_set_until");
|
||||
lua_pushcfunction (L, api_task_set_wait); lua_setglobal (L, "task_set_wait");
|
||||
*/
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool API::callProgramHook (
|
||||
const std::string& file,
|
||||
const std::string& function)
|
||||
{
|
||||
loadFile (file);
|
||||
|
||||
// Get function.
|
||||
lua_getglobal (L, function.c_str ());
|
||||
if (!lua_isfunction (L, -1))
|
||||
{
|
||||
lua_pop (L, 1);
|
||||
throw std::string ("The Lua function '") + function + "' was not found.";
|
||||
}
|
||||
|
||||
// Make call.
|
||||
if (lua_pcall (L, 0, 2, 0) != 0)
|
||||
throw std::string ("Error calling '") + function + "' - " + lua_tostring (L, -1) + ".";
|
||||
|
||||
// Call successful - get return values.
|
||||
if (!lua_isnumber (L, -2))
|
||||
throw std::string ("Error: '") + function + "' did not return a success indicator.";
|
||||
|
||||
if (!lua_isstring (L, -1) && !lua_isnil (L, -1))
|
||||
throw std::string ("Error: '") + function + "' did not return a message or nil.";
|
||||
|
||||
int rc = lua_tointeger (L, -2);
|
||||
const char* message = lua_tostring (L, -1);
|
||||
|
||||
if (rc == 0)
|
||||
{
|
||||
if (message)
|
||||
context.footnote (std::string ("Warning: ") + message);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (message)
|
||||
throw std::string (message);
|
||||
}
|
||||
|
||||
lua_pop (L, 1);
|
||||
return rc == 0 ? true : false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// TODO No intention of implementing this before task 2.0. Why? Because we
|
||||
// need to implement a Lua iterator, in C++, to iterate over a std::vector.
|
||||
bool API::callListHook (
|
||||
const std::string& file,
|
||||
const std::string& function,
|
||||
std::vector <Task>& all)
|
||||
{
|
||||
loadFile (file);
|
||||
|
||||
// TODO Get function.
|
||||
// TODO Prepare args.
|
||||
// TODO Make call.
|
||||
// TODO Get exit status.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool API::callTaskHook (
|
||||
const std::string& file,
|
||||
const std::string& function,
|
||||
Task& task)
|
||||
{
|
||||
loadFile (file);
|
||||
|
||||
// Save the task for reference via the API.
|
||||
current = task;
|
||||
|
||||
// Get function.
|
||||
lua_getglobal (L, function.c_str ());
|
||||
if (!lua_isfunction (L, -1))
|
||||
{
|
||||
lua_pop (L, 1);
|
||||
throw std::string ("The Lua function '") + function + "' was not found.";
|
||||
}
|
||||
|
||||
// Prepare args.
|
||||
lua_pushnumber (L, current.id);
|
||||
|
||||
// Expose the task.
|
||||
the_task = ¤t;
|
||||
|
||||
// Make call.
|
||||
if (lua_pcall (L, 1, 2, 0) != 0)
|
||||
throw std::string ("Error calling '") + function + "' - " + lua_tostring (L, -1) + ".";
|
||||
|
||||
// Hide the task.
|
||||
the_task = NULL;
|
||||
|
||||
// Call successful - get return values.
|
||||
if (!lua_isnumber (L, -2))
|
||||
throw std::string ("Error: '") + function + "' did not return a success indicator.";
|
||||
|
||||
if (!lua_isstring (L, -1) && !lua_isnil (L, -1))
|
||||
throw std::string ("Error: '") + function + "' did not return a message or nil.";
|
||||
|
||||
int rc = lua_tointeger (L, -2);
|
||||
const char* message = lua_tostring (L, -1);
|
||||
|
||||
if (rc == 0)
|
||||
{
|
||||
if (message)
|
||||
context.footnote (std::string ("Warning: ") + message);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (message)
|
||||
throw std::string (message);
|
||||
}
|
||||
|
||||
lua_pop (L, 1);
|
||||
return rc == 0 ? true : false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool API::callFieldHook (
|
||||
const std::string& file,
|
||||
const std::string& function,
|
||||
const std::string& name,
|
||||
std::string& value)
|
||||
{
|
||||
loadFile (file);
|
||||
|
||||
// Get function.
|
||||
lua_getglobal (L, function.c_str ());
|
||||
if (!lua_isfunction (L, -1))
|
||||
{
|
||||
lua_pop (L, 1);
|
||||
throw std::string ("The Lua function '") + function + "' was not found.";
|
||||
}
|
||||
|
||||
// Prepare args.
|
||||
lua_pushstring (L, name.c_str ());
|
||||
lua_pushstring (L, value.c_str ());
|
||||
|
||||
// Make call.
|
||||
if (lua_pcall (L, 2, 3, 0) != 0)
|
||||
throw std::string ("Error calling '") + function + "' - " + lua_tostring (L, -1) + ".";
|
||||
|
||||
// Call successful - get return values.
|
||||
if (!lua_isstring (L, -3))
|
||||
throw std::string ("Error: '") + function + "' did not return a modified value.";
|
||||
|
||||
if (!lua_isnumber (L, -2))
|
||||
throw std::string ("Error: '") + function + "' did not return a success indicator.";
|
||||
|
||||
if (!lua_isstring (L, -1) && !lua_isnil (L, -1))
|
||||
throw std::string ("Error: '") + function + "' did not return a message or nil.";
|
||||
|
||||
const char* new_value = lua_tostring (L, -3);
|
||||
int rc = lua_tointeger (L, -2);
|
||||
const char* message = lua_tostring (L, -1);
|
||||
|
||||
if (rc == 0)
|
||||
{
|
||||
// Overwrite with the modified value.
|
||||
value = new_value;
|
||||
|
||||
if (message)
|
||||
context.footnote (std::string ("Warning: ") + message);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (message)
|
||||
throw std::string (message);
|
||||
}
|
||||
|
||||
lua_pop (L, 1);
|
||||
return rc == 0 ? true : false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void API::loadFile (const std::string& file)
|
||||
{
|
||||
// If the file is not loaded.
|
||||
if (std::find (loaded.begin (), loaded.end (), file) == loaded.end ())
|
||||
{
|
||||
// Load the file, if possible.
|
||||
if (luaL_loadfile (L, file.c_str ()) || lua_pcall (L, 0, 0, 0))
|
||||
throw std::string ("Error: ") + std::string (lua_tostring (L, -1));
|
||||
|
||||
// Mark this as loaded, so as to not bother again.
|
||||
loaded.push_back (file);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
|
||||
74
src/API.h
Normal file
74
src/API.h
Normal file
@@ -0,0 +1,74 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2010, Paul Beckingham.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free Software
|
||||
// Foundation; either version 2 of the License, or (at your option) any later
|
||||
// version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
// details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program; if not, write to the
|
||||
//
|
||||
// Free Software Foundation, Inc.,
|
||||
// 51 Franklin Street, Fifth Floor,
|
||||
// Boston, MA
|
||||
// 02110-1301
|
||||
// USA
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef INCLUDED_API
|
||||
#define INCLUDED_API
|
||||
|
||||
#include "auto.h"
|
||||
#ifdef HAVE_LIBLUA
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "Task.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "lua.h"
|
||||
#include "lualib.h"
|
||||
#include "lauxlib.h"
|
||||
}
|
||||
|
||||
class API
|
||||
{
|
||||
public:
|
||||
API ();
|
||||
API (const API&);
|
||||
API& operator= (const API&);
|
||||
~API ();
|
||||
|
||||
void initialize ();
|
||||
bool callProgramHook (const std::string&, const std::string&);
|
||||
bool callListHook (const std::string&, const std::string&, std::vector <Task>&);
|
||||
bool callTaskHook (const std::string&, const std::string&, Task&);
|
||||
bool callFieldHook (const std::string&, const std::string&, const std::string&, std::string&);
|
||||
|
||||
private:
|
||||
void loadFile (const std::string&);
|
||||
|
||||
public:
|
||||
lua_State* L;
|
||||
std::vector <std::string> loaded;
|
||||
|
||||
// Context for the API.
|
||||
// std::vector <Task> all;
|
||||
Task current;
|
||||
// std::string& name;
|
||||
// std::string& value;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
252
src/Att.cpp
252
src/Att.cpp
@@ -1,7 +1,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// task - a command line task list manager.
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2009, Paul Beckingham.
|
||||
// Copyright 2006 - 2010, Paul Beckingham.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -25,11 +25,12 @@
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "text.h"
|
||||
#include "color.h"
|
||||
#include "Color.h"
|
||||
#include "util.h"
|
||||
#include "Date.h"
|
||||
#include "Duration.h"
|
||||
@@ -50,6 +51,8 @@ static const char* internalNames[] =
|
||||
"limit",
|
||||
"status",
|
||||
"description",
|
||||
"tags",
|
||||
// Note that annotations are not listed.
|
||||
};
|
||||
|
||||
static const char* modifiableNames[] =
|
||||
@@ -62,6 +65,7 @@ static const char* modifiableNames[] =
|
||||
"recur",
|
||||
"until",
|
||||
"wait",
|
||||
"depends",
|
||||
};
|
||||
|
||||
// Synonyms on the same line.
|
||||
@@ -77,6 +81,8 @@ static const char* modifierNames[] =
|
||||
"hasnt",
|
||||
"startswith", "left",
|
||||
"endswith", "right",
|
||||
"word",
|
||||
"noword"
|
||||
};
|
||||
|
||||
#define NUM_INTERNAL_NAMES (sizeof (internalNames) / sizeof (internalNames[0]))
|
||||
@@ -102,7 +108,7 @@ Att::Att (const std::string& name, const std::string& mod, const std::string& va
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Att::Att (const std::string& name, const std::string& mod, int value)
|
||||
{
|
||||
mName = name;
|
||||
mName = name;
|
||||
|
||||
std::stringstream s;
|
||||
s << value;
|
||||
@@ -122,7 +128,7 @@ Att::Att (const std::string& name, const std::string& value)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Att::Att (const std::string& name, int value)
|
||||
{
|
||||
mName = name;
|
||||
mName = name;
|
||||
|
||||
std::stringstream s;
|
||||
s << value;
|
||||
@@ -152,6 +158,14 @@ Att& Att::operator= (const Att& other)
|
||||
return *this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Att::operator== (const Att& other) const
|
||||
{
|
||||
return mName == other.mName &&
|
||||
mMod == other.mMod &&
|
||||
mValue == other.mValue;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Att::~Att ()
|
||||
{
|
||||
@@ -241,10 +255,11 @@ bool Att::validNameValue (
|
||||
{
|
||||
std::string error = "Ambiguous attribute '" + name + "' - could be either of "; // TODO i18n
|
||||
|
||||
std::sort (matches.begin (), matches.end ());
|
||||
std::string combined;
|
||||
join (combined, ", ", matches);
|
||||
|
||||
throw error + combined;
|
||||
throw error + combined + ".";
|
||||
}
|
||||
|
||||
name = matches[0];
|
||||
@@ -260,17 +275,18 @@ bool Att::validNameValue (
|
||||
autoComplete (mod, candidates, matches);
|
||||
|
||||
if (matches.size () == 0)
|
||||
throw std::string ("Unrecognized modifier '") + mod + "'";
|
||||
throw std::string ("Unrecognized modifier '") + mod + "'.";
|
||||
|
||||
else if (matches.size () != 1)
|
||||
{
|
||||
std::string error = "Ambiguous modifier '" + mod + "' - could be either of "; // TODO i18n
|
||||
|
||||
std::sort (matches.begin (), matches.end ());
|
||||
std::string combined;
|
||||
join (combined, ", ", matches);
|
||||
error += combined;
|
||||
|
||||
throw error + combined;
|
||||
throw error + combined + ".";
|
||||
}
|
||||
|
||||
mod = matches[0];
|
||||
@@ -319,17 +335,49 @@ bool Att::validNameValue (
|
||||
|
||||
else if (name == "fg" || name == "bg")
|
||||
{
|
||||
if (value != "")
|
||||
Text::guessColor (value);
|
||||
// TODO Determine whether color abbreviations are supported, and if so,
|
||||
// modify 'value' here accordingly.
|
||||
}
|
||||
|
||||
// Dates can now be either a date, or a duration that is added as an offset
|
||||
// to the current date.
|
||||
else if (name == "due" ||
|
||||
name == "until" ||
|
||||
name == "wait")
|
||||
{
|
||||
// Validate and convert to epoch.
|
||||
if (value != "")
|
||||
value = Date (value, context.config.get ("dateformat", "m/d/Y")).toEpochString ();
|
||||
{
|
||||
// Try parsing as a duration. If unsuccessful, try again, as a date.
|
||||
try
|
||||
{
|
||||
Date now;
|
||||
Duration dur (value);
|
||||
|
||||
if (dur.negative ())
|
||||
value = (now - (time_t)dur).toEpochString ();
|
||||
else
|
||||
value = (now + (time_t)dur).toEpochString ();
|
||||
}
|
||||
|
||||
// If the date parsing failed, try parsing as a duration. If successful,
|
||||
// add the duration to the current date. If unsuccessful, propagate the
|
||||
// original date parse error.
|
||||
|
||||
// Try parsing as a date. If unsuccessfull, throw.
|
||||
catch (...)
|
||||
{
|
||||
try
|
||||
{
|
||||
value = Date (value, context.config.get ("dateformat")).toEpochString ();
|
||||
}
|
||||
|
||||
catch (std::string& e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (name == "recur")
|
||||
@@ -342,8 +390,8 @@ bool Att::validNameValue (
|
||||
|
||||
else if (name == "limit")
|
||||
{
|
||||
if (value == "" || !digitsOnly (value))
|
||||
throw std::string ("The '") + name + "' attribute must be an integer.";
|
||||
if (value == "" || (value != "page" && !digitsOnly (value)))
|
||||
throw std::string ("The '") + name + "' attribute must be an integer, or the value 'page'.";
|
||||
}
|
||||
|
||||
else if (name == "status")
|
||||
@@ -367,7 +415,7 @@ bool Att::validNameValue (
|
||||
"\" is not a valid status. Use 'pending', 'completed', 'deleted', 'recurring' or 'waiting'.";
|
||||
}
|
||||
|
||||
else if (! validInternalName (name) &&
|
||||
else if (! validInternalName (name) &&
|
||||
! validModifiableName (name))
|
||||
throw std::string ("'") + name + "' is not a recognized attribute.";
|
||||
|
||||
@@ -375,7 +423,7 @@ bool Att::validNameValue (
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// TODO Obsolete
|
||||
// TODO Deprecated - remove.
|
||||
bool Att::validMod (const std::string& mod)
|
||||
{
|
||||
for (unsigned int i = 0; i < NUM_MODIFIER_NAMES; ++i)
|
||||
@@ -390,11 +438,11 @@ bool Att::validMod (const std::string& mod)
|
||||
std::string Att::type (const std::string& name) const
|
||||
{
|
||||
if (name == "due" ||
|
||||
name == "wait" ||
|
||||
name == "until" ||
|
||||
name == "start" ||
|
||||
name == "entry" ||
|
||||
name == "end" ||
|
||||
name == "wait")
|
||||
name == "end")
|
||||
return "date";
|
||||
|
||||
else if (name == "recur")
|
||||
@@ -403,6 +451,9 @@ std::string Att::type (const std::string& name) const
|
||||
else if (name == "limit")
|
||||
return "number";
|
||||
|
||||
else if (name == "priority")
|
||||
return "priority";
|
||||
|
||||
else
|
||||
return "text";
|
||||
}
|
||||
@@ -412,7 +463,9 @@ std::string Att::type (const std::string& name) const
|
||||
std::string Att::modType (const std::string& name) const
|
||||
{
|
||||
if (name == "hasnt" ||
|
||||
name == "isnt")
|
||||
name == "isnt" ||
|
||||
name == "not" || // TODO Verify this.
|
||||
name == "noword")
|
||||
return "negative";
|
||||
|
||||
return "positive";
|
||||
@@ -450,10 +503,10 @@ void Att::parse (Nibbler& n)
|
||||
if (validMod (mod))
|
||||
mMod = mod;
|
||||
else
|
||||
throw std::string ("The name '") + mod + "' is not a valid modifier"; // TODO i18n
|
||||
throw std::string ("The name '") + mod + "' is not a valid modifier."; // TODO i18n
|
||||
}
|
||||
else
|
||||
throw std::string ("Missing . or : after modifier"); // TODO i18n
|
||||
throw std::string ("Missing . or : after modifier."); // TODO i18n
|
||||
}
|
||||
|
||||
if (n.skip (':'))
|
||||
@@ -467,10 +520,10 @@ void Att::parse (Nibbler& n)
|
||||
}
|
||||
}
|
||||
else
|
||||
throw std::string ("Missing : after attribute name"); // TODO i18n
|
||||
throw std::string ("Missing : after attribute name."); // TODO i18n
|
||||
}
|
||||
else
|
||||
throw std::string ("Missing : after attribute name"); // TODO i18n
|
||||
throw std::string ("Missing : after attribute name."); // TODO i18n
|
||||
|
||||
/* TODO This might be too slow to include. Test this assumption.
|
||||
validNameValue (mName, mMod, mValue);
|
||||
@@ -483,32 +536,50 @@ void Att::parse (Nibbler& n)
|
||||
bool Att::match (const Att& other) const
|
||||
{
|
||||
// All matches are assumed to pass, any short-circuit on non-match.
|
||||
bool case_sensitive = context.config.getBoolean ("search.case.sensitive");
|
||||
|
||||
// If there are no mods, just perform a straight compare on value.
|
||||
if (mMod == "")
|
||||
{
|
||||
if (mValue != other.mValue)
|
||||
return false;
|
||||
// Exact matches on dates should only compare m/d/y, not h:m:s. This allows
|
||||
// comparisons like "task list due:today" (bug #405).
|
||||
std::string which = type (mName);
|
||||
if (which == "date")
|
||||
{
|
||||
if (other.mValue == "")
|
||||
return false;
|
||||
|
||||
Date left (mValue);
|
||||
Date right (other.mValue);
|
||||
|
||||
if (! left.sameDay (right))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!compare (mValue, other.mValue, (bool) case_sensitive))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// has = contains as a substring.
|
||||
else if (mMod == "has" || mMod == "contains") // TODO i18n
|
||||
{
|
||||
if (other.mValue.find (mValue) == std::string::npos)
|
||||
if (find (other.mValue, mValue, (bool) case_sensitive) == std::string::npos)
|
||||
return false;
|
||||
}
|
||||
|
||||
// is = equal. Nop.
|
||||
else if (mMod == "is" || mMod == "equals") // TODO i18n
|
||||
{
|
||||
if (mValue != other.mValue)
|
||||
if (!compare (mValue, other.mValue, (bool) case_sensitive))
|
||||
return false;
|
||||
}
|
||||
|
||||
// isnt = not equal.
|
||||
else if (mMod == "isnt" || mMod == "not") // TODO i18n
|
||||
{
|
||||
if (mValue == other.mValue)
|
||||
if (compare (mValue, other.mValue, (bool) case_sensitive))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -532,7 +603,7 @@ bool Att::match (const Att& other) const
|
||||
if (other.mValue.length () < mValue.length ())
|
||||
return false;
|
||||
|
||||
if (mValue != other.mValue.substr (0, mValue.length ()))
|
||||
if (!compare (mValue, other.mValue.substr (0, mValue.length ()), (bool) case_sensitive))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -542,16 +613,16 @@ bool Att::match (const Att& other) const
|
||||
if (other.mValue.length () < mValue.length ())
|
||||
return false;
|
||||
|
||||
if (mValue != other.mValue.substr (
|
||||
if (!compare (mValue, other.mValue.substr (
|
||||
other.mValue.length () - mValue.length (),
|
||||
std::string::npos))
|
||||
std::string::npos), (bool) case_sensitive))
|
||||
return false;
|
||||
}
|
||||
|
||||
// hasnt = does not contain as a substring.
|
||||
else if (mMod == "hasnt") // TODO i18n
|
||||
{
|
||||
if (other.mValue.find (mValue) != std::string::npos)
|
||||
if (find (other.mValue, mValue, (bool) case_sensitive) != std::string::npos)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -562,20 +633,20 @@ bool Att::match (const Att& other) const
|
||||
if (which == "duration")
|
||||
{
|
||||
Duration literal (mValue);
|
||||
Duration variable ((time_t)::atoi (other.mValue.c_str ()));
|
||||
Duration variable ((time_t)atoi (other.mValue.c_str ()));
|
||||
if (!(variable < literal))
|
||||
return false;
|
||||
}
|
||||
else if (which == "date")
|
||||
{
|
||||
Date literal (mValue.c_str (), context.config.get ("dateformat", "m/d/Y"));
|
||||
Date variable ((time_t)::atoi (other.mValue.c_str ()));
|
||||
Date literal (mValue.c_str (), context.config.get ("dateformat"));
|
||||
Date variable ((time_t)atoi (other.mValue.c_str ()));
|
||||
if (other.mValue == "" || ! (variable < literal))
|
||||
return false;
|
||||
}
|
||||
else if (which == "number")
|
||||
{
|
||||
if (::atoi (mValue.c_str ()) >= ::atoi (other.mValue.c_str ()))
|
||||
if (atoi (mValue.c_str ()) >= atoi (other.mValue.c_str ()))
|
||||
return false;
|
||||
}
|
||||
else if (which == "text")
|
||||
@@ -583,6 +654,14 @@ bool Att::match (const Att& other) const
|
||||
if (mValue <= other.mValue)
|
||||
return false;
|
||||
}
|
||||
else if (which == "priority")
|
||||
{
|
||||
if (mValue == "" ||
|
||||
other.mValue == "H" ||
|
||||
mValue == other.mValue ||
|
||||
(mValue == "L" && other.mValue == "M"))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// after = over = above = >
|
||||
@@ -592,20 +671,20 @@ bool Att::match (const Att& other) const
|
||||
if (which == "duration")
|
||||
{
|
||||
Duration literal (mValue);
|
||||
Duration variable ((time_t)::atoi (other.mValue.c_str ()));
|
||||
Duration variable ((time_t)atoi (other.mValue.c_str ()));
|
||||
if (! (variable > literal))
|
||||
return false;
|
||||
}
|
||||
else if (which == "date")
|
||||
{
|
||||
Date literal (mValue.c_str (), context.config.get ("dateformat", "m/d/Y"));
|
||||
Date variable ((time_t)::atoi (other.mValue.c_str ()));
|
||||
Date literal (mValue.c_str (), context.config.get ("dateformat"));
|
||||
Date variable ((time_t)atoi (other.mValue.c_str ()));
|
||||
if (! (variable > literal))
|
||||
return false;
|
||||
}
|
||||
else if (which == "number")
|
||||
{
|
||||
if (::atoi (mValue.c_str ()) <= ::atoi (other.mValue.c_str ()))
|
||||
if (atoi (mValue.c_str ()) <= atoi (other.mValue.c_str ()))
|
||||
return false;
|
||||
}
|
||||
else if (which == "text")
|
||||
@@ -613,6 +692,43 @@ bool Att::match (const Att& other) const
|
||||
if (mValue >= other.mValue)
|
||||
return false;
|
||||
}
|
||||
else if (which == "priority")
|
||||
{
|
||||
if (mValue == "H" ||
|
||||
other.mValue == "" ||
|
||||
mValue == other.mValue ||
|
||||
(mValue == "M" && other.mValue == "L"))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// word = contains as a substring, with word boundaries.
|
||||
else if (mMod == "word") // TODO i18n
|
||||
{
|
||||
// Fail if the substring is not found.
|
||||
std::string::size_type sub = find (other.mValue, mValue, (bool) case_sensitive);
|
||||
if (sub == std::string::npos)
|
||||
return false;
|
||||
|
||||
// Also fail if there is no word boundary at beginning and end.
|
||||
if (!isWordStart (other.mValue, sub))
|
||||
return false;
|
||||
|
||||
if (!isWordEnd (other.mValue, sub + mValue.length () - 1))
|
||||
return false;
|
||||
}
|
||||
|
||||
// noword = does not contain as a substring, with word boundaries.
|
||||
else if (mMod == "noword") // TODO i18n
|
||||
{
|
||||
// Fail if the substring is not found.
|
||||
std::string::size_type sub = find (other.mValue, mValue);
|
||||
if (sub != std::string::npos &&
|
||||
isWordStart (other.mValue, sub) &&
|
||||
isWordEnd (other.mValue, sub + mValue.length () - 1))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -640,7 +756,7 @@ std::string Att::composeF4 () const
|
||||
void Att::mod (const std::string& input)
|
||||
{
|
||||
if (input != "" && !validMod (input))
|
||||
throw std::string ("The name '") + input + "' is not a valid modifier"; // TODO i18n
|
||||
throw std::string ("The name '") + input + "' is not a valid modifier."; // TODO i18n
|
||||
|
||||
mMod = input;
|
||||
}
|
||||
@@ -678,7 +794,20 @@ void Att::value (const std::string& value)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Att::value_int () const
|
||||
{
|
||||
return ::atoi (mValue.c_str ());
|
||||
return atoi (mValue.c_str ());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Att::allNames (std::vector <std::string>& all)
|
||||
{
|
||||
all.clear ();
|
||||
|
||||
unsigned int i;
|
||||
for (i = 0; i < NUM_INTERNAL_NAMES; ++i)
|
||||
all.push_back (internalNames[i]);
|
||||
|
||||
for (i = 0; i < NUM_MODIFIABLE_NAMES; ++i)
|
||||
all.push_back (modifiableNames[i]);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -710,11 +839,9 @@ void Att::dequote (std::string& value) const
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Encode values prior to serialization.
|
||||
// \t -> &tab;
|
||||
// " -> "
|
||||
// , -> ,
|
||||
// " -> &dquot;
|
||||
// [ -> &open;
|
||||
// ] -> &close;
|
||||
// : -> :
|
||||
void Att::encode (std::string& value) const
|
||||
{
|
||||
std::string::size_type i;
|
||||
@@ -722,23 +849,14 @@ void Att::encode (std::string& value) const
|
||||
while ((i = value.find ('\t')) != std::string::npos)
|
||||
value.replace (i, 1, "&tab;"); // no i18n
|
||||
|
||||
while ((i = value.find ('\'')) != std::string::npos)
|
||||
value.replace (i, 1, "&squot;"); // no i18n
|
||||
|
||||
while ((i = value.find ('"')) != std::string::npos)
|
||||
value.replace (i, 1, "&dquot;"); // no i18n
|
||||
|
||||
while ((i = value.find (',')) != std::string::npos)
|
||||
value.replace (i, 1, ","); // no i18n
|
||||
|
||||
while ((i = value.find ('[')) != std::string::npos)
|
||||
value.replace (i, 1, "&open;"); // no i18n
|
||||
|
||||
while ((i = value.find (']')) != std::string::npos)
|
||||
value.replace (i, 1, "&close;"); // no i18n
|
||||
|
||||
while ((i = value.find (':')) != std::string::npos)
|
||||
value.replace (i, 1, ":"); // no i18n
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -754,28 +872,32 @@ void Att::decode (std::string& value) const
|
||||
{
|
||||
std::string::size_type i;
|
||||
|
||||
while ((i = value.find ("&tab;")) != std::string::npos) // no i18n
|
||||
// Supported encodings.
|
||||
while ((i = value.find ("&tab;")) != std::string::npos)
|
||||
value.replace (i, 5, "\t");
|
||||
|
||||
while ((i = value.find ("&dquot;")) != std::string::npos) // no i18n
|
||||
while ((i = value.find ("&dquot;")) != std::string::npos)
|
||||
value.replace (i, 7, "\"");
|
||||
|
||||
while ((i = value.find ("&squot;")) != std::string::npos) // no i18n
|
||||
value.replace (i, 7, "'");
|
||||
|
||||
while ((i = value.find (""")) != std::string::npos) // no i18n
|
||||
while ((i = value.find (""")) != std::string::npos)
|
||||
value.replace (i, 6, "\"");
|
||||
|
||||
while ((i = value.find (",")) != std::string::npos) // no i18n
|
||||
value.replace (i, 7, ",");
|
||||
|
||||
while ((i = value.find ("&open;")) != std::string::npos) // no i18n
|
||||
while ((i = value.find ("&open;")) != std::string::npos)
|
||||
value.replace (i, 6, "[");
|
||||
|
||||
while ((i = value.find ("&close;")) != std::string::npos) // no i18n
|
||||
while ((i = value.find ("&close;")) != std::string::npos)
|
||||
value.replace (i, 7, "]");
|
||||
|
||||
while ((i = value.find (":")) != std::string::npos) // no i18n
|
||||
// Support for deprecated encodings. These cannot be removed or old files
|
||||
// will not be parsable. Not just old files - completed.data can contain
|
||||
// tasks formatted/encoded using these.
|
||||
while ((i = value.find ("&squot;")) != std::string::npos)
|
||||
value.replace (i, 7, "'");
|
||||
|
||||
while ((i = value.find (",")) != std::string::npos)
|
||||
value.replace (i, 7, ",");
|
||||
|
||||
while ((i = value.find (":")) != std::string::npos)
|
||||
value.replace (i, 7, ":");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// task - a command line task list manager.
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2009, Paul Beckingham.
|
||||
// Copyright 2006 - 2010, Paul Beckingham.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -41,6 +41,7 @@ public:
|
||||
Att (const std::string&, int);
|
||||
Att (const Att&);
|
||||
Att& operator= (const Att&);
|
||||
bool operator== (const Att&) const;
|
||||
~Att ();
|
||||
|
||||
bool valid (const std::string&) const;
|
||||
@@ -69,6 +70,8 @@ public:
|
||||
int value_int () const;
|
||||
void value_int (int);
|
||||
|
||||
static void allNames (std::vector <std::string>&);
|
||||
|
||||
private:
|
||||
void enquote (std::string&) const;
|
||||
void dequote (std::string&) const;
|
||||
|
||||
185
src/Cmd.cpp
185
src/Cmd.cpp
@@ -1,7 +1,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// task - a command line task list manager.
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2009, Paul Beckingham.
|
||||
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -26,12 +26,12 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <algorithm>
|
||||
#include "Cmd.h"
|
||||
#include "Context.h"
|
||||
#include "util.h"
|
||||
#include "text.h"
|
||||
#include "i18n.h"
|
||||
#include "main.h"
|
||||
#include <Cmd.h>
|
||||
#include <Context.h>
|
||||
#include <util.h>
|
||||
#include <text.h>
|
||||
#include <i18n.h>
|
||||
#include <main.h>
|
||||
|
||||
extern Context context;
|
||||
|
||||
@@ -55,45 +55,67 @@ Cmd::~Cmd ()
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Determines whether the string represents a unique command name or custom
|
||||
// report name.
|
||||
//
|
||||
// To be a valid command:
|
||||
// 1. 'input' should autocomplete to one of 'commands'.
|
||||
bool Cmd::valid (const std::string& input)
|
||||
{
|
||||
load ();
|
||||
|
||||
std::vector <std::string> matches;
|
||||
autoComplete (lowerCase (context.canonicalize (input)), commands, matches);
|
||||
return matches.size () == 1 ? true : false;
|
||||
autoComplete (lowerCase (input), commands, matches);
|
||||
if (matches.size () == 1)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Determines whether the string represents a valid custom report name.
|
||||
//
|
||||
// To be a valid custom command:
|
||||
// 1. 'input' should autocomplete to one of 'commands'.
|
||||
// 2. the result, canonicalized, should autocomplete to one of
|
||||
// 'customreports'.
|
||||
bool Cmd::validCustom (const std::string& input)
|
||||
{
|
||||
load ();
|
||||
|
||||
std::vector <std::string> matches;
|
||||
autoComplete (lowerCase (context.canonicalize (input)), customReports, matches);
|
||||
return matches.size () == 1 ? true : false;
|
||||
autoComplete (lowerCase (input), commands, matches);
|
||||
if (matches.size () == 1)
|
||||
{
|
||||
std::string canonical = context.canonicalize (matches[0]);
|
||||
matches.clear ();
|
||||
autoComplete (canonical, customReports, matches);
|
||||
if (matches.size () == 1)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// To be a valid custom command:
|
||||
// 1. 'input' should autocomplete to one of 'commands'.
|
||||
// 2. the result may then canonicalize to another command.
|
||||
void Cmd::parse (const std::string& input)
|
||||
{
|
||||
load ();
|
||||
|
||||
std::string candidate = lowerCase (context.canonicalize (input));
|
||||
|
||||
std::vector <std::string> matches;
|
||||
autoComplete (candidate, commands, matches);
|
||||
autoComplete (input, commands, matches);
|
||||
if (1 == matches.size ())
|
||||
command = matches[0];
|
||||
command = context.canonicalize (matches[0]);
|
||||
|
||||
else if (0 == matches.size ())
|
||||
command = "";
|
||||
|
||||
else
|
||||
{
|
||||
std::string error = "Ambiguous command '" + candidate + "' - could be either of "; // TODO i18n
|
||||
std::string error = "Ambiguous command '" + input + "' - could be either of "; // TODO i18n
|
||||
|
||||
std::sort (matches.begin (), matches.end ());
|
||||
std::string combined;
|
||||
join (combined, ", ", matches);
|
||||
throw error + combined;
|
||||
@@ -105,38 +127,56 @@ void Cmd::load ()
|
||||
{
|
||||
if (commands.size () == 0)
|
||||
{
|
||||
// Commands whose names are not localized.
|
||||
commands.push_back ("_projects");
|
||||
commands.push_back ("_tags");
|
||||
commands.push_back ("_commands");
|
||||
commands.push_back ("_ids");
|
||||
commands.push_back ("_config");
|
||||
commands.push_back (context.stringtable.get (CMD_ADD, "add"));
|
||||
commands.push_back (context.stringtable.get (CMD_APPEND, "append"));
|
||||
commands.push_back (context.stringtable.get (CMD_ANNOTATE, "annotate"));
|
||||
commands.push_back (context.stringtable.get (CMD_CALENDAR, "calendar"));
|
||||
commands.push_back (context.stringtable.get (CMD_COLORS, "colors"));
|
||||
commands.push_back (context.stringtable.get (CMD_DELETE, "delete"));
|
||||
commands.push_back (context.stringtable.get (CMD_DONE, "done"));
|
||||
commands.push_back (context.stringtable.get (CMD_DUPLICATE, "duplicate"));
|
||||
commands.push_back (context.stringtable.get (CMD_EDIT, "edit"));
|
||||
commands.push_back (context.stringtable.get (CMD_EXPORT, "export"));
|
||||
commands.push_back (context.stringtable.get (CMD_HELP, "help"));
|
||||
commands.push_back (context.stringtable.get (CMD_HISTORY, "history"));
|
||||
commands.push_back (context.stringtable.get (CMD_GHISTORY, "ghistory"));
|
||||
commands.push_back (context.stringtable.get (CMD_IMPORT, "import"));
|
||||
commands.push_back (context.stringtable.get (CMD_INFO, "info"));
|
||||
commands.push_back (context.stringtable.get (CMD_PROJECTS, "projects"));
|
||||
commands.push_back ("_version");
|
||||
commands.push_back ("_urgency");
|
||||
commands.push_back ("export.csv");
|
||||
commands.push_back ("export.ical");
|
||||
commands.push_back ("export.yaml");
|
||||
commands.push_back ("history.monthly");
|
||||
commands.push_back ("history.annual");
|
||||
commands.push_back ("ghistory.monthly");
|
||||
commands.push_back ("ghistory.annual");
|
||||
|
||||
// Commands whose names are localized.
|
||||
commands.push_back (context.stringtable.get (CMD_ADD, "add"));
|
||||
commands.push_back (context.stringtable.get (CMD_APPEND, "append"));
|
||||
commands.push_back (context.stringtable.get (CMD_ANNOTATE, "annotate"));
|
||||
commands.push_back (context.stringtable.get (CMD_DENOTATE, "denotate"));
|
||||
commands.push_back (context.stringtable.get (CMD_CALENDAR, "calendar"));
|
||||
commands.push_back (context.stringtable.get (CMD_COLORS, "colors"));
|
||||
commands.push_back (context.stringtable.get (CMD_CONFIG, "config"));
|
||||
commands.push_back (context.stringtable.get (CMD_SHOW, "show"));
|
||||
commands.push_back (context.stringtable.get (CMD_DELETE, "delete"));
|
||||
commands.push_back (context.stringtable.get (CMD_DIAGNOSTICS, "diagnostics"));
|
||||
commands.push_back (context.stringtable.get (CMD_DONE, "done"));
|
||||
commands.push_back (context.stringtable.get (CMD_DUPLICATE, "duplicate"));
|
||||
commands.push_back (context.stringtable.get (CMD_EDIT, "edit"));
|
||||
commands.push_back (context.stringtable.get (CMD_HELP, "help"));
|
||||
commands.push_back (context.stringtable.get (CMD_IMPORT, "import"));
|
||||
commands.push_back (context.stringtable.get (CMD_INFO, "info"));
|
||||
commands.push_back (context.stringtable.get (CMD_LOG, "log"));
|
||||
commands.push_back (context.stringtable.get (CMD_PREPEND, "prepend"));
|
||||
commands.push_back (context.stringtable.get (CMD_PROJECTS, "projects"));
|
||||
#ifdef FEATURE_SHELL
|
||||
commands.push_back (context.stringtable.get (CMD_SHELL, "shell"));
|
||||
commands.push_back (context.stringtable.get (CMD_SHELL, "shell"));
|
||||
#endif
|
||||
commands.push_back (context.stringtable.get (CMD_START, "start"));
|
||||
commands.push_back (context.stringtable.get (CMD_STATS, "stats"));
|
||||
commands.push_back (context.stringtable.get (CMD_STOP, "stop"));
|
||||
commands.push_back (context.stringtable.get (CMD_SUMMARY, "summary"));
|
||||
commands.push_back (context.stringtable.get (CMD_TAGS, "tags"));
|
||||
commands.push_back (context.stringtable.get (CMD_TIMESHEET, "timesheet"));
|
||||
commands.push_back (context.stringtable.get (CMD_UNDO, "undo"));
|
||||
commands.push_back (context.stringtable.get (CMD_VERSION, "version"));
|
||||
commands.push_back (context.stringtable.get (CMD_START, "start"));
|
||||
commands.push_back (context.stringtable.get (CMD_STATS, "stats"));
|
||||
commands.push_back (context.stringtable.get (CMD_STOP, "stop"));
|
||||
commands.push_back (context.stringtable.get (CMD_SUMMARY, "summary"));
|
||||
commands.push_back (context.stringtable.get (CMD_TAGS, "tags"));
|
||||
commands.push_back (context.stringtable.get (CMD_TIMESHEET, "timesheet"));
|
||||
commands.push_back (context.stringtable.get (CMD_UNDO, "undo"));
|
||||
commands.push_back (context.stringtable.get (CMD_VERSION, "version"));
|
||||
commands.push_back (context.stringtable.get (CMD_MERGE, "merge"));
|
||||
commands.push_back (context.stringtable.get (CMD_PUSH, "push"));
|
||||
commands.push_back (context.stringtable.get (CMD_PULL, "pull"));
|
||||
|
||||
// Now load the custom reports.
|
||||
std::vector <std::string> all;
|
||||
@@ -146,7 +186,7 @@ void Cmd::load ()
|
||||
{
|
||||
if (i->substr (0, 7) == "report.")
|
||||
{
|
||||
std::string report = i->substr (7, std::string::npos);
|
||||
std::string report = i->substr (7);
|
||||
std::string::size_type columns = report.find (".columns");
|
||||
if (columns != std::string::npos)
|
||||
{
|
||||
@@ -164,6 +204,10 @@ void Cmd::load ()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now load the aliases.
|
||||
foreach (i, context.aliases)
|
||||
commands.push_back (i->first);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,25 +230,35 @@ void Cmd::allCommands (std::vector <std::string>& all) const
|
||||
// Commands that do not directly modify the data files.
|
||||
bool Cmd::isReadOnlyCommand ()
|
||||
{
|
||||
if (command == "_projects" ||
|
||||
command == "_tags" ||
|
||||
command == "_commands" ||
|
||||
command == "_ids" ||
|
||||
command == "_config" ||
|
||||
command == context.stringtable.get (CMD_CALENDAR, "calendar") ||
|
||||
command == context.stringtable.get (CMD_COLORS, "colors") ||
|
||||
command == context.stringtable.get (CMD_EXPORT, "export") ||
|
||||
command == context.stringtable.get (CMD_HELP, "help") ||
|
||||
command == context.stringtable.get (CMD_HISTORY, "history") ||
|
||||
command == context.stringtable.get (CMD_GHISTORY, "ghistory") ||
|
||||
command == context.stringtable.get (CMD_INFO, "info") ||
|
||||
command == context.stringtable.get (CMD_PROJECTS, "projects") ||
|
||||
command == context.stringtable.get (CMD_SHELL, "shell") ||
|
||||
command == context.stringtable.get (CMD_STATS, "stats") ||
|
||||
command == context.stringtable.get (CMD_SUMMARY, "summary") ||
|
||||
command == context.stringtable.get (CMD_TAGS, "tags") ||
|
||||
command == context.stringtable.get (CMD_TIMESHEET, "timesheet") ||
|
||||
command == context.stringtable.get (CMD_VERSION, "version") ||
|
||||
if (command == "_projects" ||
|
||||
command == "_tags" ||
|
||||
command == "_commands" ||
|
||||
command == "_ids" ||
|
||||
command == "_config" ||
|
||||
command == "_version" ||
|
||||
command == "_urgency" ||
|
||||
command == "export.csv" ||
|
||||
command == "export.ical" ||
|
||||
command == "export.yaml" ||
|
||||
command == "history.monthly" ||
|
||||
command == "history.annual" ||
|
||||
command == "ghistory.monthly" ||
|
||||
command == "ghistory.annual" ||
|
||||
command == context.stringtable.get (CMD_CALENDAR, "calendar") ||
|
||||
command == context.stringtable.get (CMD_COLORS, "colors") ||
|
||||
command == context.stringtable.get (CMD_DIAGNOSTICS, "diagnostics") ||
|
||||
command == context.stringtable.get (CMD_CONFIG, "config") ||
|
||||
command == context.stringtable.get (CMD_SHOW, "show") ||
|
||||
command == context.stringtable.get (CMD_HELP, "help") ||
|
||||
command == context.stringtable.get (CMD_INFO, "info") ||
|
||||
command == context.stringtable.get (CMD_PROJECTS, "projects") ||
|
||||
command == context.stringtable.get (CMD_PUSH, "push") ||
|
||||
command == context.stringtable.get (CMD_SHELL, "shell") ||
|
||||
command == context.stringtable.get (CMD_STATS, "stats") ||
|
||||
command == context.stringtable.get (CMD_SUMMARY, "summary") ||
|
||||
command == context.stringtable.get (CMD_TAGS, "tags") ||
|
||||
command == context.stringtable.get (CMD_TIMESHEET, "timesheet") ||
|
||||
command == context.stringtable.get (CMD_VERSION, "version") ||
|
||||
validCustom (command))
|
||||
return true;
|
||||
|
||||
@@ -215,14 +269,19 @@ bool Cmd::isReadOnlyCommand ()
|
||||
// Commands that directly modify the data files.
|
||||
bool Cmd::isWriteCommand ()
|
||||
{
|
||||
if (command == context.stringtable.get (CMD_ADD, "add") ||
|
||||
if (command == context.stringtable.get (CMD_MERGE, "merge") ||
|
||||
command == context.stringtable.get (CMD_ADD, "add") ||
|
||||
command == context.stringtable.get (CMD_APPEND, "append") ||
|
||||
command == context.stringtable.get (CMD_ANNOTATE, "annotate") ||
|
||||
command == context.stringtable.get (CMD_DENOTATE, "denotate") ||
|
||||
command == context.stringtable.get (CMD_DELETE, "delete") ||
|
||||
command == context.stringtable.get (CMD_DONE, "done") ||
|
||||
command == context.stringtable.get (CMD_DUPLICATE, "duplicate") ||
|
||||
command == context.stringtable.get (CMD_EDIT, "edit") ||
|
||||
command == context.stringtable.get (CMD_IMPORT, "import") ||
|
||||
command == context.stringtable.get (CMD_LOG, "log") ||
|
||||
command == context.stringtable.get (CMD_PREPEND, "prepend") ||
|
||||
command == context.stringtable.get (CMD_PULL, "pull") ||
|
||||
command == context.stringtable.get (CMD_START, "start") ||
|
||||
command == context.stringtable.get (CMD_STOP, "stop") ||
|
||||
command == context.stringtable.get (CMD_UNDO, "undo"))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// task - a command line task list manager.
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2009, Paul Beckingham.
|
||||
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
|
||||
562
src/Color.cpp
Normal file
562
src/Color.cpp
Normal file
@@ -0,0 +1,562 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2010, Paul Beckingham.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free Software
|
||||
// Foundation; either version 2 of the License, or (at your option) any later
|
||||
// version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
// details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program; if not, write to the
|
||||
//
|
||||
// Free Software Foundation, Inc.,
|
||||
// 51 Franklin Street, Fifth Floor,
|
||||
// Boston, MA
|
||||
// 02110-1301
|
||||
// USA
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include "Color.h"
|
||||
#include "text.h"
|
||||
#include "i18n.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static struct
|
||||
{
|
||||
Color::color_id id;
|
||||
int string_id;
|
||||
std::string english_name;
|
||||
int index; // offset red=3 (therefore fg=33, bg=43)
|
||||
} allColors[] =
|
||||
{
|
||||
// Color.h enum i18n.h English Index
|
||||
{ Color::nocolor, 0, "none", 0},
|
||||
{ Color::black, CCOLOR_BLACK, "black", 1}, // fg 29+0 bg 39+0
|
||||
{ Color::red, CCOLOR_RED, "red", 2},
|
||||
{ Color::green, CCOLOR_GREEN, "green", 3},
|
||||
{ Color::yellow, CCOLOR_YELLOW, "yellow", 4},
|
||||
{ Color::blue, CCOLOR_BLUE, "blue", 5},
|
||||
{ Color::magenta, CCOLOR_MAGENTA, "magenta", 6},
|
||||
{ Color::cyan, CCOLOR_CYAN, "cyan", 7},
|
||||
{ Color::white, CCOLOR_WHITE, "white", 8},
|
||||
|
||||
};
|
||||
|
||||
#define NUM_COLORS (sizeof (allColors) / sizeof (allColors[0]))
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Color::Color ()
|
||||
: value (0)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Color::Color (const Color& other)
|
||||
{
|
||||
value = other.value;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Color::Color (unsigned int c)
|
||||
: value (0)
|
||||
{
|
||||
if (!(c & _COLOR_HASFG)) value &= ~_COLOR_FG;
|
||||
if (!(c & _COLOR_HASBG)) value &= ~_COLOR_BG;
|
||||
|
||||
value = c & (_COLOR_256 | _COLOR_HASBG | _COLOR_HASFG |_COLOR_UNDERLINE |
|
||||
_COLOR_BOLD | _COLOR_BRIGHT | _COLOR_BG | _COLOR_FG);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Supports the following constructs:
|
||||
// [bright] [color] [on color] [bright] [underline]
|
||||
//
|
||||
// Where [color] is one of:
|
||||
// black
|
||||
// red
|
||||
// ...
|
||||
// grayN 0 <= N <= 23 fg 38;5;232 + N bg 48;5;232 + N
|
||||
// greyN 0 <= N <= 23 fg 38;5;232 + N bg 48;5;232 + N
|
||||
// colorN 0 <= N <= 255 fg 38;5;N bg 48;5;N
|
||||
// rgbRGB 0 <= R,G,B <= 5 fg 38;5;16 + R*36 + G*6 + B bg 48;5;16 + R*36 + G*6 + B
|
||||
Color::Color (const std::string& spec)
|
||||
: value (0)
|
||||
{
|
||||
// By converting underscores to spaces, we inherently support the old "on_red"
|
||||
// style of specifying background colors. We consider underscores to be
|
||||
// deprecated.
|
||||
std::string modifiable_spec = spec;
|
||||
std::replace (modifiable_spec.begin (), modifiable_spec.end (), '_', ' ');
|
||||
|
||||
// Split spec into words.
|
||||
std::vector <std::string> words;
|
||||
split (words, modifiable_spec, ' ');
|
||||
|
||||
// Construct the color as two separate colors, then blend them later. This
|
||||
// make it possible to declare a color such as "color1 on black", and have
|
||||
// the upgrade work properly.
|
||||
unsigned int fg_value = 0;
|
||||
unsigned int bg_value = 0;
|
||||
|
||||
bool bg = false;
|
||||
int index;
|
||||
std::string word;
|
||||
std::vector <std::string>::iterator it;
|
||||
for (it = words.begin (); it != words.end (); ++it)
|
||||
{
|
||||
word = lowerCase (trim (*it));
|
||||
|
||||
if (word == "bold") fg_value |= _COLOR_BOLD;
|
||||
else if (word == "bright") bg_value |= _COLOR_BRIGHT;
|
||||
else if (word == "underline") fg_value |= _COLOR_UNDERLINE;
|
||||
else if (word == "on") bg = true;
|
||||
|
||||
// X where X is one of black, red, blue ...
|
||||
else if ((index = find (word)) != -1)
|
||||
{
|
||||
if (index)
|
||||
{
|
||||
if (bg)
|
||||
{
|
||||
bg_value |= _COLOR_HASBG;
|
||||
bg_value |= index << 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
fg_value |= _COLOR_HASFG;
|
||||
fg_value |= index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// greyN/grayN, where 0 <= N <= 23.
|
||||
else if (word.substr (0, 4) == "grey" ||
|
||||
word.substr (0, 4) == "gray")
|
||||
{
|
||||
index = atoi (word.substr (4).c_str ());
|
||||
if (index < 0 || index > 23)
|
||||
throw std::string ("The color '") + *it + "' is not recognized.";
|
||||
|
||||
if (bg)
|
||||
{
|
||||
bg_value |= _COLOR_HASBG;
|
||||
bg_value |= (index + 232) << 8;
|
||||
bg_value |= _COLOR_256;
|
||||
}
|
||||
else
|
||||
{
|
||||
fg_value |= _COLOR_HASFG;
|
||||
fg_value |= index + 232;
|
||||
fg_value |= _COLOR_256;
|
||||
}
|
||||
}
|
||||
|
||||
// rgbRGB, where 0 <= R,G,B <= 5.
|
||||
else if (word.substr (0, 3) == "rgb")
|
||||
{
|
||||
index = atoi (word.substr (3).c_str ());
|
||||
if (word.length () != 6 ||
|
||||
index < 0 || index > 555)
|
||||
throw std::string ("The color '") + *it + "' is not recognized.";
|
||||
|
||||
int r = atoi (word.substr (3, 1).c_str ());
|
||||
int g = atoi (word.substr (4, 1).c_str ());
|
||||
int b = atoi (word.substr (5, 1).c_str ());
|
||||
if (r < 0 || r > 5 ||
|
||||
g < 0 || g > 5 ||
|
||||
b < 0 || b > 5)
|
||||
throw std::string ("The color '") + *it + "' is not recognized.";
|
||||
|
||||
index = 16 + r*36 + g*6 + b;
|
||||
|
||||
if (bg)
|
||||
{
|
||||
bg_value |= _COLOR_HASBG;
|
||||
bg_value |= index << 8;
|
||||
bg_value |= _COLOR_256;
|
||||
}
|
||||
else
|
||||
{
|
||||
fg_value |= _COLOR_HASFG;
|
||||
fg_value |= index;
|
||||
fg_value |= _COLOR_256;
|
||||
}
|
||||
}
|
||||
|
||||
// colorN, where 0 <= N <= 255.
|
||||
else if (word.substr (0, 5) == "color")
|
||||
{
|
||||
index = atoi (word.substr (5).c_str ());
|
||||
if (index < 0 || index > 255)
|
||||
throw std::string ("The color '") + *it + "' is not recognized.";
|
||||
|
||||
upgrade ();
|
||||
|
||||
if (bg)
|
||||
{
|
||||
bg_value |= _COLOR_HASBG;
|
||||
bg_value |= index << 8;
|
||||
bg_value |= _COLOR_256;
|
||||
}
|
||||
else
|
||||
{
|
||||
fg_value |= _COLOR_HASFG;
|
||||
fg_value |= index;
|
||||
fg_value |= _COLOR_256;
|
||||
}
|
||||
}
|
||||
else if (word != "")
|
||||
throw std::string ("The color '") + *it + "' is not recognized.";
|
||||
}
|
||||
|
||||
// Now combine the fg and bg into a single color.
|
||||
value = fg_value;
|
||||
blend (Color (bg_value));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Color::Color (color_id fg)
|
||||
: value (0)
|
||||
{
|
||||
if (fg != Color::nocolor)
|
||||
{
|
||||
value |= _COLOR_HASFG;
|
||||
value |= fg;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Color::Color (color_id fg, color_id bg)
|
||||
: value (0)
|
||||
{
|
||||
if (bg != Color::nocolor)
|
||||
{
|
||||
value |= _COLOR_HASBG;
|
||||
value |= (bg << 8);
|
||||
}
|
||||
|
||||
if (fg != Color::nocolor)
|
||||
{
|
||||
value |= _COLOR_HASFG;
|
||||
value |= fg;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Color::Color (color_id fg, color_id bg, bool underline, bool bold, bool bright)
|
||||
: value (0)
|
||||
{
|
||||
value |= ((underline ? 1 : 0) << 18)
|
||||
| ((bold ? 1 : 0) << 17)
|
||||
| ((bright ? 1 : 0) << 16);
|
||||
|
||||
if (bg != Color::nocolor)
|
||||
{
|
||||
value |= _COLOR_HASBG;
|
||||
value |= (bg << 8);
|
||||
}
|
||||
|
||||
if (fg != Color::nocolor)
|
||||
{
|
||||
value |= _COLOR_HASFG;
|
||||
value |= fg;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Color::~Color ()
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Color& Color::operator= (const Color& other)
|
||||
{
|
||||
if (this != &other)
|
||||
value = other.value;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Color::operator std::string () const
|
||||
{
|
||||
std::string description;
|
||||
if (value & _COLOR_BOLD) description += "bold";
|
||||
|
||||
if (value & _COLOR_UNDERLINE)
|
||||
description += std::string (description.length () ? " " : "") + "underline";
|
||||
|
||||
if (value & _COLOR_HASFG)
|
||||
description += std::string (description.length () ? " " : "") + fg ();
|
||||
|
||||
if (value & _COLOR_HASBG)
|
||||
{
|
||||
description += std::string (description.length () ? " " : "") + "on";
|
||||
|
||||
if (value & _COLOR_BRIGHT)
|
||||
description += std::string (description.length () ? " " : "") + "bright";
|
||||
|
||||
description += " " + bg ();
|
||||
}
|
||||
|
||||
return description;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Color::operator int () const
|
||||
{
|
||||
return (int) value;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// If 'other' has styles that are compatible, merge them into this. Colors in
|
||||
// other take precedence.
|
||||
void Color::blend (const Color& other)
|
||||
{
|
||||
Color c (other);
|
||||
value |= (c.value & _COLOR_UNDERLINE); // Always inherit underline.
|
||||
|
||||
// 16 <-- 16.
|
||||
if (!(value & _COLOR_256) &&
|
||||
!(c.value & _COLOR_256))
|
||||
{
|
||||
value |= (c.value & _COLOR_BOLD); // Inherit bold.
|
||||
value |= (c.value & _COLOR_BRIGHT); // Inherit bright.
|
||||
|
||||
if (c.value & _COLOR_HASFG)
|
||||
{
|
||||
value |= _COLOR_HASFG; // There is now a color.
|
||||
value &= ~_COLOR_FG; // Remove previous color.
|
||||
value |= (c.value & _COLOR_FG); // Apply other color.
|
||||
}
|
||||
|
||||
if (c.value & _COLOR_HASBG)
|
||||
{
|
||||
value |= _COLOR_HASBG; // There is now a color.
|
||||
value &= ~_COLOR_BG; // Remove previous color.
|
||||
value |= (c.value & _COLOR_BG); // Apply other color.
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Upgrade either color, if necessary.
|
||||
if (!(value & _COLOR_256)) upgrade ();
|
||||
if (!(c.value & _COLOR_256)) c.upgrade ();
|
||||
|
||||
// 256 <-- 256.
|
||||
if (c.value & _COLOR_HASFG)
|
||||
{
|
||||
value |= _COLOR_HASFG; // There is now a color.
|
||||
value &= ~_COLOR_FG; // Remove previous color.
|
||||
value |= (c.value & _COLOR_FG); // Apply other color.
|
||||
}
|
||||
|
||||
if (c.value & _COLOR_HASBG)
|
||||
{
|
||||
value |= _COLOR_HASBG; // There is now a color.
|
||||
value &= ~_COLOR_BG; // Remove previous color.
|
||||
value |= (c.value & _COLOR_BG); // Apply other color.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Color::upgrade ()
|
||||
{
|
||||
if (!(value & _COLOR_256))
|
||||
{
|
||||
if (value & _COLOR_HASFG)
|
||||
{
|
||||
bool bold = value & _COLOR_BOLD;
|
||||
unsigned int fg = value & _COLOR_FG;
|
||||
value &= ~_COLOR_FG;
|
||||
value &= ~_COLOR_BOLD;
|
||||
value |= (bold ? fg + 7 : fg - 1);
|
||||
}
|
||||
|
||||
if (value & _COLOR_HASBG)
|
||||
{
|
||||
bool bright = value & _COLOR_BRIGHT;
|
||||
unsigned int bg = (value & _COLOR_BG) >> 8;
|
||||
value &= ~_COLOR_BG;
|
||||
value &= ~_COLOR_BRIGHT;
|
||||
value |= (bright ? bg + 7 : bg - 1) << 8;
|
||||
}
|
||||
|
||||
value |= _COLOR_256;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Sample color codes:
|
||||
// red \033[31m
|
||||
// bold red \033[91m
|
||||
// underline red \033[4;31m
|
||||
// bold underline red \033[1;4;31m
|
||||
//
|
||||
// on red \033[41m
|
||||
// on bright red \033[101m
|
||||
//
|
||||
// 256 fg \033[38;5;Nm
|
||||
// 256 bg \033[48;5;Nm
|
||||
std::string Color::colorize (const std::string& input)
|
||||
{
|
||||
if (value == 0)
|
||||
return input;
|
||||
|
||||
int count = 0;
|
||||
std::stringstream result;
|
||||
|
||||
// 256 color
|
||||
if (value & _COLOR_256)
|
||||
{
|
||||
bool needTerminator = false;
|
||||
|
||||
if (value & _COLOR_UNDERLINE)
|
||||
{
|
||||
result << "\033[4m";
|
||||
needTerminator = true;
|
||||
}
|
||||
|
||||
if (value & _COLOR_HASFG)
|
||||
{
|
||||
result << "\033[38;5;" << (value & _COLOR_FG) << "m";
|
||||
needTerminator = true;
|
||||
}
|
||||
|
||||
if (value & _COLOR_HASBG)
|
||||
{
|
||||
result << "\033[48;5;" << ((value & _COLOR_BG) >> 8) << "m";
|
||||
needTerminator = true;
|
||||
}
|
||||
|
||||
result << input;
|
||||
if (needTerminator)
|
||||
result << "\033[0m";
|
||||
|
||||
return result.str ();
|
||||
}
|
||||
|
||||
// 16 color
|
||||
if (value != 0)
|
||||
{
|
||||
result << "\033[";
|
||||
|
||||
if (value & _COLOR_BOLD)
|
||||
{
|
||||
if (count++) result << ";";
|
||||
result << "1";
|
||||
}
|
||||
|
||||
if (value & _COLOR_UNDERLINE)
|
||||
{
|
||||
if (count++) result << ";";
|
||||
result << "4";
|
||||
}
|
||||
|
||||
if (value & _COLOR_HASFG)
|
||||
{
|
||||
if (count++) result << ";";
|
||||
result << (29 + (value & _COLOR_FG));
|
||||
}
|
||||
|
||||
if (value & _COLOR_HASBG)
|
||||
{
|
||||
if (count++) result << ";";
|
||||
result << ((value & _COLOR_BRIGHT ? 99 : 39) + ((value & _COLOR_BG) >> 8));
|
||||
}
|
||||
|
||||
result << "m" << input << "\033[0m";
|
||||
return result.str ();
|
||||
}
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string Color::colorize (const std::string& input, const std::string& spec)
|
||||
{
|
||||
Color c (spec);
|
||||
return c.colorize (input);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Color::nontrivial ()
|
||||
{
|
||||
return value != 0 ? true : false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Color::find (const std::string& input)
|
||||
{
|
||||
for (unsigned int i = 0; i < NUM_COLORS; ++i)
|
||||
if (allColors[i].english_name == input)
|
||||
return (int) i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string Color::fg () const
|
||||
{
|
||||
int index = value & _COLOR_FG;
|
||||
|
||||
if (value & _COLOR_256)
|
||||
{
|
||||
if (value & _COLOR_HASFG)
|
||||
{
|
||||
std::stringstream s;
|
||||
s << "color" << (value & _COLOR_FG);
|
||||
return s.str ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned int i = 0; i < NUM_COLORS; ++i)
|
||||
if (allColors[i].index == index)
|
||||
return allColors[i].english_name;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string Color::bg () const
|
||||
{
|
||||
int index = (value & _COLOR_BG) >> 8;
|
||||
|
||||
if (value & _COLOR_256)
|
||||
{
|
||||
if (value & _COLOR_HASBG)
|
||||
{
|
||||
std::stringstream s;
|
||||
s << "color" << ((value & _COLOR_BG) >> 8);
|
||||
return s.str ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned int i = 0; i < NUM_COLORS; ++i)
|
||||
if (allColors[i].index == index)
|
||||
return allColors[i].english_name;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
78
src/Color.h
Normal file
78
src/Color.h
Normal file
@@ -0,0 +1,78 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2010, Paul Beckingham.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free Software
|
||||
// Foundation; either version 2 of the License, or (at your option) any later
|
||||
// version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
// details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program; if not, write to the
|
||||
//
|
||||
// Free Software Foundation, Inc.,
|
||||
// 51 Franklin Street, Fifth Floor,
|
||||
// Boston, MA
|
||||
// 02110-1301
|
||||
// USA
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef INCLUDED_COLOR
|
||||
#define INCLUDED_COLOR
|
||||
|
||||
#include <string>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#define _COLOR_256 0x00200000 // 256-color mode.
|
||||
#define _COLOR_HASBG 0x00100000 // Has background color (all values taken).
|
||||
#define _COLOR_HASFG 0x00080000 // Has foreground color (all values taken).
|
||||
#define _COLOR_UNDERLINE 0x00040000 // General underline attribute.
|
||||
#define _COLOR_BOLD 0x00020000 // 16-color bold attribute.
|
||||
#define _COLOR_BRIGHT 0x00010000 // 16-color bright background attribute.
|
||||
#define _COLOR_BG 0x0000FF00 // 8-bit background color index.
|
||||
#define _COLOR_FG 0x000000FF // 8-bit foreground color index.
|
||||
|
||||
class Color
|
||||
{
|
||||
public:
|
||||
enum color_id {nocolor = 0, black, red, green, yellow, blue, magenta, cyan, white};
|
||||
|
||||
Color ();
|
||||
Color (const Color&);
|
||||
Color (unsigned int); // 256 | UNDERLINE | BOLD | BRIGHT | (BG << 8) | FG
|
||||
Color (const std::string&); // "red on bright black"
|
||||
Color (color_id); // fg.
|
||||
Color (color_id, color_id); // fg, bg.
|
||||
Color (color_id, color_id, bool, bool, bool); // fg, bg, underline, bold, bright
|
||||
~Color ();
|
||||
Color& operator= (const Color&);
|
||||
operator std::string () const;
|
||||
operator int () const;
|
||||
|
||||
void upgrade ();
|
||||
void blend (const Color&);
|
||||
|
||||
std::string colorize (const std::string&);
|
||||
static std::string colorize (const std::string&, const std::string&);
|
||||
|
||||
bool nontrivial ();
|
||||
|
||||
private:
|
||||
int find (const std::string&);
|
||||
std::string fg () const;
|
||||
std::string bg () const;
|
||||
|
||||
private:
|
||||
unsigned int value;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
102
src/Column.cpp
Normal file
102
src/Column.cpp
Normal file
@@ -0,0 +1,102 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free Software
|
||||
// Foundation; either version 2 of the License, or (at your option) any later
|
||||
// version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
// details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program; if not, write to the
|
||||
//
|
||||
// Free Software Foundation, Inc.,
|
||||
// 51 Franklin Street, Fifth Floor,
|
||||
// Boston, MA
|
||||
// 02110-1301
|
||||
// USA
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <iostream>
|
||||
#include <Column.h>
|
||||
|
||||
extern Context context;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static Column* Column::factory (const std::string& name)
|
||||
{
|
||||
if (name == "description") return new ColumnDescription ();
|
||||
|
||||
throw std::string ("Unrecognized column type '") + name + "'";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Column::Column ()
|
||||
: _name ("")
|
||||
, _minimum (0)
|
||||
, _maximum (0)
|
||||
, _wrap (false)
|
||||
, _just (left)
|
||||
, _sizing (minimal)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Column::Column (const Column& other)
|
||||
{
|
||||
_name = other._name;
|
||||
_minimum = other._minimum;
|
||||
_maximum = other._maximum;
|
||||
_wrap = other._wrap;
|
||||
_just = other._just;
|
||||
_sizing = other._sizing;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Column& Column::operator= (const Column& other)
|
||||
{
|
||||
if (this != &other)
|
||||
{
|
||||
_name = other._name;
|
||||
_minimum = other._minimum;
|
||||
_maximum = other._maximum;
|
||||
_wrap = other._wrap;
|
||||
_just = other._just;
|
||||
_sizing = other._sizing;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Column::operator== (const Column& other) const
|
||||
{
|
||||
return _name == other._name &&
|
||||
_minimum == other._minimum &&
|
||||
_maximum == other._maximum &&
|
||||
_wrap == other._wrap &&
|
||||
_just == other._just &&
|
||||
_sizing == other._sizing;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Column::~Column ()
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Column::setName (const std::string& name)
|
||||
{
|
||||
_name = name;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
66
src/Column.h
Normal file
66
src/Column.h
Normal file
@@ -0,0 +1,66 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free Software
|
||||
// Foundation; either version 2 of the License, or (at your option) any later
|
||||
// version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
// details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program; if not, write to the
|
||||
//
|
||||
// Free Software Foundation, Inc.,
|
||||
// 51 Franklin Street, Fifth Floor,
|
||||
// Boston, MA
|
||||
// 02110-1301
|
||||
// USA
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef INCLUDED_COLUMN
|
||||
#define INCLUDED_COLUMN
|
||||
|
||||
#include <string>
|
||||
|
||||
class Column
|
||||
{
|
||||
public:
|
||||
enum just {right = 0, left, center};
|
||||
enum sizing {minimal = 0, fixed, proportional, maximal};
|
||||
|
||||
static Column* factory (const std::string&);
|
||||
|
||||
Column ();
|
||||
Column (const Column&);
|
||||
Column& operator= (const Column&);
|
||||
bool operator== (const Column&) const; // TODO Is this necessary?
|
||||
~Column ();
|
||||
|
||||
void setName (const std::string&);
|
||||
std::string render (Task*, int, int, const std::string style = "default");
|
||||
std::string type () const;
|
||||
|
||||
private:
|
||||
std::string _name;
|
||||
int _minimum;
|
||||
int _maximum;
|
||||
bool _wrap;
|
||||
just _just;
|
||||
sizing _sizing;
|
||||
};
|
||||
|
||||
class ColumnDescription : public Column
|
||||
{
|
||||
public:
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
871
src/Config.cpp
871
src/Config.cpp
@@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// task - a command line task list manager.
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2009, Paul Beckingham.
|
||||
// Copyright 2006 - 2010, Paul Beckingham.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -27,30 +27,413 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <pwd.h>
|
||||
#include "Directory.h"
|
||||
#include "Date.h"
|
||||
#include "File.h"
|
||||
#include "Config.h"
|
||||
#include "text.h"
|
||||
#include "util.h"
|
||||
#include "../auto.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// These are default (but overridable) reports. These entries are necessary
|
||||
// because these three reports were converted from hard-coded reports to custom
|
||||
// reports, and therefore need these config file entries. However, users are
|
||||
// already used to seeing these five reports, but do not have these entries.
|
||||
// The choice was a) make users edit their .taskrc files, b) write a .taskrc
|
||||
// upgrade program to make the change, or c) this.
|
||||
// This string is used in two ways:
|
||||
// 1) It is used to create a new .taskrc file, by copying it directly to disk.
|
||||
// 2) It is parsed and used as default values for all Config.get calls.
|
||||
std::string Config::defaults =
|
||||
"# Taskwarrior program configuration file.\n"
|
||||
"# For more documentation, see http://taskwarrior.org or try 'man task', 'man task-faq',\n"
|
||||
"# 'man task-tutorial', 'man task-color' or 'man taskrc'\n"
|
||||
"\n"
|
||||
"# Here is an example of entries that use the default, override and blank values\n"
|
||||
"# variable=foo -- By specifying a value, this overrides the default\n"
|
||||
"# variable= -- By specifying no value, this means no default\n"
|
||||
"# #variable=foo -- By commenting out the line, or deleting it, this uses the default\n"
|
||||
"\n"
|
||||
"# Use the command 'task show' to see all defaults and overrides\n"
|
||||
"\n"
|
||||
"# Files\n"
|
||||
"data.location=~/.task\n"
|
||||
"locking=on # Use file-level locking\n"
|
||||
"\n"
|
||||
"# Terminal\n"
|
||||
"curses=on # Use ncurses library to determine terminal width\n"
|
||||
"defaultwidth=80 # Without ncurses, assumed width\n"
|
||||
"#editor=vi # Preferred text editor\n"
|
||||
"\n"
|
||||
"# Miscellaneous\n"
|
||||
"verbose=yes # Provide extra feedback\n"
|
||||
"confirmation=yes # Confirmation on delete, big changes\n"
|
||||
"echo.command=yes # Details on command just run\n"
|
||||
"annotations=full # Level of verbosity for annotations: full, sparse or none\n"
|
||||
"next=2 # How many tasks per project in next report\n"
|
||||
"bulk=2 # > 2 tasks considered 'a lot', for confirmation\n"
|
||||
"nag=You have higher priority tasks. # Nag message to keep you honest\n" // TODO
|
||||
"search.case.sensitive=yes # Setting to no allows case insensitive searches\n"
|
||||
"active.indicator=* # What to show as an active task indicator\n"
|
||||
"tag.indicator=+ # What to show as a tag indicator\n"
|
||||
"recurrence.indicator=R # What to show as a task recurrence indicator\n"
|
||||
"recurrence.limit=1 # Number of future recurring pending tasks\n"
|
||||
"undo.style=side # Undo style - can be 'side', or 'diff'\n"
|
||||
"\n"
|
||||
"# Dates\n"
|
||||
"dateformat=m/d/Y # Preferred input and display date format\n"
|
||||
"dateformat.holiday=YMD # Preferred input date format for holidays\n"
|
||||
"dateformat.report=m/d/Y # Preferred display date format for reports\n"
|
||||
"dateformat.annotation=m/d/Y # Preferred display date format for annotations\n"
|
||||
"weekstart=Sunday # Sunday or Monday only\n"
|
||||
"displayweeknumber=yes # Show week numbers on calendar\n"
|
||||
"due=7 # Task is considered due in 7 days\n"
|
||||
"\n"
|
||||
"# Calendar controls\n"
|
||||
"calendar.legend=yes # Display the legend on calendar\n"
|
||||
"calendar.details=sparse # Calendar shows information for tasks w/due dates: full, sparse or none\n"
|
||||
"calendar.details.report=list # Report to use when showing task information in cal\n"
|
||||
"calendar.holidays=none # Show public holidays on calendar:full, sparse or none\n"
|
||||
"#monthsperline=3 # Number of calendar months on a line\n"
|
||||
"\n"
|
||||
"# Journal controls\n"
|
||||
"journal.time=no # Record start/stop commands as annotation\n"
|
||||
"journal.time.start.annotation=Started task # Annotation description for the start journal entry\n"
|
||||
"journal.time.stop.annotation=Stopped task # Annotation description for the stop journal entry\n"
|
||||
"\n"
|
||||
"# Dependency controls\n"
|
||||
"dependency.reminder=on # Nags on dependency chain violations\n"
|
||||
"dependency.confirmation=on # Should dependency chain repair be confirmed?\n"
|
||||
"\n"
|
||||
"# Urgency Coefficients\n"
|
||||
"urgency.next.coefficient=10.0 # Urgency coefficients for 'next' special tag\n"
|
||||
"urgency.blocking.coefficient=9.0 # Urgency coefficients for blocking tasks\n"
|
||||
"urgency.blocked.coefficient=8.0 # Urgency coefficients for blocked tasks\n"
|
||||
"urgency.due.coefficient=7.0 # Urgency coefficients for due dates\n"
|
||||
"urgency.priority.coefficient=6.0 # Urgency coefficients for priorities\n"
|
||||
"urgency.waiting.coefficient=5.0 # Urgency coefficients for waiting status\n"
|
||||
"urgency.active.coefficient=4.0 # Urgency coefficients for active tasks\n"
|
||||
"urgency.project.coefficient=3.0 # Urgency coefficients for projects\n"
|
||||
"urgency.tags.coefficient=2.0 # Urgency coefficients for tags\n"
|
||||
"urgency.annotations.coefficient=1.0 # Urgency coefficients for annotations\n"
|
||||
"\n"
|
||||
"#urgency.user.project.foo.coefficient=5.0 # Urgency coefficients for 'foo' project\n"
|
||||
"#urgency.user.tag.foo.coefficient=5.0 # Urgency coefficients for 'foo' tag\n"
|
||||
"\n"
|
||||
"# Color controls.\n"
|
||||
"color=on # Enable color\n"
|
||||
#ifdef LINUX
|
||||
"color.header=color3 # Color of header messages\n"
|
||||
"color.footnote=color3 # Color of footnote messages\n"
|
||||
"color.debug=color3 # Color of diagnostic output\n"
|
||||
"color.alternate=on color233 # Alternate color for line coloring\n"
|
||||
"\n"
|
||||
"color.summary.bar=on rgb141 # Color of summary report progress bar\n"
|
||||
"color.summary.background=on color0 # Color of summary report background\n"
|
||||
"\n"
|
||||
"color.history.add=color0 on rgb500 # Color of added tasks in ghistory report\n"
|
||||
"color.history.done=color0 on rgb050 # Color of completed tasks in ghistory report\n"
|
||||
"color.history.delete=color0 on rgb550 # Color of deleted tasks in ghistory report\n"
|
||||
"\n"
|
||||
"color.sync.added=rgb005 # Color of added tasks in sync output\n"
|
||||
"color.sync.changed=rgb550 # Color of changed tasks in sync output\n"
|
||||
"color.sync.rejected=rgb500 # Color of rejected tasks in sync output\n"
|
||||
"\n"
|
||||
"color.undo.before=color1 # Color of values before a change\n"
|
||||
"color.undo.after=color2 # Color of values after a change\n"
|
||||
"\n"
|
||||
"color.calendar.today=color15 on rgb013 # Color of today in calendar\n"
|
||||
"color.calendar.due=color0 on color1 # Color of days with due tasks in calendar\n"
|
||||
"color.calendar.due.today=color15 on color1 # Color of today with due tasks in calendar\n"
|
||||
"color.calendar.overdue=color0 on color9 # Color of days with overdue tasks in calendar\n"
|
||||
"color.calendar.weekend=color235 # Color of weekend days in calendar\n"
|
||||
"color.calendar.holiday=color0 on color11 # Color of public holidays in calendar\n"
|
||||
"color.calendar.weeknumber=rgb013 # Color of the weeknumbers in calendar\n"
|
||||
"\n"
|
||||
"# Here are the color rules.\n"
|
||||
"color.recurring=rgb013 # Color of recur.any: tasks\n"
|
||||
"color.overdue=color9 # Color of overdue tasks\n"
|
||||
"color.due.today=rgb400 # Color of tasks due today\n"
|
||||
"color.due=color1 # Color of due tasks\n"
|
||||
"#color.keyword.car=on blue # Color of description.contains:car tasks\n"
|
||||
"#color.project.garden=on green # Color of project:garden tasks\n"
|
||||
"#color.project.none= # Color of tasks with no project\n"
|
||||
"#color.tag.bug=yellow # Color of +bug tasks\n"
|
||||
"#color.tag.none= # Color of tag-less tasks\n"
|
||||
"color.active=rgb555 on rgb410 # Color of active tasks\n"
|
||||
"color.pri.none= # Color of priority: tasks\n"
|
||||
"color.pri.H=rgb255 # Color of priority:H tasks\n"
|
||||
"color.pri.M=rgb250 # Color of priority:M tasks\n"
|
||||
"color.pri.L=rgb245 # Color of priority:L tasks\n"
|
||||
"color.tagged=rgb031 # Color of tagged tasks\n"
|
||||
"color.blocked=white on color8 # Color of blocked tasks\n"
|
||||
#else
|
||||
"color.header=yellow # Color of header messages\n"
|
||||
"color.footnote=yellow # Color of footnote messages\n"
|
||||
"color.debug=yellow # Color of diagnostic output\n"
|
||||
"color.alternate= # Alternate color for line coloring\n"
|
||||
"\n"
|
||||
"color.summary.bar=on green # Color of summary report progress bar\n"
|
||||
"color.summary.background=on black # Color of summary report background\n"
|
||||
"\n"
|
||||
"color.history.add=black on red # Color of added tasks in ghistory report\n"
|
||||
"color.history.done=black on green # Color of completed tasks in ghistory report\n"
|
||||
"color.history.delete=black on yellow # Color of deleted tasks in ghistory report\n"
|
||||
"\n"
|
||||
"color.sync.added=green # Color of added tasks in sync output\n"
|
||||
"color.sync.changed=yellow # Color of changed tasks in sync output\n"
|
||||
"color.sync.rejected=red # Color of rejected tasks in sync output\n"
|
||||
"\n"
|
||||
"color.undo.before=red # Color of values before a change\n"
|
||||
"color.undo.after=green # Color of values after a change\n"
|
||||
"\n"
|
||||
"color.calendar.today=bold white on bright blue # Color of today in calendar\n"
|
||||
"color.calendar.due=white on red # Color of days with due tasks in calendar\n"
|
||||
"color.calendar.due.today=bold white on red # Color of today with due tasks in calendar\n"
|
||||
"color.calendar.overdue=black on bright red # Color of days with overdue tasks in calendar\n"
|
||||
"color.calendar.weekend=white on bright black # Color of weekend days in calendar\n"
|
||||
"color.calendar.holiday=black on bright yellow # Color of public holidays in calendar\n"
|
||||
"color.calendar.weeknumber=bold blue # Color of the weeknumbers in calendar\n"
|
||||
"\n"
|
||||
"# Here are the color rules.\n"
|
||||
"color.recurring=magenta # Color of recur.any: tasks\n"
|
||||
"color.overdue=bold red # Color of overdue tasks\n"
|
||||
"color.due.today=red # Color of tasks due today\n"
|
||||
"color.due=red # Color of due tasks\n"
|
||||
"#color.keyword.car=on blue # Color of description.contains:car tasks\n"
|
||||
"#color.project.garden=on green # Color of project:garden tasks\n"
|
||||
"#color.project.none= # Color of tasks with no project\n"
|
||||
"#color.tag.bug=yellow # Color of +bug tasks\n"
|
||||
"#color.tag.none= # Color of tag-less tasks\n"
|
||||
"color.active=black on bright green # Color of active tasks\n"
|
||||
"color.pri.none= # Color of priority: tasks\n"
|
||||
"color.pri.H=bold white # Color of priority:H tasks\n"
|
||||
"color.pri.M=white # Color of priority:M tasks\n"
|
||||
"color.pri.L= # Color of priority:L tasks\n"
|
||||
"color.tagged=green # Color of tagged tasks\n"
|
||||
"color.blocked=black on white # Color of blocked tasks\n"
|
||||
#endif
|
||||
"\n"
|
||||
"# Here is the rule precedence order, highest to lowest.\n"
|
||||
"# Note that these are just the color rule names, without the leading 'color.'\n"
|
||||
"# and any trailing '.value'.\n"
|
||||
"rule.precedence.color=due.today,active,blocked,overdue,due,keyword,project,tag,recurring,pri,tagged\n"
|
||||
"\n"
|
||||
"# Shadow file support\n"
|
||||
"#shadow.file=/tmp/shadow.txt # Location of shadow file\n"
|
||||
"#shadow.command=list # Task command for shadow file\n"
|
||||
"#shadow.notify=on # Footnote when updated\n"
|
||||
"\n"
|
||||
"#default.project=foo # Default project for 'add' command\n"
|
||||
"#default.priority=M # Default priority for 'add' command\n"
|
||||
"default.command=list # When no arguments are specified\n"
|
||||
"\n"
|
||||
"_forcecolor=no # Forces color to be on, even for non TTY output\n"
|
||||
"blanklines=true # Use more whitespace in output\n"
|
||||
"complete.all.projects=no # Include old project names in '_projects' command\n"
|
||||
"complete.all.tags=no # Include old tag names in '_ags' command\n"
|
||||
"list.all.projects=no # Include old project names in 'projects' command\n"
|
||||
"list.all.tags=no # Include old tag names in 'tags' command\n"
|
||||
"debug=no # Display diagnostics\n"
|
||||
"hooks=off # Hook system master switch\n"
|
||||
"fontunderline=yes # Uses underlines rather than -------\n"
|
||||
"shell.prompt=task> # Prompt used by the shell command\n"
|
||||
"\n"
|
||||
"# Merge options\n"
|
||||
"#\n"
|
||||
"# WARNING: Please read the documentation (man task-sync) before proceeding with these\n"
|
||||
"# synchronization features. Improperly used, data can be lost!\n"
|
||||
"merge.autopush=ask # Push database to remote origin after merge: yes, no, ask\n"
|
||||
"#merge.default.uri=user@host.xz:.task/ # URI for merge\n"
|
||||
"#pull.default.uri=rsync://host.xz/task-backup/ # URI for pull\n"
|
||||
"\n"
|
||||
"# Import heuristics - alternate names for fields (comma-separated list of names)\n"
|
||||
"#import.synonym.bg=?\n"
|
||||
"#import.synonym.description=?\n"
|
||||
"#import.synonym.due=?\n"
|
||||
"#import.synonym.end=?\n"
|
||||
"#import.synonym.entry=?\n"
|
||||
"#import.synonym.fg=?\n"
|
||||
"#import.synonym.id=?\n"
|
||||
"#import.synonym.priority=?\n"
|
||||
"#import.synonym.project=?\n"
|
||||
"#import.synonym.recur=?\n"
|
||||
"#import.synonym.start=?\n"
|
||||
"#import.synonym.status=?\n"
|
||||
"#import.synonym.tags=?\n"
|
||||
"#import.synonym.uuid=?\n"
|
||||
"\n"
|
||||
"# Export Controls\n"
|
||||
"export.ical.class=PRIVATE # Could be PUBLIC, PRIVATE or CONFIDENTIAL\n"
|
||||
"\n"
|
||||
"# Aliases - alternate names for commands\n"
|
||||
"alias.rm=delete # Alias for the delete command\n"
|
||||
"alias.history=history.monthly # Prefer monthly over annual history reports\n"
|
||||
"alias.ghistory=ghistory.monthly # Prefer monthly graphical over annual history reports\n"
|
||||
"alias.export=export.yaml # Prefer YAML over CSV or iCal export\n"
|
||||
"alias.export.vcalendar=export.ical # They are the same\n"
|
||||
"\n"
|
||||
"# Fields: id, uuid, project, priority, priority_long, entry, start, end,\n"
|
||||
"# due, countdown, countdown_compact, age, age_compact, active, tags,\n"
|
||||
"# depends, description_only, description, recur, recurrence_indicator,\n"
|
||||
"# tag_indicator, wait.\n"
|
||||
"# Description: This report is ...\n"
|
||||
"# Sort: due+,priority-,project+\n"
|
||||
"# Filter: pro:x pri:H +bug limit:10\n"
|
||||
"# Dateformat: due date format in reports\n"
|
||||
"\n"
|
||||
"# task long\n"
|
||||
"report.long.description=Lists all task, all data, matching the specified criteria\n"
|
||||
"report.long.columns=id,project,priority,entry,start,due,recur,countdown,age,depends,tags,description\n"
|
||||
"report.long.labels=ID,Project,Pri,Added,Started,Due,Recur,Countdown,Age,Deps,Tags,Description\n"
|
||||
"report.long.sort=due+,priority-,project+\n"
|
||||
"report.long.filter=status:pending\n"
|
||||
"#report.long.dateformat=m/d/Y\n"
|
||||
"#report.long.annotations=full\n"
|
||||
"\n"
|
||||
"# task list\n"
|
||||
"report.list.description=Lists all tasks matching the specified criteria\n"
|
||||
"report.list.columns=id,project,priority,due,active,age,description\n"
|
||||
"report.list.labels=ID,Project,Pri,Due,Active,Age,Description\n"
|
||||
"report.list.sort=due+,priority-,active-,project+\n"
|
||||
"report.list.filter=status:pending\n"
|
||||
"#report.list.dateformat=m/d/Y\n"
|
||||
"#report.list.annotations=full\n"
|
||||
"\n"
|
||||
"# task ls\n"
|
||||
"report.ls.description=Minimal listing of all tasks matching the specified criteria\n"
|
||||
"report.ls.columns=id,project,priority,description\n"
|
||||
"report.ls.labels=ID,Project,Pri,Description\n"
|
||||
"report.ls.sort=priority-,project+\n"
|
||||
"report.ls.filter=status:pending\n"
|
||||
"#report.ls.dateformat=m/d/Y\n"
|
||||
"#report.ls.annotations=full\n"
|
||||
"\n"
|
||||
"# task minimal\n"
|
||||
"report.minimal.description=A really minimal listing\n"
|
||||
"report.minimal.columns=id,project,description\n"
|
||||
"report.minimal.labels=ID,Project,Description\n"
|
||||
"report.minimal.sort=project+,description+\n"
|
||||
"report.minimal.filter=status:pending\n"
|
||||
"#report.minimal.dateformat=m/d/Y\n"
|
||||
"#report.minimal.annotations=full\n"
|
||||
"\n"
|
||||
"# task newest\n"
|
||||
"report.newest.description=Shows the newest tasks\n"
|
||||
"report.newest.columns=id,project,priority,due,active,age,description\n"
|
||||
"report.newest.labels=ID,Project,Pri,Due,Active,Age,Description\n"
|
||||
"report.newest.sort=id-\n"
|
||||
"report.newest.filter=status:pending limit:10\n"
|
||||
"#report.newest.dateformat=m/d/Y\n"
|
||||
"#report.newest.annotations=full\n"
|
||||
"\n"
|
||||
"# task oldest\n"
|
||||
"report.oldest.description=Shows the oldest tasks\n"
|
||||
"report.oldest.columns=id,project,priority,due,active,age,description\n"
|
||||
"report.oldest.labels=ID,Project,Pri,Due,Active,Age,Description\n"
|
||||
"report.oldest.sort=id+\n"
|
||||
"report.oldest.filter=status:pending limit:10\n"
|
||||
"#report.oldest.dateformat=m/d/Y\n"
|
||||
"#report.oldest.annotations=full\n"
|
||||
"\n"
|
||||
"# task overdue\n"
|
||||
"report.overdue.description=Lists overdue tasks matching the specified criteria\n"
|
||||
"report.overdue.columns=id,project,priority,due,active,age,description\n"
|
||||
"report.overdue.labels=ID,Project,Pri,Due,Active,Age,Description\n"
|
||||
"report.overdue.sort=due+,priority-,active-,project+\n"
|
||||
"report.overdue.filter=status:pending due.before:now\n"
|
||||
"#report.overdue.dateformat=m/d/Y\n"
|
||||
"#report.overdue.annotations=full\n"
|
||||
"\n"
|
||||
"# task active\n"
|
||||
"report.active.description=Lists active tasks matching the specified criteria\n"
|
||||
"report.active.columns=id,project,priority,due,active,age,description\n"
|
||||
"report.active.labels=ID,Project,Pri,Due,Active,Age,Description\n"
|
||||
"report.active.sort=due+,priority-,project+\n"
|
||||
"report.active.filter=status:pending start.any:\n"
|
||||
"#report.active.dateformat=m/d/Y\n"
|
||||
"#report.active.annotations=full\n"
|
||||
"\n"
|
||||
"# task completed\n"
|
||||
"report.completed.description=Lists completed tasks matching the specified criteria\n"
|
||||
"report.completed.columns=end,project,priority,age,description\n"
|
||||
"report.completed.labels=Complete,Project,Pri,Age,Description\n"
|
||||
"report.completed.sort=end+,priority-,project+\n"
|
||||
"report.completed.filter=status:completed\n"
|
||||
"#report.completed.dateformat=m/d/Y\n"
|
||||
"#report.completed.annotations=full\n"
|
||||
"\n"
|
||||
"# task recurring\n"
|
||||
"report.recurring.description=Lists recurring tasks matching the specified criteria\n"
|
||||
"report.recurring.columns=id,project,priority,due,recur,active,age,description\n"
|
||||
"report.recurring.labels=ID,Project,Pri,Due,Recur,Active,Age,Description\n"
|
||||
"report.recurring.sort=due+,priority-,active-,project+\n"
|
||||
"report.recurring.filter=status:pending parent.any:\n"
|
||||
"#report.recurring.dateformat=m/d/Y\n"
|
||||
"#report.recurring.annotations=full\n"
|
||||
"\n"
|
||||
"# task waiting\n"
|
||||
"report.waiting.description=Lists all waiting tasks matching the specified criteria\n"
|
||||
"report.waiting.columns=id,project,priority,wait,age,description\n"
|
||||
"report.waiting.labels=ID,Project,Pri,Wait,Age,Description\n"
|
||||
"report.waiting.sort=wait+,priority-,project+\n"
|
||||
"report.waiting.filter=status:waiting\n"
|
||||
"#report.waiting.dateformat=m/d/Y\n"
|
||||
"#report.waiting.annotations=full\n"
|
||||
"\n"
|
||||
"# task all\n"
|
||||
"report.all.description=Lists all tasks matching the specified criteria\n"
|
||||
"report.all.columns=id,project,priority,due,end,active,age,description\n"
|
||||
"report.all.labels=ID,Project,Pri,Due,Completed,Active,Age,Description\n"
|
||||
"report.all.sort=project+,due+,end+,priority-,active-,description+\n"
|
||||
"report.all.filter=status.not:deleted\n"
|
||||
"#report.all.dateformat=m/d/Y\n"
|
||||
"#report.all.annotations=full\n"
|
||||
"\n"
|
||||
"# task next\n"
|
||||
"report.next.description=Lists the most urgent tasks\n"
|
||||
"report.next.columns=id,project,priority,due,active,age,description\n"
|
||||
"report.next.labels=ID,Project,Pri,Due,Active,Age,Description\n"
|
||||
"report.next.sort=due+,priority-,active-,project+\n"
|
||||
"report.next.filter=status:pending limit:page depends.none:\n"
|
||||
"#report.next.dateformat=m/d/Y\n"
|
||||
"#report.next.annotations=full\n"
|
||||
"\n"
|
||||
"# task blocked\n"
|
||||
"report.blocked.description=Lists all blocked tasks matching the specified criteria\n"
|
||||
"report.blocked.columns=id,depends,project,priority,due,active,age,description\n"
|
||||
"report.blocked.labels=ID,Deps,Project,Pri,Due,Active,Age,Description\n"
|
||||
"report.blocked.sort=due+,priority-,active-,project+\n"
|
||||
"report.blocked.filter=status:pending depends.any:\n"
|
||||
"#report.blocked.dateformat=m/d/Y\n"
|
||||
"\n"
|
||||
"# task unblocked\n"
|
||||
"report.unblocked.description=Lists all unblocked tasks matching the specified criteria\n"
|
||||
"report.unblocked.columns=id,depends,project,priority,due,active,age,description\n"
|
||||
"report.unblocked.labels=ID,Deps,Project,Pri,Due,Active,Age,Description\n"
|
||||
"report.unblocked.sort=due+,priority-,active-,project+\n"
|
||||
"report.unblocked.filter=status:pending depends.none:\n"
|
||||
"#report.unblocked.dateformat=m/d/Y\n"
|
||||
"\n";
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// DO NOT CALL Config::setDefaults.
|
||||
//
|
||||
// This is a default constructor, and as such is only used to:
|
||||
// a) initialize a default Context constructor
|
||||
// b) run unit tests
|
||||
//
|
||||
// In all real use cases, Config::load is called.
|
||||
Config::Config ()
|
||||
: original_file ()
|
||||
{
|
||||
setDefaults ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Config::Config (const std::string& file)
|
||||
{
|
||||
setDefaults ();
|
||||
load (file);
|
||||
}
|
||||
|
||||
@@ -58,288 +441,138 @@ Config::Config (const std::string& file)
|
||||
// Read the Configuration file and populate the *this map. The file format is
|
||||
// simply lines with name=value pairs. Whitespace between name, = and value is
|
||||
// not tolerated, but blank lines and comments starting with # are allowed.
|
||||
bool Config::load (const std::string& file)
|
||||
//
|
||||
// Nested files are now supported, with the following construct:
|
||||
// include /absolute/path/to/file
|
||||
//
|
||||
void Config::load (const std::string& file, int nest /* = 1 */)
|
||||
{
|
||||
std::ifstream in;
|
||||
in.open (file.c_str (), std::ifstream::in);
|
||||
if (in.good ())
|
||||
if (nest > 10)
|
||||
throw std::string ("Configuration file nested to more than 10 levels deep"
|
||||
" - this has to be a mistake.");
|
||||
|
||||
// First time in, load the default values.
|
||||
if (nest == 1)
|
||||
{
|
||||
std::string line;
|
||||
while (getline (in, line))
|
||||
{
|
||||
// Remove comments.
|
||||
std::string::size_type pound = line.find ("#"); // no i18n
|
||||
if (pound != std::string::npos)
|
||||
line = line.substr (0, pound);
|
||||
|
||||
line = trim (line, " \t"); // no i18n
|
||||
|
||||
// Skip empty lines.
|
||||
if (line.length () > 0)
|
||||
{
|
||||
std::string::size_type equal = line.find ("="); // no i18n
|
||||
if (equal != std::string::npos)
|
||||
{
|
||||
std::string key = trim (line.substr (0, equal), " \t"); // no i18n
|
||||
std::string value = trim (line.substr (equal+1, line.length () - equal), " \t"); // no i18n
|
||||
(*this)[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
in.close ();
|
||||
return true;
|
||||
setDefaults ();
|
||||
original_file = File (file);
|
||||
}
|
||||
|
||||
return false;
|
||||
// Read the file, then parse the contents.
|
||||
std::string contents;
|
||||
if (File::read (file, contents) && contents.length ())
|
||||
parse (contents, nest);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Config::parse (const std::string& input, int nest /* = 1 */)
|
||||
{
|
||||
// Shortcut case for default constructor.
|
||||
if (input.length () == 0)
|
||||
return;
|
||||
|
||||
// Split the input into lines.
|
||||
std::vector <std::string> lines;
|
||||
split (lines, input, "\n");
|
||||
|
||||
// Parse each line.
|
||||
std::vector <std::string>::iterator it;
|
||||
for (it = lines.begin (); it != lines.end (); ++it)
|
||||
{
|
||||
std::string line = *it;
|
||||
|
||||
// Remove comments.
|
||||
std::string::size_type pound = line.find ("#"); // no i18n
|
||||
if (pound != std::string::npos)
|
||||
line = line.substr (0, pound);
|
||||
|
||||
line = trim (line, " \t"); // no i18n
|
||||
|
||||
// Skip empty lines.
|
||||
if (line.length () > 0)
|
||||
{
|
||||
std::string::size_type equal = line.find ("="); // no i18n
|
||||
if (equal != std::string::npos)
|
||||
{
|
||||
std::string key = trim (line.substr (0, equal), " \t"); // no i18n
|
||||
std::string value = trim (line.substr (equal+1, line.length () - equal), " \t"); // no i18n
|
||||
|
||||
(*this)[key] = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string::size_type include = line.find ("include"); // no i18n.
|
||||
if (include != std::string::npos)
|
||||
{
|
||||
Path included (trim (line.substr (include + 7), " \t"));
|
||||
if (included.is_absolute ())
|
||||
{
|
||||
if (included.readable ())
|
||||
this->load (included, nest + 1);
|
||||
else
|
||||
throw std::string ("Could not read include file '") + included.data + "'.";
|
||||
}
|
||||
else
|
||||
throw std::string ("Can only include files with absolute paths, not '") + included.data + "'";
|
||||
}
|
||||
else
|
||||
throw std::string ("Malformed entry '") + line + "'.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Config::createDefaultRC (const std::string& rc, const std::string& data)
|
||||
{
|
||||
// Create a sample .taskrc file.
|
||||
// Override data.location in the defaults.
|
||||
std::string::size_type loc = defaults.find ("data.location=~/.task");
|
||||
// loc+0^ +14^ +21^
|
||||
|
||||
Date now;
|
||||
std::stringstream contents;
|
||||
contents << "# Task program configuration file.\n"
|
||||
<< "# For more documentation, see http://taskwarrior.org or try 'man task' and 'man taskrc'\n"
|
||||
<< "\n"
|
||||
<< "# Files\n"
|
||||
<< "data.location=" << data << "\n"
|
||||
<< "locking=on # Use file-level locking\n"
|
||||
<< "\n"
|
||||
<< "# Terminal\n"
|
||||
<< "curses=on # Use ncurses library to determine terminal width\n"
|
||||
<< "#defaultwidth=80 # Without ncurses, assumed width\n"
|
||||
<< "#editor=vi # Preferred text editor\n"
|
||||
<< "\n"
|
||||
<< "# Miscellaneous\n"
|
||||
<< "confirmation=yes # Confirmation on delete, big changes\n"
|
||||
<< "echo.command=yes # Details on command just run\n"
|
||||
<< "next=2 # How many tasks per project in next report\n"
|
||||
<< "bulk=2 # > 2 tasks considered 'a lot', for confirmation\n"
|
||||
<< "nag=You have higher priority tasks. # Nag message to keep you honest\n"
|
||||
<< "\n"
|
||||
<< "# Dates\n"
|
||||
<< "dateformat=m/d/Y # Preferred input and display date format\n"
|
||||
<< "weekstart=Sunday # Sunday or Monday only\n"
|
||||
<< "displayweeknumber=yes # Show week numbers on calendar\n"
|
||||
<< "due=7 # Task is considered due in 7 days\n"
|
||||
<< "#monthsperline=2 # Number of calendar months on a line\n"
|
||||
<< "\n"
|
||||
<< "# Color controls.\n"
|
||||
<< "color=on # Use color\n"
|
||||
<< "color.overdue=bold_red # Color of overdue tasks\n"
|
||||
<< "color.due=bold_yellow # Color of due tasks\n"
|
||||
<< "color.pri.H=bold # Color of priority:H tasks\n"
|
||||
<< "#color.pri.M=on_yellow # Color of priority:M tasks\n"
|
||||
<< "#color.pri.L=on_green # Color of priority:L tasks\n"
|
||||
<< "#color.pri.none=white on_blue # Color of priority: tasks\n"
|
||||
<< "color.active=bold_cyan # Color of active tasks\n"
|
||||
<< "color.tagged=yellow # Color of tagged tasks\n"
|
||||
<< "#color.tag.bug=yellow # Color of +bug tasks\n"
|
||||
<< "#color.project.garden=on_green # Color of project:garden tasks\n"
|
||||
<< "#color.keyword.car=on_blue # Color of description.contains:car tasks\n"
|
||||
<< "#color.recurring=on_red # Color of recur.any: tasks\n"
|
||||
<< "#color.header=bold_green # Color of header messages\n"
|
||||
<< "#color.footnote=bold_green # Color of footnote messages\n"
|
||||
<< "\n"
|
||||
<< "#shadow.file=/tmp/shadow.txt # Location of shadow file\n"
|
||||
<< "#shadow.command=list # Task command for shadow file\n"
|
||||
<< "#shadow.notify=on # Footnote when updated\n"
|
||||
<< "\n"
|
||||
<< "#default.project=foo # Unless otherwise specified\n"
|
||||
<< "#default.priority=M # Unless otherwise specified\n"
|
||||
<< "default.command=list # Unless otherwise specified\n"
|
||||
<< "\n"
|
||||
<< "# Fields: id,uuid,project,priority,entry,start,due,recur,recurrence_indicator,age,\n"
|
||||
<< "# age_compact,active,tags,tag_indicator,description,description_only\n"
|
||||
<< "# Description: This report is ...\n"
|
||||
<< "# Sort: due+,priority-,project+\n"
|
||||
<< "# Filter: pro:x pri:H +bug limit:10\n"
|
||||
<< "\n"
|
||||
<< "# task long\n"
|
||||
<< "report.long.description=Lists all task, all data, matching the specified criteria\n"
|
||||
<< "report.long.columns=id,project,priority,entry,start,due,recur,age,tags,description\n"
|
||||
<< "report.long.labels=ID,Project,Pri,Added,Started,Due,Recur,Age,Tags,Description\n"
|
||||
<< "report.long.sort=due+,priority-,project+\n"
|
||||
<< "report.long.filter=status:pending\n"
|
||||
<< "\n"
|
||||
<< "# task list\n"
|
||||
<< "report.list.description=Lists all tasks matching the specified criteria\n"
|
||||
<< "report.list.columns=id,project,priority,due,active,age,description\n"
|
||||
<< "report.list.labels=ID,Project,Pri,Due,Active,Age,Description\n"
|
||||
<< "report.list.sort=due+,priority-,project+\n"
|
||||
<< "report.list.filter=status:pending\n"
|
||||
<< "\n"
|
||||
<< "# task ls\n"
|
||||
<< "report.ls.description=Minimal listing of all tasks matching the specified criteria\n"
|
||||
<< "report.ls.columns=id,project,priority,description\n"
|
||||
<< "report.ls.labels=ID,Project,Pri,Description\n"
|
||||
<< "report.ls.sort=priority-,project+\n"
|
||||
<< "report.ls.filter=status:pending\n"
|
||||
<< "\n"
|
||||
<< "# task newest\n"
|
||||
<< "report.newest.description=Shows the newest tasks\n"
|
||||
<< "report.newest.columns=id,project,priority,due,active,age,description\n"
|
||||
<< "report.newest.labels=ID,Project,Pri,Due,Active,Age,Description\n"
|
||||
<< "report.newest.sort=id-\n"
|
||||
<< "report.newest.filter=status:pending limit:10\n"
|
||||
<< "\n"
|
||||
<< "# task oldest\n"
|
||||
<< "report.oldest.description=Shows the oldest tasks\n"
|
||||
<< "report.oldest.columns=id,project,priority,due,active,age,description\n"
|
||||
<< "report.oldest.labels=ID,Project,Pri,Due,Active,Age,Description\n"
|
||||
<< "report.oldest.sort=id+\n"
|
||||
<< "report.oldest.filter=status:pending limit:10\n"
|
||||
<< "\n"
|
||||
<< "# task overdue\n"
|
||||
<< "report.overdue.description=Lists overdue tasks matching the specified criteria\n"
|
||||
<< "report.overdue.columns=id,project,priority,due,active,age,description\n"
|
||||
<< "report.overdue.labels=ID,Project,Pri,Due,Active,Age,Description\n"
|
||||
<< "report.overdue.sort=due+,priority-,project+\n"
|
||||
<< "report.overdue.filter=status:pending due.before:today\n"
|
||||
<< "\n"
|
||||
<< "# task active\n"
|
||||
<< "report.active.description=Lists active tasks matching the specified criteria\n"
|
||||
<< "report.active.columns=id,project,priority,due,active,age,description\n"
|
||||
<< "report.active.labels=ID,Project,Pri,Due,Active,Age,Description\n"
|
||||
<< "report.active.sort=due+,priority-,project+\n"
|
||||
<< "report.active.filter=status:pending start.any:\n"
|
||||
<< "\n"
|
||||
<< "# task completed\n"
|
||||
<< "report.completed.description=Lists completed tasks matching the specified criteria\n"
|
||||
<< "report.completed.columns=end,project,priority,age,description\n"
|
||||
<< "report.completed.labels=Complete,Project,Pri,Age,Description\n"
|
||||
<< "report.completed.sort=end+,priority-,project+\n"
|
||||
<< "report.completed.filter=status:completed\n"
|
||||
<< "\n"
|
||||
<< "# task recurring\n"
|
||||
<< "report.recurring.description=Lists recurring tasks matching the specified criteria\n"
|
||||
<< "report.recurring.columns=id,project,priority,due,recur,active,age,description\n"
|
||||
<< "report.recurring.labels=ID,Project,Pri,Due,Recur,Active,Age,Description\n"
|
||||
<< "report.recurring.sort=due+,priority-,project+\n"
|
||||
<< "report.recurring.filter=status:pending parent.any:\n"
|
||||
<< "\n"
|
||||
<< "# task waiting\n"
|
||||
<< "report.waiting.description=Lists all waiting tasks matching the specified criteria\n"
|
||||
<< "report.waiting.columns=id,project,priority,wait,age,description\n"
|
||||
<< "report.waiting.labels=ID,Project,Pri,Wait,Age,Description\n"
|
||||
<< "report.waiting.sort=wait+,priority-,project+\n"
|
||||
<< "report.waiting.filter=status:waiting\n"
|
||||
<< "\n"
|
||||
<< "# task all\n"
|
||||
<< "report.all.description=Lists all tasks matching the specified criteria\n"
|
||||
<< "report.all.columns=id,project,priority,due,active,age,description\n"
|
||||
<< "report.all.labels=ID,Project,Pri,Due,Active,Age,Description\n"
|
||||
<< "report.all.sort=due+,priority-,project+\n"
|
||||
<< "\n"
|
||||
<< "# task next\n"
|
||||
<< "report.next.description=Lists the most urgent tasks\n"
|
||||
<< "report.next.columns=id,project,priority,due,active,age,description\n"
|
||||
<< "report.next.labels=ID,Project,Pri,Due,Active,Age,Description\n"
|
||||
<< "report.next.sort=due+,priority-,project+\n"
|
||||
<< "report.next.filter=status:pending\n"
|
||||
contents << "# [Created by "
|
||||
<< PACKAGE_STRING
|
||||
<< " "
|
||||
<< now.toString ("m/d/Y H:N:S")
|
||||
<< "]\n"
|
||||
<< defaults.substr (0, loc + 14)
|
||||
<< data
|
||||
<< "\n\n# Color theme (uncomment one to use)\n"
|
||||
<< "#include /usr/local/share/doc/task/rc/light-16.theme\n"
|
||||
<< "#include /usr/local/share/doc/task/rc/light-256.theme\n"
|
||||
<< "#include /usr/local/share/doc/task/rc/dark-16.theme\n"
|
||||
<< "#include /usr/local/share/doc/task/rc/dark-256.theme\n"
|
||||
<< "#include /usr/local/share/doc/task/rc/dark-red-256.theme\n"
|
||||
<< "#include /usr/local/share/doc/task/rc/dark-green-256.theme\n"
|
||||
<< "#include /usr/local/share/doc/task/rc/dark-blue-256.theme\n"
|
||||
<< "#include /usr/local/share/doc/task/rc/dark-violets-256.theme\n"
|
||||
<< "#include /usr/local/share/doc/task/rc/dark-yellow-green.theme\n"
|
||||
<< "\n";
|
||||
|
||||
spit (rc, contents.str ());
|
||||
// Write out the new file.
|
||||
if (! File::write (rc, contents.str ()))
|
||||
throw std::string ("Could not write to '") + rc + "'.";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Config::createDefaultData (const std::string& data)
|
||||
{
|
||||
if (access (data.c_str (), F_OK))
|
||||
mkdir (data.c_str (), S_IRWXU);
|
||||
Directory d (data);
|
||||
if (! d.exists ())
|
||||
d.create ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Config::setDefaults ()
|
||||
{
|
||||
set ("report.long.description", "Lists all task, all data, matching the specified criteria"); // TODO i18n
|
||||
set ("report.long.columns", "id,project,priority,entry,start,due,recur,age,tags,description"); // TODO i18n
|
||||
set ("report.long.labels", "ID,Project,Pri,Added,Started,Due,Recur,Age,Tags,Description"); // TODO i18n
|
||||
set ("report.long.sort", "due+,priority-,project+"); // TODO i18n
|
||||
set ("report.long.filter", "status:pending"); // TODO i18n
|
||||
|
||||
set ("report.list.description", "Lists all tasks matching the specified criteria"); // TODO i18n
|
||||
set ("report.list.columns", "id,project,priority,due,active,age,description"); // TODO i18n
|
||||
set ("report.list.labels", "ID,Project,Pri,Due,Active,Age,Description"); // TODO i18n
|
||||
set ("report.list.sort", "due+,priority-,project+"); // TODO i18n
|
||||
set ("report.list.filter", "status:pending"); // TODO i18n
|
||||
|
||||
set ("report.ls.description", "Minimal listing of all tasks matching the specified criteria"); // TODO i18n
|
||||
set ("report.ls.columns", "id,project,priority,description"); // TODO i18n
|
||||
set ("report.ls.labels", "ID,Project,Pri,Description"); // TODO i18n
|
||||
set ("report.ls.sort", "priority-,project+"); // TODO i18n
|
||||
set ("report.ls.filter", "status:pending"); // TODO i18n
|
||||
|
||||
set ("report.newest.description", "Shows the newest tasks"); // TODO i18n
|
||||
set ("report.newest.columns", "id,project,priority,due,active,age,description"); // TODO i18n
|
||||
set ("report.newest.labels", "ID,Project,Pri,Due,Active,Age,Description"); // TODO i18n
|
||||
set ("report.newest.sort", "id-"); // TODO i18n
|
||||
set ("report.newest.filter", "status:pending limit:10"); // TODO i18n
|
||||
|
||||
set ("report.oldest.description", "Shows the oldest tasks"); // TODO i18n
|
||||
set ("report.oldest.columns", "id,project,priority,due,active,age,description"); // TODO i18n
|
||||
set ("report.oldest.labels", "ID,Project,Pri,Due,Active,Age,Description"); // TODO i18n
|
||||
set ("report.oldest.sort", "id+"); // TODO i18n
|
||||
set ("report.oldest.filter", "status:pending limit:10"); // TODO i18n
|
||||
|
||||
set ("report.overdue.description", "Lists overdue tasks matching the specified criteria"); // TODO i18n
|
||||
set ("report.overdue.columns", "id,project,priority,due,active,age,description"); // TODO i18n
|
||||
set ("report.overdue.labels", "ID,Project,Pri,Due,Active,Age,Description"); // TODO i18n
|
||||
set ("report.overdue.sort", "due+,priority-,project+"); // TODO i18n
|
||||
set ("report.overdue.filter", "status:pending due.before:today"); // TODO i18n
|
||||
|
||||
set ("report.active.description", "Lists active tasks matching the specified criteria"); // TODO i18n
|
||||
set ("report.active.columns", "id,project,priority,due,active,age,description"); // TODO i18n
|
||||
set ("report.active.labels", "ID,Project,Pri,Due,Active,Age,Description"); // TODO i18n
|
||||
set ("report.active.sort", "due+,priority-,project+"); // TODO i18n
|
||||
set ("report.active.filter", "status:pending start.any:"); // TODO i18n
|
||||
|
||||
set ("report.completed.description", "Lists completed tasks matching the specified criteria"); // TODO i18n
|
||||
set ("report.completed.columns", "end,project,priority,age,description"); // TODO i18n
|
||||
set ("report.completed.labels", "Complete,Project,Pri,Age,Description"); // TODO i18n
|
||||
set ("report.completed.sort", "end+,priority-,project+"); // TODO i18n
|
||||
set ("report.completed.filter", "status:completed"); // TODO i18n
|
||||
|
||||
set ("report.recurring.description", "Lists recurring tasks matching the specified criteria"); // TODO i18n
|
||||
set ("report.recurring.columns", "id,project,priority,due,recur,active,age,description"); // TODO i18n
|
||||
set ("report.recurring.labels", "ID,Project,Pri,Due,Recur,Active,Age,Description"); // TODO i18n
|
||||
set ("report.recurring.sort", "due+,priority-,project+"); // TODO i18n
|
||||
set ("report.recurring.filter", "status:pending parent.any:"); // TODO i18n
|
||||
|
||||
set ("report.waiting.description", "Lists all waiting tasks matching the specified criteria"); // TODO i18n
|
||||
set ("report.waiting.columns", "id,project,priority,wait,age,description"); // TODO i18n
|
||||
set ("report.waiting.labels", "ID,Project,Pri,Wait,Age,Description"); // TODO i18n
|
||||
set ("report.waiting.sort", "wait+,priority-,project+"); // TODO i18n
|
||||
set ("report.waiting.filter", "status:waiting"); // TODO i18n
|
||||
|
||||
set ("report.all.description", "Lists all tasks matching the specified criteria"); // TODO i18n
|
||||
set ("report.all.columns", "id,project,priority,due,active,age,description"); // TODO i18n
|
||||
set ("report.all.labels", "ID,Project,Pri,Due,Active,Age,Description"); // TODO i18n
|
||||
set ("report.all.sort", "due+,priority-,project+"); // TODO i18n
|
||||
|
||||
set ("report.next.description", "Lists the most urgent tasks"); // TODO i18n
|
||||
set ("report.next.columns", "id,project,priority,due,active,age,description"); // TODO i18n
|
||||
set ("report.next.labels", "ID,Project,Pri,Due,Active,Age,Description"); // TODO i18n
|
||||
set ("report.next.sort", "due+,priority-,project+"); // TODO i18n
|
||||
set ("report.next.filter", "status:pending"); // TODO i18n
|
||||
parse (defaults);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Return the configuration value given the specified key.
|
||||
const std::string Config::get (const char* key)
|
||||
void Config::clear ()
|
||||
{
|
||||
return this->get (std::string (key));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Return the configuration value given the specified key. If a default_value
|
||||
// is present, it will be the returned value in the event of a missing key.
|
||||
const std::string Config::get (
|
||||
const char* key,
|
||||
const char* default_value)
|
||||
{
|
||||
return this->get (std::string (key), std::string (default_value));
|
||||
std::map <std::string, std::string>::clear ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -350,56 +583,42 @@ const std::string Config::get (const std::string& key)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Return the configuration value given the specified key. If a default_value
|
||||
// is present, it will be the returned value in the event of a missing key.
|
||||
const std::string Config::get (
|
||||
const std::string& key,
|
||||
const std::string& default_value)
|
||||
const int Config::getInteger (const std::string& key)
|
||||
{
|
||||
if ((*this).find (key) != (*this).end ())
|
||||
return (*this)[key];
|
||||
return atoi ((*this)[key].c_str ());
|
||||
|
||||
return default_value;
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Config::get (const std::string& key, const bool default_value)
|
||||
const double Config::getReal (const std::string& key)
|
||||
{
|
||||
if ((*this).find (key) != (*this).end ())
|
||||
return atof ((*this)[key].c_str ());
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const bool Config::getBoolean (const std::string& key)
|
||||
{
|
||||
if ((*this).find (key) != (*this).end ())
|
||||
{
|
||||
std::string value = lowerCase ((*this)[key]);
|
||||
|
||||
if (value == "t" || // TODO i18n
|
||||
value == "true" || // TODO i18n
|
||||
value == "1" || // no i18n
|
||||
value == "+" || // no i18n
|
||||
value == "y" || // TODO i18n
|
||||
value == "yes" || // TODO i18n
|
||||
value == "on" || // TODO i18n
|
||||
value == "enable" || // TODO i18n
|
||||
value == "enabled") // TODO i18n
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return default_value;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Config::get (const std::string& key, const int default_value)
|
||||
{
|
||||
if ((*this).find (key) != (*this).end ())
|
||||
return ::atoi ((*this)[key].c_str ());
|
||||
|
||||
return default_value;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
double Config::get (const std::string& key, const double default_value)
|
||||
{
|
||||
if ((*this).find (key) != (*this).end ())
|
||||
return ::atof ((*this)[key].c_str ());
|
||||
|
||||
return default_value;
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -433,3 +652,65 @@ void Config::all (std::vector<std::string>& items)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string Config::checkForDeprecatedColor ()
|
||||
{
|
||||
std::vector <std::string> deprecated;
|
||||
foreach (i, *this)
|
||||
{
|
||||
if (i->first.find ("color.") != std::string::npos)
|
||||
{
|
||||
std::string value = get (i->first);
|
||||
if (value.find ("_") != std::string::npos)
|
||||
deprecated.push_back (i->first);
|
||||
}
|
||||
}
|
||||
|
||||
std::stringstream out;
|
||||
if (deprecated.size ())
|
||||
{
|
||||
out << "Your .taskrc file contains color settings that use deprecated "
|
||||
<< "underscores. Please check:\n";
|
||||
|
||||
foreach (i, deprecated)
|
||||
out << " " << *i << "=" << get (*i) << "\n";
|
||||
|
||||
out << "\n";
|
||||
}
|
||||
|
||||
return out.str ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string Config::checkForDeprecatedColumns ()
|
||||
{
|
||||
std::vector <std::string> deprecated;
|
||||
foreach (i, *this)
|
||||
{
|
||||
if (i->first.find ("report") == 0)
|
||||
{
|
||||
std::string value = get (i->first);
|
||||
if (value.find ("entry_time") != std::string::npos ||
|
||||
value.find ("start_time") != std::string::npos ||
|
||||
value.find ("end_time") != std::string::npos)
|
||||
deprecated.push_back (i->first);
|
||||
}
|
||||
}
|
||||
|
||||
std::stringstream out;
|
||||
out << "\n";
|
||||
|
||||
if (deprecated.size ())
|
||||
{
|
||||
out << "Your .taskrc file contains reports with deprecated columns. "
|
||||
<< "Please check for entry_time, start_time or end_time in:\n";
|
||||
|
||||
foreach (i, deprecated)
|
||||
out << " " << *i << "\n";
|
||||
|
||||
out << "\n";
|
||||
}
|
||||
|
||||
return out.str ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
31
src/Config.h
31
src/Config.h
@@ -1,7 +1,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// task - a command line task list manager.
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2009, Paul Beckingham.
|
||||
// Copyright 2006 - 2010, Paul Beckingham.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "File.h"
|
||||
|
||||
class Config : public std::map <std::string, std::string>
|
||||
{
|
||||
@@ -40,22 +41,32 @@ public:
|
||||
Config (const Config&);
|
||||
Config& operator= (const Config&);
|
||||
|
||||
bool load (const std::string&);
|
||||
void load (const std::string&, int nest = 1);
|
||||
void parse (const std::string&, int nest = 1);
|
||||
|
||||
void createDefaultRC (const std::string&, const std::string&);
|
||||
void createDefaultData (const std::string&);
|
||||
void setDefaults ();
|
||||
void clear ();
|
||||
|
||||
const std::string get (const std::string&);
|
||||
const int getInteger (const std::string&);
|
||||
const double getReal (const std::string&);
|
||||
const bool getBoolean (const std::string&);
|
||||
|
||||
const std::string get (const char*);
|
||||
const std::string get (const char*, const char*);
|
||||
const std::string get (const std::string&);
|
||||
const std::string get (const std::string&, const std::string&);
|
||||
bool get (const std::string&, const bool);
|
||||
int get (const std::string&, const int);
|
||||
double get (const std::string&, const double);
|
||||
void set (const std::string&, const int);
|
||||
void set (const std::string&, const double);
|
||||
void set (const std::string&, const std::string&);
|
||||
void all (std::vector <std::string>&);
|
||||
|
||||
std::string checkForDeprecatedColor ();
|
||||
std::string checkForDeprecatedColumns ();
|
||||
|
||||
public:
|
||||
File original_file;
|
||||
|
||||
private:
|
||||
static std::string defaults;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
552
src/Context.cpp
552
src/Context.cpp
@@ -1,7 +1,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// task - a command line task list manager.
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2009, Paul Beckingham.
|
||||
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "Context.h"
|
||||
#include "Directory.h"
|
||||
#include "File.h"
|
||||
#include "Timer.h"
|
||||
#include "text.h"
|
||||
#include "util.h"
|
||||
@@ -81,6 +83,11 @@ void Context::initialize (int argc, char** argv)
|
||||
}
|
||||
|
||||
initialize ();
|
||||
|
||||
// Hook system init, plus post-start event occurring at the first possible
|
||||
// moment after hook initialization.
|
||||
hooks.initialize ();
|
||||
hooks.trigger ("post-start");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -98,16 +105,16 @@ void Context::initialize ()
|
||||
{
|
||||
config.set ("curses", "off");
|
||||
|
||||
if (! config.get (std::string ("_forcecolor"), false))
|
||||
if (! config.getBoolean ("_forcecolor"))
|
||||
config.set ("color", "off");
|
||||
}
|
||||
|
||||
if (config.get ("color", true))
|
||||
if (config.getBoolean ("color"))
|
||||
initializeColorRules ();
|
||||
|
||||
// Load appropriate stringtable as soon after the config file as possible, to
|
||||
// allow all subsequent messages to be localizable.
|
||||
std::string location = expandPath (config.get ("data.location"));
|
||||
Directory location (config.get ("data.location"));
|
||||
std::string locale = config.get ("locale");
|
||||
|
||||
// If there is a locale variant (en-US.<variant>), then strip it.
|
||||
@@ -116,24 +123,20 @@ void Context::initialize ()
|
||||
locale = locale.substr (0, period);
|
||||
|
||||
if (locale != "")
|
||||
stringtable.load (location + "/strings." + locale);
|
||||
|
||||
// TODO Handle "--version, -v" right here?
|
||||
stringtable.load (location.data + "/strings." + locale);
|
||||
|
||||
// init TDB.
|
||||
tdb.clear ();
|
||||
std::vector <std::string> all;
|
||||
split (all, location, ',');
|
||||
foreach (path, all)
|
||||
tdb.location (expandPath (*path));
|
||||
tdb.location (*path);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Context::run ()
|
||||
{
|
||||
int rc;
|
||||
Timer t ("Context::run");
|
||||
|
||||
std::string output;
|
||||
try
|
||||
{
|
||||
@@ -154,30 +157,41 @@ int Context::run ()
|
||||
}
|
||||
|
||||
// Dump all debug messages.
|
||||
if (config.get (std::string ("debug"), false))
|
||||
hooks.trigger ("pre-debug");
|
||||
if (config.getBoolean ("debug"))
|
||||
foreach (d, debugMessages)
|
||||
if (config.get ("color", true) || config.get (std::string ("_forcecolor"), false))
|
||||
std::cout << colorizeDebug (*d) << std::endl;
|
||||
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
|
||||
std::cout << colorizeDebug (*d) << "\n";
|
||||
else
|
||||
std::cout << *d << std::endl;
|
||||
std::cout << *d << "\n";
|
||||
hooks.trigger ("post-debug");
|
||||
|
||||
// Dump all headers.
|
||||
foreach (h, headers)
|
||||
if (config.get ("color", true) || config.get (std::string ("_forcecolor"), false))
|
||||
std::cout << colorizeHeader (*h) << std::endl;
|
||||
else
|
||||
std::cout << *h << std::endl;
|
||||
hooks.trigger ("pre-header");
|
||||
if (config.getBoolean ("verbose"))
|
||||
foreach (h, headers)
|
||||
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
|
||||
std::cout << colorizeHeader (*h) << "\n";
|
||||
else
|
||||
std::cout << *h << "\n";
|
||||
hooks.trigger ("post-header");
|
||||
|
||||
// Dump the report output.
|
||||
hooks.trigger ("pre-output");
|
||||
std::cout << output;
|
||||
hooks.trigger ("post-output");
|
||||
|
||||
// Dump all footnotes.
|
||||
foreach (f, footnotes)
|
||||
if (config.get ("color", true) || config.get (std::string ("_forcecolor"), false))
|
||||
std::cout << colorizeFootnote (*f) << std::endl;
|
||||
else
|
||||
std::cout << *f << std::endl;
|
||||
hooks.trigger ("pre-footnote");
|
||||
if (config.getBoolean ("verbose"))
|
||||
foreach (f, footnotes)
|
||||
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
|
||||
std::cout << colorizeFootnote (*f) << "\n";
|
||||
else
|
||||
std::cout << *f << "\n";
|
||||
hooks.trigger ("post-footnote");
|
||||
|
||||
hooks.trigger ("pre-exit");
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -185,55 +199,77 @@ int Context::run ()
|
||||
int Context::dispatch (std::string &out)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
Timer t ("Context::dispatch");
|
||||
|
||||
// TODO Just look at this thing. It cries out for a dispatch table.
|
||||
if (cmd.command == "projects") { rc = handleProjects (out); }
|
||||
else if (cmd.command == "tags") { rc = handleTags (out); }
|
||||
else if (cmd.command == "colors") { rc = handleColor (out); }
|
||||
else if (cmd.command == "version") { rc = handleVersion (out); }
|
||||
else if (cmd.command == "help") { rc = longUsage (out); }
|
||||
else if (cmd.command == "stats") { rc = handleReportStats (out); }
|
||||
else if (cmd.command == "info") { rc = handleInfo (out); }
|
||||
else if (cmd.command == "history") { rc = handleReportHistory (out); }
|
||||
else if (cmd.command == "ghistory") { rc = handleReportGHistory (out); }
|
||||
else if (cmd.command == "summary") { rc = handleReportSummary (out); }
|
||||
else if (cmd.command == "calendar") { rc = handleReportCalendar (out); }
|
||||
else if (cmd.command == "timesheet") { rc = handleReportTimesheet (out); }
|
||||
else if (cmd.command == "add") { rc = handleAdd (out); }
|
||||
else if (cmd.command == "append") { rc = handleAppend (out); }
|
||||
else if (cmd.command == "annotate") { rc = handleAnnotate (out); }
|
||||
else if (cmd.command == "done") { rc = handleDone (out); }
|
||||
else if (cmd.command == "delete") { rc = handleDelete (out); }
|
||||
else if (cmd.command == "start") { rc = handleStart (out); }
|
||||
else if (cmd.command == "stop") { rc = handleStop (out); }
|
||||
else if (cmd.command == "export") { rc = handleExport (out); }
|
||||
else if (cmd.command == "import") { rc = handleImport (out); }
|
||||
else if (cmd.command == "duplicate") { rc = handleDuplicate (out); }
|
||||
else if (cmd.command == "edit") { rc = handleEdit (out); }
|
||||
#ifdef FEATURE_SHELL
|
||||
else if (cmd.command == "shell") { handleShell ( ); }
|
||||
#endif
|
||||
else if (cmd.command == "undo") { handleUndo ( ); }
|
||||
else if (cmd.command == "_projects") { rc = handleCompletionProjects (out); }
|
||||
else if (cmd.command == "_tags") { rc = handleCompletionTags (out); }
|
||||
else if (cmd.command == "_commands") { rc = handleCompletionCommands (out); }
|
||||
else if (cmd.command == "_ids") { rc = handleCompletionIDs (out); }
|
||||
else if (cmd.command == "_config") { rc = handleCompletionConfig (out); }
|
||||
else if (cmd.command == "" &&
|
||||
sequence.size ()) { rc = handleModify (out); }
|
||||
hooks.trigger ("pre-dispatch");
|
||||
|
||||
// Command that display IDs and therefore need TDB::gc first.
|
||||
else if (cmd.command == "next") { if (!inShadow) tdb.gc (); rc = handleReportNext (out); }
|
||||
else if (cmd.validCustom (cmd.command)) { if (!inShadow) tdb.gc (); rc = handleCustomReport (cmd.command, out); }
|
||||
// TODO Just look at this thing. It cries out for a dispatch table.
|
||||
if (cmd.command == "projects") { rc = handleProjects (out); }
|
||||
else if (cmd.command == "tags") { rc = handleTags (out); }
|
||||
else if (cmd.command == "colors") { rc = handleColor (out); }
|
||||
else if (cmd.command == "version") { rc = handleVersion (out); }
|
||||
else if (cmd.command == "config") { rc = handleConfig (out); }
|
||||
else if (cmd.command == "show") { rc = handleShow (out); }
|
||||
else if (cmd.command == "help") { rc = longUsage (out); }
|
||||
else if (cmd.command == "stats") { rc = handleReportStats (out); }
|
||||
else if (cmd.command == "info") { rc = handleInfo (out); }
|
||||
else if (cmd.command == "history.monthly") { rc = handleReportHistoryMonthly (out); }
|
||||
else if (cmd.command == "history.annual") { rc = handleReportHistoryAnnual (out); }
|
||||
else if (cmd.command == "ghistory.monthly") { rc = handleReportGHistoryMonthly (out); }
|
||||
else if (cmd.command == "ghistory.annual") { rc = handleReportGHistoryAnnual (out); }
|
||||
else if (cmd.command == "summary") { rc = handleReportSummary (out); }
|
||||
else if (cmd.command == "calendar") { rc = handleReportCalendar (out); }
|
||||
else if (cmd.command == "timesheet") { rc = handleReportTimesheet (out); }
|
||||
else if (cmd.command == "add") { rc = handleAdd (out); }
|
||||
else if (cmd.command == "log") { rc = handleLog (out); }
|
||||
else if (cmd.command == "append") { rc = handleAppend (out); }
|
||||
else if (cmd.command == "prepend") { rc = handlePrepend (out); }
|
||||
else if (cmd.command == "annotate") { rc = handleAnnotate (out); }
|
||||
else if (cmd.command == "denotate") { rc = handleDenotate (out); }
|
||||
else if (cmd.command == "done") { rc = handleDone (out); }
|
||||
else if (cmd.command == "delete") { rc = handleDelete (out); }
|
||||
else if (cmd.command == "start") { rc = handleStart (out); }
|
||||
else if (cmd.command == "stop") { rc = handleStop (out); }
|
||||
else if (cmd.command == "export.csv") { rc = handleExportCSV (out); }
|
||||
else if (cmd.command == "export.ical") { rc = handleExportiCal (out); }
|
||||
else if (cmd.command == "export.yaml") { rc = handleExportYAML (out); }
|
||||
else if (cmd.command == "import") { rc = handleImport (out); }
|
||||
else if (cmd.command == "duplicate") { rc = handleDuplicate (out); }
|
||||
else if (cmd.command == "edit") { rc = handleEdit (out); }
|
||||
#ifdef FEATURE_SHELL
|
||||
else if (cmd.command == "shell") { handleShell ( ); }
|
||||
#endif
|
||||
else if (cmd.command == "undo") { handleUndo ( ); }
|
||||
else if (cmd.command == "merge") { tdb.gc ();
|
||||
handleMerge (out); }
|
||||
else if (cmd.command == "push") { handlePush (out); }
|
||||
else if (cmd.command == "pull") { handlePull (out); }
|
||||
else if (cmd.command == "diagnostics") { handleDiagnostics (out); }
|
||||
else if (cmd.command == "_projects") { rc = handleCompletionProjects (out); }
|
||||
else if (cmd.command == "_tags") { rc = handleCompletionTags (out); }
|
||||
else if (cmd.command == "_commands") { rc = handleCompletionCommands (out); }
|
||||
else if (cmd.command == "_ids") { rc = handleCompletionIDs (out); }
|
||||
else if (cmd.command == "_config") { rc = handleCompletionConfig (out); }
|
||||
else if (cmd.command == "_version") { rc = handleCompletionVersion (out); }
|
||||
else if (cmd.command == "_urgency") { rc = handleUrgency (out); }
|
||||
else if (cmd.command == "" &&
|
||||
sequence.size ()) { rc = handleModify (out); }
|
||||
|
||||
// Commands that display IDs and therefore need TDB::gc first.
|
||||
else if (cmd.validCustom (cmd.command)) { if (!inShadow) tdb.gc ();
|
||||
rc = handleCustomReport (cmd.command, out); }
|
||||
|
||||
// If the command is not recognized, display usage.
|
||||
else { rc = shortUsage (out); }
|
||||
else { hooks.trigger ("pre-usage-command");
|
||||
rc = shortUsage (out);
|
||||
hooks.trigger ("post-usage-command"); }
|
||||
|
||||
// Only update the shadow file if such an update was not suppressed (shadow),
|
||||
if (cmd.isWriteCommand () && !inShadow)
|
||||
shadow ();
|
||||
|
||||
hooks.trigger ("post-dispatch");
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -241,22 +277,20 @@ int Context::dispatch (std::string &out)
|
||||
void Context::shadow ()
|
||||
{
|
||||
// Determine if shadow file is enabled.
|
||||
std::string shadowFile = expandPath (config.get ("shadow.file"));
|
||||
if (shadowFile != "")
|
||||
File shadowFile (config.get ("shadow.file"));
|
||||
if (shadowFile.data != "")
|
||||
{
|
||||
inShadow = true; // Prevents recursion in case shadow command writes.
|
||||
|
||||
// TODO Reinstate these checks.
|
||||
/*
|
||||
// Check for silly shadow file settings.
|
||||
if (shadowFile == dataLocation + "/pending.data")
|
||||
std::string dataLocation = config.get ("data.location");
|
||||
if (shadowFile.data == dataLocation + "/pending.data")
|
||||
throw std::string ("Configuration variable 'shadow.file' is set to "
|
||||
"overwrite your pending tasks. Please change it.");
|
||||
|
||||
if (shadowFile == dataLocation + "/completed.data")
|
||||
if (shadowFile.data == dataLocation + "/completed.data")
|
||||
throw std::string ("Configuration variable 'shadow.file' is set to "
|
||||
"overwrite your completed tasks. Please change it.");
|
||||
*/
|
||||
|
||||
std::string oldCurses = config.get ("curses");
|
||||
std::string oldColor = config.get ("color");
|
||||
@@ -265,8 +299,10 @@ void Context::shadow ()
|
||||
|
||||
// Run report. Use shadow.command, using default.command as a fallback
|
||||
// with "list" as a default.
|
||||
std::string command = config.get ("shadow.command",
|
||||
config.get ("default.command", "list"));
|
||||
std::string command = config.get ("shadow.command");
|
||||
if (command == "")
|
||||
command = config.get ("default.command");
|
||||
|
||||
split (args, command, ' ');
|
||||
|
||||
initialize ();
|
||||
@@ -276,21 +312,21 @@ void Context::shadow ()
|
||||
parse ();
|
||||
std::string result;
|
||||
(void)dispatch (result);
|
||||
std::ofstream out (shadowFile.c_str ());
|
||||
std::ofstream out (shadowFile.data.c_str ());
|
||||
if (out.good ())
|
||||
{
|
||||
out << result;
|
||||
out.close ();
|
||||
}
|
||||
else
|
||||
throw std::string ("Could not write file '") + shadowFile + "'";
|
||||
throw std::string ("Could not write file '") + shadowFile.data + "'";
|
||||
|
||||
config.set ("curses", oldCurses);
|
||||
config.set ("color", oldColor);
|
||||
|
||||
// Optionally display a notification that the shadow file was updated.
|
||||
if (config.get (std::string ("shadow.notify"), false))
|
||||
footnote (std::string ("[Shadow file '") + shadowFile + "' updated]");
|
||||
if (config.getBoolean ("shadow.notify"))
|
||||
footnote (std::string ("[Shadow file '") + shadowFile.data + "' updated.]");
|
||||
|
||||
inShadow = false;
|
||||
}
|
||||
@@ -338,6 +374,45 @@ void Context::disallowModification () const
|
||||
+ "' command does not allow further modification of a task.";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Takes a vector of args (foo, rc.name:value, bar), extracts any rc.name:value
|
||||
// args and sets the name/value in context.config, returning only the plain args
|
||||
// (foo, bar) as output.
|
||||
void Context::applyOverrides (
|
||||
const std::vector <std::string>& input,
|
||||
std::vector <std::string>& output)
|
||||
{
|
||||
bool foundTerminator = false;
|
||||
foreach (in, input)
|
||||
{
|
||||
if (*in == "--")
|
||||
{
|
||||
foundTerminator = true;
|
||||
output.push_back (*in);
|
||||
}
|
||||
else if (!foundTerminator && in->substr (0, 3) == "rc.")
|
||||
{
|
||||
std::string name;
|
||||
std::string value;
|
||||
Nibbler n (*in);
|
||||
if (n.getLiteral ("rc.") && // rc.
|
||||
n.getUntilOneOf (":=", name) && // xxx
|
||||
n.skipN (1)) // :
|
||||
{
|
||||
n.getUntilEOS (value); // Don't care if it's blank.
|
||||
|
||||
config.set (name, value);
|
||||
var_overrides += " " + *in;
|
||||
footnote ("Configuration override " + in->substr (3));
|
||||
}
|
||||
else
|
||||
footnote ("Problem with override: " + *in);
|
||||
}
|
||||
else
|
||||
output.push_back (*in);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Context::loadCorrectConfigFile ()
|
||||
{
|
||||
@@ -350,8 +425,8 @@ void Context::loadCorrectConfigFile ()
|
||||
"Could not read home directory from the passwd file."));
|
||||
|
||||
std::string home = pw->pw_dir;
|
||||
std::string rc = home + "/.taskrc";
|
||||
std::string data = home + "/.task";
|
||||
File rc (home + "/.taskrc");
|
||||
Directory data (home + "./task");
|
||||
|
||||
// Is there an file_override for rc:?
|
||||
foreach (arg, args)
|
||||
@@ -361,98 +436,62 @@ void Context::loadCorrectConfigFile ()
|
||||
else if (arg->substr (0, 3) == "rc:")
|
||||
{
|
||||
file_override = *arg;
|
||||
rc = arg->substr (3, std::string::npos);
|
||||
rc = File (arg->substr (3));
|
||||
|
||||
home = rc;
|
||||
std::string::size_type last_slash = rc.rfind ("/");
|
||||
std::string::size_type last_slash = rc.data.rfind ("/");
|
||||
if (last_slash != std::string::npos)
|
||||
home = rc.substr (0, last_slash);
|
||||
home = rc.data.substr (0, last_slash);
|
||||
else
|
||||
home = ".";
|
||||
|
||||
args.erase (arg);
|
||||
header ("Using alternate .taskrc file " + rc); // TODO i18n
|
||||
header ("Using alternate .taskrc file " + rc.data); // TODO i18n
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Load rc file.
|
||||
config.clear (); // Dump current values.
|
||||
config.setDefaults (); // Add in the custom reports.
|
||||
config.load (rc); // Load new file.
|
||||
config.load (rc); // Load new file.
|
||||
|
||||
if (config.get ("data.location") != "")
|
||||
data = config.get ("data.location");
|
||||
data = Directory (config.get ("data.location"));
|
||||
|
||||
// Are there any var_overrides for data.location?
|
||||
foreach (arg, args)
|
||||
{
|
||||
if (*arg == "--")
|
||||
break;
|
||||
else if (arg->substr (0, 17) == "rc.data.location:")
|
||||
else if (arg->substr (0, 16) == "rc.data.location" &&
|
||||
((*arg)[16] == ':' || (*arg)[16] == '='))
|
||||
{
|
||||
data = arg->substr (17, std::string::npos);
|
||||
header ("Using alternate data.location " + data); // TODO i18n
|
||||
data = Directory (arg->substr (17));
|
||||
header ("Using alternate data.location " + data.data); // TODO i18n
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Do we need to create a default rc?
|
||||
if (access (rc.c_str (), F_OK))
|
||||
if (! rc.exists ())
|
||||
{
|
||||
if (confirm ("A configuration file could not be found in " // TODO i18n
|
||||
+ home
|
||||
+ "\n\n"
|
||||
+ "Would you like a sample "
|
||||
+ rc
|
||||
+ " created, so task can proceed?"))
|
||||
{
|
||||
config.createDefaultRC (rc, data);
|
||||
}
|
||||
else
|
||||
if (!confirm ("A configuration file could not be found in " // TODO i18n
|
||||
+ home
|
||||
+ "\n\n"
|
||||
+ "Would you like a sample "
|
||||
+ rc.data
|
||||
+ " created, so taskwarrior can proceed?"))
|
||||
throw std::string ("Cannot proceed without rc file.");
|
||||
|
||||
config.createDefaultRC (rc, data);
|
||||
}
|
||||
|
||||
// Create data location, if necessary.
|
||||
config.createDefaultData (data);
|
||||
|
||||
// Load rc file.
|
||||
config.clear (); // Dump current values.
|
||||
config.setDefaults (); // Add in the custom reports.
|
||||
config.load (rc); // Load new file.
|
||||
|
||||
// Apply overrides of type: "rc.name:value"
|
||||
// Apply rc overrides.
|
||||
std::vector <std::string> filtered;
|
||||
bool foundTerminator = false;
|
||||
foreach (arg, args)
|
||||
{
|
||||
if (*arg == "--")
|
||||
{
|
||||
foundTerminator = true;
|
||||
filtered.push_back (*arg);
|
||||
}
|
||||
else if (!foundTerminator &&
|
||||
arg->substr (0, 3) == "rc.")
|
||||
{
|
||||
std::string name;
|
||||
std::string value;
|
||||
Nibbler n (*arg);
|
||||
if (n.getUntil ('.', name) &&
|
||||
n.skip ('.') &&
|
||||
n.getUntil (':', name) &&
|
||||
n.skip (':') &&
|
||||
n.getUntilEOS (value))
|
||||
{
|
||||
config.set (name, value);
|
||||
var_overrides += " " + *arg;
|
||||
footnote (std::string ("Configuration override ") + // TODO i18n
|
||||
arg->substr (3, std::string::npos));
|
||||
}
|
||||
}
|
||||
else
|
||||
filtered.push_back (*arg);
|
||||
}
|
||||
|
||||
applyOverrides (args, filtered);
|
||||
args = filtered;
|
||||
}
|
||||
|
||||
@@ -467,7 +506,7 @@ void Context::loadAliases ()
|
||||
{
|
||||
if (var->substr (0, 6) == "alias.")
|
||||
{
|
||||
std::string alias = var->substr (6, std::string::npos);
|
||||
std::string alias = var->substr (6);
|
||||
std::string canonical = config.get (*var);
|
||||
|
||||
aliases[alias] = canonical;
|
||||
@@ -500,6 +539,7 @@ void Context::parse (
|
||||
bool terminated = false;
|
||||
bool foundSequence = false;
|
||||
bool foundSomethingAfterSequence = false;
|
||||
bool foundNonSequence = false;
|
||||
|
||||
foreach (arg, parseArgs)
|
||||
{
|
||||
@@ -514,7 +554,7 @@ void Context::parse (
|
||||
|
||||
// Sequence
|
||||
// Note: "add" doesn't require an ID
|
||||
else if (parseCmd.command != "add" &&
|
||||
else if (parseCmd.command != "add" &&
|
||||
! foundSomethingAfterSequence &&
|
||||
parseSequence.valid (*arg))
|
||||
{
|
||||
@@ -532,12 +572,14 @@ void Context::parse (
|
||||
if (foundSequence)
|
||||
foundSomethingAfterSequence = true;
|
||||
|
||||
foundNonSequence = true;
|
||||
|
||||
if (arg->find (',') != std::string::npos)
|
||||
throw stringtable.get (TAGS_NO_COMMA,
|
||||
"Tags are not permitted to contain commas.");
|
||||
|
||||
tagAdditions.push_back (arg->substr (1, std::string::npos));
|
||||
parseTask.addTag (arg->substr (1, std::string::npos));
|
||||
tagAdditions.push_back (arg->substr (1));
|
||||
parseTask.addTag (arg->substr (1));
|
||||
}
|
||||
|
||||
// Tags to remove begin with '-'.
|
||||
@@ -549,11 +591,25 @@ void Context::parse (
|
||||
if (foundSequence)
|
||||
foundSomethingAfterSequence = true;
|
||||
|
||||
foundNonSequence = true;
|
||||
|
||||
if (arg->find (',') != std::string::npos)
|
||||
throw stringtable.get (TAGS_NO_COMMA,
|
||||
"Tags are not permitted to contain commas.");
|
||||
|
||||
tagRemovals.push_back (arg->substr (1, std::string::npos));
|
||||
tagRemovals.push_back (arg->substr (1));
|
||||
}
|
||||
|
||||
// Substitution of description and/or annotation text.
|
||||
else if (parseSubst.valid (*arg))
|
||||
{
|
||||
if (foundSequence)
|
||||
foundSomethingAfterSequence = true;
|
||||
|
||||
foundNonSequence = true;
|
||||
|
||||
debug ("parse subst '" + *arg + "'");
|
||||
parseSubst.parse (*arg);
|
||||
}
|
||||
|
||||
// Atributes - name[.mod]:[value]
|
||||
@@ -563,6 +619,8 @@ void Context::parse (
|
||||
if (foundSequence)
|
||||
foundSomethingAfterSequence = true;
|
||||
|
||||
foundNonSequence = true;
|
||||
|
||||
attribute.parse (*arg);
|
||||
|
||||
// There has to be a better way. And it starts with a fresh coffee.
|
||||
@@ -581,6 +639,8 @@ void Context::parse (
|
||||
parseTask[name + "." + mod] = attribute;
|
||||
else
|
||||
parseTask[name] = attribute;
|
||||
|
||||
autoFilter (attribute, parseFilter);
|
||||
}
|
||||
|
||||
// *arg has the appearance of an attribute (foo:bar), but isn't
|
||||
@@ -590,22 +650,14 @@ void Context::parse (
|
||||
if (foundSequence)
|
||||
foundSomethingAfterSequence = true;
|
||||
|
||||
foundNonSequence = true;
|
||||
|
||||
if (descCandidate.length ())
|
||||
descCandidate += " ";
|
||||
descCandidate += *arg;
|
||||
}
|
||||
}
|
||||
|
||||
// Substitution of description and/or annotation text.
|
||||
else if (parseSubst.valid (*arg))
|
||||
{
|
||||
if (foundSequence)
|
||||
foundSomethingAfterSequence = true;
|
||||
|
||||
debug ("parse subst '" + *arg + "'");
|
||||
parseSubst.parse (*arg);
|
||||
}
|
||||
|
||||
// It might be a command if one has not already been found.
|
||||
else if (parseCmd.command == "" &&
|
||||
parseCmd.valid (*arg))
|
||||
@@ -615,6 +667,8 @@ void Context::parse (
|
||||
|
||||
if (foundSequence)
|
||||
foundSomethingAfterSequence = true;
|
||||
|
||||
foundNonSequence = true;
|
||||
}
|
||||
|
||||
// Anything else is just considered description.
|
||||
@@ -623,6 +677,8 @@ void Context::parse (
|
||||
if (foundSequence)
|
||||
foundSomethingAfterSequence = true;
|
||||
|
||||
foundNonSequence = true;
|
||||
|
||||
if (descCandidate.length ())
|
||||
descCandidate += " ";
|
||||
descCandidate += *arg;
|
||||
@@ -646,6 +702,21 @@ void Context::parse (
|
||||
{
|
||||
debug ("parse description '" + descCandidate + "'");
|
||||
parseTask.set ("description", descCandidate);
|
||||
|
||||
foundNonSequence = true;
|
||||
|
||||
// Now convert the description to a filter on each word, if necessary.
|
||||
if (parseCmd.isReadOnlyCommand ())
|
||||
{
|
||||
std::vector <std::string> words;
|
||||
split (words, descCandidate, ' ');
|
||||
std::vector <std::string>::iterator it;
|
||||
for (it = words.begin (); it != words.end (); ++it)
|
||||
{
|
||||
Att a ("description", "contains", *it);
|
||||
autoFilter (a, parseFilter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// At this point, either a sequence or a command should have been found.
|
||||
@@ -653,41 +724,57 @@ void Context::parse (
|
||||
parseCmd.parse (descCandidate);
|
||||
|
||||
// Read-only command (reports, status, info ...) use filters. Write commands
|
||||
// (add, done ...) do not.
|
||||
// (add, done ...) do not. The filter was constructed iteratively above, but
|
||||
// tags were omitted, so they are added now.
|
||||
if (parseCmd.isReadOnlyCommand ())
|
||||
autoFilter (parseTask, parseFilter);
|
||||
autoFilter (parseFilter);
|
||||
|
||||
// If no command was specified, and there were no command line arguments
|
||||
// then invoke the default command.
|
||||
if (parseCmd.command == "" && parseArgs.size () == 0)
|
||||
if (parseCmd.command == "")
|
||||
{
|
||||
// Apply overrides, if any.
|
||||
std::string defaultCommand = config.get ("default.command");
|
||||
if (defaultCommand != "")
|
||||
if (parseArgs.size () == 0)
|
||||
{
|
||||
// Add on the overrides.
|
||||
defaultCommand += " " + file_override + " " + var_overrides;
|
||||
// Apply overrides, if any.
|
||||
std::string defaultCommand = config.get ("default.command");
|
||||
if (defaultCommand != "")
|
||||
{
|
||||
// Add on the overrides.
|
||||
defaultCommand += " " + file_override + " " + var_overrides;
|
||||
|
||||
// Stuff the command line.
|
||||
args.clear ();
|
||||
split (args, defaultCommand, ' ');
|
||||
header ("[task " + defaultCommand + "]");
|
||||
// Stuff the command line.
|
||||
args.clear ();
|
||||
split (args, defaultCommand, ' ');
|
||||
header ("[task " + trim (defaultCommand) + "]");
|
||||
|
||||
// Reinitialize the context and recurse.
|
||||
file_override = "";
|
||||
var_overrides = "";
|
||||
footnotes.clear ();
|
||||
initialize ();
|
||||
parse (args, cmd, task, sequence, subst, filter);
|
||||
// Reinitialize the context and recurse.
|
||||
file_override = "";
|
||||
var_overrides = "";
|
||||
footnotes.clear ();
|
||||
initialize ();
|
||||
parse (args, cmd, task, sequence, subst, filter);
|
||||
}
|
||||
else
|
||||
throw stringtable.get (
|
||||
CMD_MISSING,
|
||||
"You must specify a command, or a task ID to modify.");
|
||||
}
|
||||
|
||||
// If the command "task 123" is entered, but with no modifier arguments,
|
||||
// then the actual command is assumed to be "info".
|
||||
else if (!foundNonSequence &&
|
||||
(parseTask.id != 0 || parseSequence.size () != 0))
|
||||
{
|
||||
std::cout << "No command - assuming 'info'.\n";
|
||||
parseCmd.command = "info";
|
||||
}
|
||||
else
|
||||
throw stringtable.get (
|
||||
CMD_MISSING,
|
||||
"You must specify a command, or a task ID to modify");
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Note: The reason some of these are commented out is because the ::clear
|
||||
// method is not really "clear" but "clear_some". Some members do not need to
|
||||
// be initialized. That makes this method something of a misnomer. So be it.
|
||||
void Context::clear ()
|
||||
{
|
||||
// Config config;
|
||||
@@ -713,78 +800,83 @@ void Context::clear ()
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Add all the attributes in the task to the filter. All except uuid.
|
||||
void Context::autoFilter (Task& t, Filter& f)
|
||||
void Context::autoFilter (Att& a, Filter& f)
|
||||
{
|
||||
foreach (att, t)
|
||||
// Words are found in the description using the .has modifier.
|
||||
if (a.name () == "description" && a.mod () == "")
|
||||
{
|
||||
// Words are found in the description using the .has modifier.
|
||||
if (att->second.name () == "description" && att->second.mod () == "")
|
||||
std::vector <std::string> words;
|
||||
split (words, a.value (), ' ');
|
||||
foreach (word, words)
|
||||
{
|
||||
std::vector <std::string> words;
|
||||
split (words, att->second.value (), ' ');
|
||||
foreach (word, words)
|
||||
{
|
||||
f.push_back (Att ("description", "has", *word));
|
||||
debug ("auto filter: " + att->second.name () + ".has:" + *word);
|
||||
}
|
||||
}
|
||||
|
||||
// Projects are matched left-most.
|
||||
else if (att->second.name () == "project" && att->second.mod () == "")
|
||||
{
|
||||
if (att->second.value () != "")
|
||||
{
|
||||
f.push_back (Att ("project", "startswith", att->second.value ()));
|
||||
debug ("auto filter: " + att->second.name () + ".startswith:" + att->second.value ());
|
||||
}
|
||||
else
|
||||
{
|
||||
f.push_back (Att ("project", "is", att->second.value ()));
|
||||
debug ("auto filter: " + att->second.name () + ".is:" + att->second.value ());
|
||||
}
|
||||
}
|
||||
|
||||
// The limit attribute does not participate in filtering, and needs to be
|
||||
// specifically handled in handleCustomReport.
|
||||
else if (att->second.name () == "limit")
|
||||
{
|
||||
}
|
||||
|
||||
// Every task has a unique uuid by default, and it shouldn't be included,
|
||||
// because it is guaranteed to not match.
|
||||
else if (att->second.name () == "uuid")
|
||||
{
|
||||
}
|
||||
|
||||
// The mechanism for filtering on tags is +/-<tag>.
|
||||
else if (att->second.name () == "tags")
|
||||
{
|
||||
}
|
||||
|
||||
// Generic attribute matching.
|
||||
else
|
||||
{
|
||||
f.push_back (att->second);
|
||||
debug ("auto filter: " +
|
||||
att->second.name () +
|
||||
(att->second.mod () != "" ?
|
||||
("." + att->second.mod () + ":") :
|
||||
":") +
|
||||
att->second.value ());
|
||||
f.push_back (Att ("description", "has", *word));
|
||||
debug ("auto filter: " + a.name () + ".has:" + *word);
|
||||
}
|
||||
}
|
||||
|
||||
// Projects are matched left-most.
|
||||
else if (a.name () == "project" && a.mod () == "")
|
||||
{
|
||||
if (a.value () != "")
|
||||
{
|
||||
f.push_back (Att ("project", "startswith", a.value ()));
|
||||
debug ("auto filter: " + a.name () + ".startswith:" + a.value ());
|
||||
}
|
||||
else
|
||||
{
|
||||
f.push_back (Att ("project", "is", a.value ()));
|
||||
debug ("auto filter: " + a.name () + ".is:" + a.value ());
|
||||
}
|
||||
}
|
||||
|
||||
// The limit attribute does not participate in filtering, and needs to be
|
||||
// specifically handled in handleCustomReport.
|
||||
else if (a.name () == "limit")
|
||||
{
|
||||
}
|
||||
|
||||
// Every task has a unique uuid by default, and it shouldn't be included,
|
||||
// because it is guaranteed to not match.
|
||||
else if (a.name () == "uuid")
|
||||
{
|
||||
}
|
||||
|
||||
// Note: Tags are handled via the +/-<tag> syntax, but also via attribute
|
||||
// modifiers.
|
||||
|
||||
// Generic attribute matching.
|
||||
else
|
||||
{
|
||||
f.push_back (a);
|
||||
debug ("auto filter: " +
|
||||
a.name () +
|
||||
(a.mod () != "" ?
|
||||
("." + a.mod () + ":") :
|
||||
":") +
|
||||
a.value ());
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Add all the tags in the task to the filter.
|
||||
void Context::autoFilter (Filter& f)
|
||||
{
|
||||
// This is now a correct implementation of a filter on the presence or absence
|
||||
// of a tag. The prior code provided the illusion of leftmost partial tag
|
||||
// matches, but was really using the 'contains' and 'nocontains' attribute
|
||||
// modifiers. See bug #293.
|
||||
|
||||
// Include tagAdditions.
|
||||
foreach (tag, tagAdditions)
|
||||
{
|
||||
f.push_back (Att ("tags", "has", *tag));
|
||||
f.push_back (Att ("tags", "word", *tag));
|
||||
debug ("auto filter: +" + *tag);
|
||||
}
|
||||
|
||||
// Include tagRemovals.
|
||||
foreach (tag, tagRemovals)
|
||||
{
|
||||
f.push_back (Att ("tags", "hasnt", *tag));
|
||||
f.push_back (Att ("tags", "noword", *tag));
|
||||
debug ("auto filter: -" + *tag);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// task - a command line task list manager.
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2009, Paul Beckingham.
|
||||
// Copyright 2006 - 2010, Paul Beckingham.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "Task.h"
|
||||
#include "TDB.h"
|
||||
#include "StringTable.h"
|
||||
#include "Hooks.h"
|
||||
|
||||
class Context
|
||||
{
|
||||
@@ -54,6 +55,7 @@ public:
|
||||
void shadow (); // shadow file update
|
||||
|
||||
int getWidth (); // determine terminal width
|
||||
int getHeight (); // determine terminal height
|
||||
|
||||
void header (const std::string&); // Header message sink
|
||||
void footnote (const std::string&); // Footnote message sink
|
||||
@@ -66,11 +68,13 @@ public:
|
||||
|
||||
std::string canonicalize (const std::string&) const;
|
||||
void disallowModification () const;
|
||||
void applyOverrides (const std::vector <std::string>&, std::vector <std::string>&);
|
||||
|
||||
private:
|
||||
void loadCorrectConfigFile ();
|
||||
void loadAliases ();
|
||||
void autoFilter (Task&, Filter&);
|
||||
void autoFilter (Att&, Filter&);
|
||||
void autoFilter (Filter&);
|
||||
|
||||
public:
|
||||
Config config;
|
||||
@@ -89,8 +93,8 @@ public:
|
||||
std::map <std::string, std::string> aliases;
|
||||
std::vector <std::string> tagAdditions;
|
||||
std::vector <std::string> tagRemovals;
|
||||
Hooks hooks;
|
||||
|
||||
private:
|
||||
std::vector <std::string> headers;
|
||||
std::vector <std::string> footnotes;
|
||||
std::vector <std::string> debugMessages;
|
||||
|
||||
574
src/Date.cpp
574
src/Date.cpp
@@ -1,7 +1,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// task - a command line task list manager.
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2009, Paul Beckingham.
|
||||
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -24,7 +24,7 @@
|
||||
// USA
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <time.h>
|
||||
#include <assert.h>
|
||||
@@ -33,6 +33,9 @@
|
||||
#include "Date.h"
|
||||
#include "text.h"
|
||||
#include "util.h"
|
||||
#include "Context.h"
|
||||
|
||||
extern Context context;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Defaults to "now".
|
||||
@@ -52,151 +55,309 @@ Date::Date (const int m, const int d, const int y)
|
||||
{
|
||||
// Error if not valid.
|
||||
struct tm t = {0};
|
||||
t.tm_mday = d;
|
||||
t.tm_mon = m - 1;
|
||||
t.tm_year = y - 1900;
|
||||
t.tm_isdst = -1; // Requests that mktime determine summer time effect.
|
||||
t.tm_mday = d;
|
||||
t.tm_mon = m - 1;
|
||||
t.tm_year = y - 1900;
|
||||
|
||||
mT = mktime (&t);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
|
||||
Date::Date (const int m, const int d, const int y,
|
||||
const int hr, const int mi, const int se)
|
||||
{
|
||||
int month = 0;
|
||||
int day = 0;
|
||||
int year = 0;
|
||||
// Error if not valid.
|
||||
struct tm t = {0};
|
||||
t.tm_isdst = -1; // Requests that mktime determine summer time effect.
|
||||
t.tm_mday = d;
|
||||
t.tm_mon = m - 1;
|
||||
t.tm_year = y - 1900;
|
||||
t.tm_hour = hr;
|
||||
t.tm_min = mi;
|
||||
t.tm_sec = se;
|
||||
|
||||
mT = mktime (&t);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Date::Date (const std::string& input, const std::string& format /* = "m/d/Y" */)
|
||||
{
|
||||
int month = 0;
|
||||
int day = 0;
|
||||
int year = -1; // So we can check later.
|
||||
int hour = 0;
|
||||
int minute = 0;
|
||||
int second = 0;
|
||||
|
||||
// Perhaps it is an epoch date, in string form?
|
||||
if (isEpoch (mdy))
|
||||
if (isEpoch (input))
|
||||
return;
|
||||
|
||||
// Before parsing according to "format", perhaps this is a relative date?
|
||||
if (isRelativeDate (mdy))
|
||||
if (isRelativeDate (input))
|
||||
return;
|
||||
|
||||
unsigned int i = 0; // Index into mdy.
|
||||
unsigned int i = 0; // Index into input.
|
||||
|
||||
// Format may include: mMdDyYVaAbBhHNS
|
||||
//
|
||||
// Note that the format should never include T or Z, as that interferes with
|
||||
// the potential parsing for ISO dates constructed from the above format.
|
||||
for (unsigned int f = 0; f < format.length (); ++f)
|
||||
{
|
||||
switch (format[f])
|
||||
{
|
||||
// Single or double digit.
|
||||
case 'm':
|
||||
if (i >= mdy.length () ||
|
||||
! isdigit (mdy[i]))
|
||||
if (i >= input.length () ||
|
||||
! isdigit (input[i]))
|
||||
{
|
||||
throw std::string ("\"") + mdy + "\" is not a valid date.";
|
||||
throw std::string ("\"") + input + "\" is not a valid date (m).";
|
||||
}
|
||||
|
||||
if (i + 1 < mdy.length () &&
|
||||
(mdy[i + 0] == '0' || mdy[i + 0] == '1') &&
|
||||
isdigit (mdy[i + 1]))
|
||||
if (i + 1 < input.length () &&
|
||||
(input[i + 0] == '0' || input[i + 0] == '1') &&
|
||||
isdigit (input[i + 1]))
|
||||
{
|
||||
month = ::atoi (mdy.substr (i, 2).c_str ());
|
||||
month = atoi (input.substr (i, 2).c_str ());
|
||||
i += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
month = ::atoi (mdy.substr (i, 1).c_str ());
|
||||
month = atoi (input.substr (i, 1).c_str ());
|
||||
++i;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
if (i >= mdy.length () ||
|
||||
! isdigit (mdy[i]))
|
||||
if (i >= input.length () ||
|
||||
! isdigit (input[i]))
|
||||
{
|
||||
throw std::string ("\"") + mdy + "\" is not a valid date.";
|
||||
throw std::string ("\"") + input + "\" is not a valid date (d).";
|
||||
}
|
||||
|
||||
if (i + 1 < mdy.length () &&
|
||||
(mdy[i + 0] == '0' || mdy[i + 0] == '1' || mdy[i + 0] == '2' || mdy[i + 0] == '3') &&
|
||||
isdigit (mdy[i + 1]))
|
||||
if (i + 1 < input.length () &&
|
||||
(input[i + 0] == '0' || input[i + 0] == '1' || input[i + 0] == '2' || input[i + 0] == '3') &&
|
||||
isdigit (input[i + 1]))
|
||||
{
|
||||
day = ::atoi (mdy.substr (i, 2).c_str ());
|
||||
day = atoi (input.substr (i, 2).c_str ());
|
||||
i += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
day = ::atoi (mdy.substr (i, 1).c_str ());
|
||||
day = atoi (input.substr (i, 1).c_str ());
|
||||
++i;
|
||||
}
|
||||
break;
|
||||
|
||||
// Double digit.
|
||||
case 'y':
|
||||
if (i + 1 >= mdy.length () ||
|
||||
! isdigit (mdy[i + 0]) ||
|
||||
! isdigit (mdy[i + 1]))
|
||||
if (i + 1 >= input.length () ||
|
||||
! isdigit (input[i + 0]) ||
|
||||
! isdigit (input[i + 1]))
|
||||
{
|
||||
throw std::string ("\"") + mdy + "\" is not a valid date.";
|
||||
throw std::string ("\"") + input + "\" is not a valid date (y).";
|
||||
}
|
||||
|
||||
year = ::atoi (mdy.substr (i, 2).c_str ()) + 2000;
|
||||
year = atoi (input.substr (i, 2).c_str ()) + 2000;
|
||||
i += 2;
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
if (i + 1 >= mdy.length () ||
|
||||
! isdigit (mdy[i + 0]) ||
|
||||
! isdigit (mdy[i + 1]))
|
||||
if (i + 1 >= input.length () ||
|
||||
! isdigit (input[i + 0]) ||
|
||||
! isdigit (input[i + 1]))
|
||||
{
|
||||
throw std::string ("\"") + mdy + "\" is not a valid date.";
|
||||
throw std::string ("\"") + input + "\" is not a valid date (M).";
|
||||
}
|
||||
|
||||
month = ::atoi (mdy.substr (i, 2).c_str ());
|
||||
month = atoi (input.substr (i, 2).c_str ());
|
||||
i += 2;
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
if (i + 1 >= mdy.length () ||
|
||||
! isdigit (mdy[i + 0]) ||
|
||||
! isdigit (mdy[i + 1]))
|
||||
if (i + 1 >= input.length () ||
|
||||
! isdigit (input[i + 0]) ||
|
||||
! isdigit (input[i + 1]))
|
||||
{
|
||||
throw std::string ("\"") + mdy + "\" is not a valid date.";
|
||||
throw std::string ("\"") + input + "\" is not a valid date (D).";
|
||||
}
|
||||
|
||||
day = atoi (input.substr (i, 2).c_str ());
|
||||
i += 2;
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
if (i + 1 >= input.length () ||
|
||||
! isdigit (input[i + 0]) ||
|
||||
! isdigit (input[i + 1]))
|
||||
{
|
||||
throw std::string ("\"") + input + "\" is not a valid date (V).";
|
||||
}
|
||||
|
||||
day = ::atoi (mdy.substr (i, 2).c_str ());
|
||||
i += 2;
|
||||
break;
|
||||
|
||||
// Quadruple digit.
|
||||
case 'Y':
|
||||
if (i + 3 >= mdy.length () ||
|
||||
! isdigit (mdy[i + 0]) ||
|
||||
! isdigit (mdy[i + 1]) ||
|
||||
! isdigit (mdy[i + 2]) ||
|
||||
! isdigit (mdy[i + 3]))
|
||||
if (i + 3 >= input.length () ||
|
||||
! isdigit (input[i + 0]) ||
|
||||
! isdigit (input[i + 1]) ||
|
||||
! isdigit (input[i + 2]) ||
|
||||
! isdigit (input[i + 3]))
|
||||
{
|
||||
throw std::string ("\"") + mdy + "\" is not a valid date.";
|
||||
throw std::string ("\"") + input + "\" is not a valid date (Y).";
|
||||
}
|
||||
|
||||
year = ::atoi (mdy.substr (i, 4).c_str ());
|
||||
year = atoi (input.substr (i, 4).c_str ());
|
||||
i += 4;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (i >= mdy.length () ||
|
||||
mdy[i] != format[f])
|
||||
// Short names with 3 characters
|
||||
case 'a':
|
||||
if (i + 2 >= input.length () ||
|
||||
isdigit (input[i + 0]) ||
|
||||
isdigit (input[i + 1]) ||
|
||||
isdigit (input[i + 2]))
|
||||
{
|
||||
throw std::string ("\"") + mdy + "\" is not a valid date.";
|
||||
throw std::string ("\"") + input + "\" is not a valid date (a).";
|
||||
}
|
||||
|
||||
i += 3;
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
if (i + 2 >= input.length () ||
|
||||
isdigit (input[i + 0]) ||
|
||||
isdigit (input[i + 1]) ||
|
||||
isdigit (input[i + 2]))
|
||||
{
|
||||
throw std::string ("\"") + input + "\" is not a valid date (b).";
|
||||
}
|
||||
|
||||
month = Date::monthOfYear (input.substr (i, 3).c_str());
|
||||
i += 3;
|
||||
break;
|
||||
|
||||
// Long names
|
||||
case 'A':
|
||||
if (i + 2 >= input.length () ||
|
||||
isdigit (input[i + 0]) ||
|
||||
isdigit (input[i + 1]) ||
|
||||
isdigit (input[i + 2]))
|
||||
{
|
||||
throw std::string ("\"") + input + "\" is not a valid date (A).";
|
||||
}
|
||||
|
||||
i += Date::dayName( Date::dayOfWeek (input.substr (i, 3).c_str()) ).size();
|
||||
break;
|
||||
|
||||
case 'B':
|
||||
if (i + 2 >= input.length () ||
|
||||
isdigit (input[i + 0]) ||
|
||||
isdigit (input[i + 1]) ||
|
||||
isdigit (input[i + 2]))
|
||||
{
|
||||
throw std::string ("\"") + input + "\" is not a valid date (B).";
|
||||
}
|
||||
|
||||
month = Date::monthOfYear (input.substr (i, 3).c_str());
|
||||
i += Date::monthName(month).size();
|
||||
break;
|
||||
|
||||
// Single or double digit.
|
||||
case 'h':
|
||||
if (i >= input.length () ||
|
||||
! isdigit (input[i]))
|
||||
{
|
||||
throw std::string ("\"") + input + "\" is not a valid date (h).";
|
||||
}
|
||||
|
||||
if (i + 1 < input.length () &&
|
||||
(input[i + 0] == '0' || input[i + 0] == '1' || input[i + 0] == '2') &&
|
||||
isdigit (input[i + 1]))
|
||||
{
|
||||
hour = atoi (input.substr (i, 2).c_str ());
|
||||
i += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
hour = atoi (input.substr (i, 1).c_str ());
|
||||
++i;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'H':
|
||||
if (i + 1 >= input.length () ||
|
||||
! isdigit (input[i + 0]) ||
|
||||
! isdigit (input[i + 1]))
|
||||
{
|
||||
throw std::string ("\"") + input + "\" is not a valid date (H).";
|
||||
}
|
||||
|
||||
hour = atoi (input.substr (i, 2).c_str ());
|
||||
i += 2;
|
||||
break;
|
||||
|
||||
case 'N':
|
||||
if (i + 1 >= input.length () ||
|
||||
! isdigit (input[i + 0]) ||
|
||||
! isdigit (input[i + 1]))
|
||||
{
|
||||
throw std::string ("\"") + input + "\" is not a valid date (N).";
|
||||
}
|
||||
|
||||
minute = atoi (input.substr (i, 2).c_str ());
|
||||
i += 2;
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
if (i + 1 >= input.length () ||
|
||||
! isdigit (input[i + 0]) ||
|
||||
! isdigit (input[i + 1]))
|
||||
{
|
||||
throw std::string ("\"") + input + "\" is not a valid date (S).";
|
||||
}
|
||||
|
||||
second = atoi (input.substr (i, 2).c_str ());
|
||||
i += 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (i >= input.length () ||
|
||||
input[i] != format[f])
|
||||
{
|
||||
throw std::string ("\"") + input + "\" is not a valid date (DEFAULT).";
|
||||
}
|
||||
++i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i < mdy.length ())
|
||||
throw std::string ("\"") + mdy + "\" is not a valid date in " + format + " format.";
|
||||
// Default the year to the current year, for formats that lack Y/y.
|
||||
if (year == -1)
|
||||
{
|
||||
time_t now = time (NULL);
|
||||
struct tm* default_year = localtime (&now);
|
||||
year = default_year->tm_year + 1900;
|
||||
}
|
||||
|
||||
if (i < input.length ())
|
||||
throw std::string ("\"") + input + "\" is not a valid date in " + format + " format.";
|
||||
|
||||
if (!valid (month, day, year))
|
||||
throw std::string ("\"") + mdy + "\" is not a valid date.";
|
||||
throw std::string ("\"") + input + "\" is not a valid date (VALID).";
|
||||
|
||||
// Duplicate Date::Date (const int, const int, const int);
|
||||
// Convert to epoch.
|
||||
struct tm t = {0};
|
||||
t.tm_mday = day;
|
||||
t.tm_mon = month - 1;
|
||||
t.tm_year = year - 1900;
|
||||
t.tm_isdst = -1; // Requests that mktime determine summer time effect.
|
||||
t.tm_mday = day;
|
||||
t.tm_mon = month - 1;
|
||||
t.tm_year = year - 1900;
|
||||
t.tm_hour = hour;
|
||||
t.tm_min = minute;
|
||||
t.tm_sec = second;
|
||||
|
||||
mT = mktime (&t);
|
||||
}
|
||||
@@ -226,6 +387,25 @@ std::string Date::toEpochString ()
|
||||
return epoch.str ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// 19980119T070000Z = YYYYMMDDThhmmssZ
|
||||
std::string Date::toISO ()
|
||||
{
|
||||
struct tm* t = gmtime (&mT);
|
||||
|
||||
std::stringstream iso;
|
||||
iso << std::setw (4) << std::setfill ('0') << t->tm_year + 1900
|
||||
<< std::setw (2) << std::setfill ('0') << t->tm_mon + 1
|
||||
<< std::setw (2) << std::setfill ('0') << t->tm_mday
|
||||
<< "T"
|
||||
<< std::setw (2) << std::setfill ('0') << t->tm_hour
|
||||
<< std::setw (2) << std::setfill ('0') << t->tm_min
|
||||
<< std::setw (2) << std::setfill ('0') << t->tm_sec
|
||||
<< "Z";
|
||||
|
||||
return iso.str ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Date::toEpoch (time_t& epoch)
|
||||
{
|
||||
@@ -256,13 +436,22 @@ const std::string Date::toString (const std::string& format /*= "m/d/Y" */) cons
|
||||
char c = localFormat[i];
|
||||
switch (c)
|
||||
{
|
||||
case 'm': sprintf (buffer, "%d", this->month ()); break;
|
||||
case 'M': sprintf (buffer, "%02d", this->month ()); break;
|
||||
case 'd': sprintf (buffer, "%d", this->day ()); break;
|
||||
case 'D': sprintf (buffer, "%02d", this->day ()); break;
|
||||
case 'y': sprintf (buffer, "%02d", this->year () % 100); break;
|
||||
case 'Y': sprintf (buffer, "%d", this->year ()); break;
|
||||
default: sprintf (buffer, "%c", c); break;
|
||||
case 'm': sprintf (buffer, "%d", this->month ()); break;
|
||||
case 'M': sprintf (buffer, "%02d", this->month ()); break;
|
||||
case 'd': sprintf (buffer, "%d", this->day ()); break;
|
||||
case 'D': sprintf (buffer, "%02d", this->day ()); break;
|
||||
case 'y': sprintf (buffer, "%02d", this->year () % 100); break;
|
||||
case 'Y': sprintf (buffer, "%d", this->year ()); break;
|
||||
case 'a': sprintf (buffer, "%.3s", Date::dayName (dayOfWeek ()).c_str ()); break;
|
||||
case 'A': sprintf (buffer, "%s", Date::dayName (dayOfWeek ()).c_str ()); break;
|
||||
case 'b': sprintf (buffer, "%.3s", Date::monthName (month ()).c_str ()); break;
|
||||
case 'B': sprintf (buffer, "%.9s", Date::monthName (month ()).c_str ()); break;
|
||||
case 'V': sprintf (buffer, "%02d", Date::weekOfYear (Date::dayOfWeek (context.config.get ("weekstart")))); break;
|
||||
case 'h': sprintf (buffer, "%d", this->hour ()); break;
|
||||
case 'H': sprintf (buffer, "%02d", this->hour ()); break;
|
||||
case 'N': sprintf (buffer, "%02d", this->minute ()); break;
|
||||
case 'S': sprintf (buffer, "%02d", this->second ()); break;
|
||||
default: sprintf (buffer, "%c", c); break;
|
||||
}
|
||||
|
||||
formatted += buffer;
|
||||
@@ -287,6 +476,22 @@ bool Date::valid (const std::string& input, const std::string& format)
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Date::valid (const int m, const int d, const int y, const int hr,
|
||||
const int mi, const int se)
|
||||
{
|
||||
if (hr < 0 || hr > 23)
|
||||
return false;
|
||||
|
||||
if (mi < 0 || mi > 59)
|
||||
return false;
|
||||
|
||||
if (se < 0 || se > 59)
|
||||
return false;
|
||||
|
||||
return Date::valid (m, d, y);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Date::valid (const int m, const int d, const int y)
|
||||
{
|
||||
@@ -404,7 +609,7 @@ int Date::weekOfYear (int weekStart) const
|
||||
throw std::string ("The 'weekstart' configuration variable may "
|
||||
"only contain 'Sunday' or 'Monday'.");
|
||||
|
||||
int weekNumber = ::atoi (weekStr);
|
||||
int weekNumber = atoi (weekStr);
|
||||
|
||||
if (weekStart == 0)
|
||||
weekNumber += 1;
|
||||
@@ -424,17 +629,64 @@ int Date::dayOfWeek (const std::string& input)
|
||||
{
|
||||
std::string in = lowerCase (input);
|
||||
|
||||
if (in == "sunday") return 0;
|
||||
if (in == "monday") return 1;
|
||||
if (in == "tuesday") return 2;
|
||||
if (in == "wednesday") return 3;
|
||||
if (in == "thursday") return 4;
|
||||
if (in == "friday") return 5;
|
||||
if (in == "saturday") return 6;
|
||||
if (in == "sunday" || in == "sun") return 0;
|
||||
if (in == "monday" || in == "mon") return 1;
|
||||
if (in == "tuesday" || in == "tue") return 2;
|
||||
if (in == "wednesday" || in == "wed") return 3;
|
||||
if (in == "thursday" || in == "thu") return 4;
|
||||
if (in == "friday" || in == "fri") return 5;
|
||||
if (in == "saturday" || in == "sat") return 6;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Date::monthOfYear (const std::string& input)
|
||||
{
|
||||
std::string in = lowerCase (input);
|
||||
|
||||
if (in == "january" || in == "jan") return 1;
|
||||
if (in == "february" || in == "feb") return 2;
|
||||
if (in == "march" || in == "mar") return 3;
|
||||
if (in == "april" || in == "apr") return 4;
|
||||
if (in == "may" || in == "may") return 5;
|
||||
if (in == "june" || in == "jun") return 6;
|
||||
if (in == "july" || in == "jul") return 7;
|
||||
if (in == "august" || in == "aug") return 8;
|
||||
if (in == "september" || in == "sep") return 9;
|
||||
if (in == "october" || in == "oct") return 10;
|
||||
if (in == "november" || in == "nov") return 11;
|
||||
if (in == "december" || in == "dec") return 12;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
time_t Date::easter (int year)
|
||||
{
|
||||
int Y = year;
|
||||
int a = Y % 19;
|
||||
int b = Y / 100;
|
||||
int c = Y % 100;
|
||||
int d = b / 4;
|
||||
int e = b % 4;
|
||||
int f = (b + 8) / 25;
|
||||
int g = (b - f + 1) / 3;
|
||||
int h = (19 * a + b - d - g + 15) % 30;
|
||||
int i = c / 4;
|
||||
int k = c % 4;
|
||||
int L = (32 + 2 * e + 2 * i - h - k) % 7;
|
||||
int m = (a + 11 * h + 22 * L) / 451;
|
||||
int month = (h + L - 7 * m + 114) / 31;
|
||||
int day = ((h + L - 7 * m + 114) % 31) + 1;
|
||||
struct tm t = {0};
|
||||
t.tm_isdst = -1; // Requests that mktime determine summer time effect.
|
||||
t.tm_mday = day;
|
||||
t.tm_mon = month - 1;
|
||||
t.tm_year = year - 1900;
|
||||
return mktime (&t);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Date::month () const
|
||||
{
|
||||
@@ -456,6 +708,27 @@ int Date::year () const
|
||||
return t->tm_year + 1900;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Date::hour () const
|
||||
{
|
||||
struct tm* t = localtime (&mT);
|
||||
return t->tm_hour;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Date::minute () const
|
||||
{
|
||||
struct tm* t = localtime (&mT);
|
||||
return t->tm_min;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Date::second () const
|
||||
{
|
||||
struct tm* t = localtime (&mT);
|
||||
return t->tm_sec;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Date::operator== (const Date& rhs)
|
||||
{
|
||||
@@ -492,6 +765,18 @@ bool Date::operator>= (const Date& rhs)
|
||||
return mT >= rhs.mT;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Date::sameHour (const Date& rhs)
|
||||
{
|
||||
if (this->year () == rhs.year () &&
|
||||
this->month () == rhs.month () &&
|
||||
this->day () == rhs.day () &&
|
||||
this->hour () == rhs.hour ())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Date::sameDay (const Date& rhs)
|
||||
{
|
||||
@@ -522,10 +807,16 @@ bool Date::sameYear (const Date& rhs)
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Date Date::operator- (const int delta)
|
||||
{
|
||||
return Date (mT - delta);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Date Date::operator+ (const int delta)
|
||||
{
|
||||
return Date::Date (mT + delta);
|
||||
return Date (mT + delta);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -551,10 +842,11 @@ time_t Date::operator- (const Date& rhs)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Date::isEpoch (const std::string& input)
|
||||
{
|
||||
if (digitsOnly (input) &&
|
||||
input.length () > 8)
|
||||
if (digitsOnly (input) &&
|
||||
input.length () > 8 &&
|
||||
input.length () <= 10 )
|
||||
{
|
||||
mT = (time_t) ::atoi (input.c_str ());
|
||||
mT = (time_t) atoi (input.c_str ());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -576,6 +868,7 @@ bool Date::isEpoch (const std::string& input)
|
||||
// eow (end of week)
|
||||
// eom (end of month)
|
||||
// eoy (end of year)
|
||||
// now
|
||||
bool Date::isRelativeDate (const std::string& input)
|
||||
{
|
||||
std::string in (lowerCase (input));
|
||||
@@ -593,8 +886,23 @@ bool Date::isRelativeDate (const std::string& input)
|
||||
supported.push_back ("tomorrow");
|
||||
supported.push_back ("yesterday");
|
||||
supported.push_back ("eow");
|
||||
supported.push_back ("eoww");
|
||||
supported.push_back ("eocw");
|
||||
supported.push_back ("eom");
|
||||
supported.push_back ("eoy");
|
||||
supported.push_back ("sow");
|
||||
supported.push_back ("soww");
|
||||
supported.push_back ("socw");
|
||||
supported.push_back ("som");
|
||||
supported.push_back ("soy");
|
||||
supported.push_back ("goodfriday");
|
||||
supported.push_back ("easter");
|
||||
supported.push_back ("eastermonday");
|
||||
supported.push_back ("ascension");
|
||||
supported.push_back ("pentecost");
|
||||
supported.push_back ("midsommar");
|
||||
supported.push_back ("midsommarafton");
|
||||
supported.push_back ("now");
|
||||
|
||||
std::vector <std::string> matches;
|
||||
if (autoComplete (in, supported, matches) == 1)
|
||||
@@ -604,11 +912,25 @@ bool Date::isRelativeDate (const std::string& input)
|
||||
// If day name.
|
||||
int dow;
|
||||
if ((dow = Date::dayOfWeek (found)) != -1 ||
|
||||
found == "eow")
|
||||
found == "eow" ||
|
||||
found == "eoww" ||
|
||||
found == "eocw" ||
|
||||
found == "sow" ||
|
||||
found == "soww" ||
|
||||
found == "socw")
|
||||
{
|
||||
if (found == "eow")
|
||||
if (found == "eow" || found == "eoww")
|
||||
dow = 5;
|
||||
|
||||
if (found == "eocw")
|
||||
dow = (Date::dayOfWeek (context.config.get ("weekstart")) + 6) % 7;
|
||||
|
||||
if (found == "sow" || found == "soww")
|
||||
dow = 1;
|
||||
|
||||
if (found == "socw")
|
||||
dow = Date::dayOfWeek (context.config.get ("weekstart"));
|
||||
|
||||
if (today.dayOfWeek () >= dow)
|
||||
today += (dow - today.dayOfWeek () + 7) * 86400;
|
||||
else
|
||||
@@ -659,6 +981,84 @@ bool Date::isRelativeDate (const std::string& input)
|
||||
mT = then.mT;
|
||||
return true;
|
||||
}
|
||||
else if (found == "som")
|
||||
{
|
||||
int m = today.month () + 1;
|
||||
int y = today.year ();
|
||||
if (m > 12)
|
||||
{
|
||||
m -=12;
|
||||
y++;
|
||||
}
|
||||
Date then (m, 1, y);
|
||||
mT = then.mT;
|
||||
return true;
|
||||
}
|
||||
else if (found == "soy")
|
||||
{
|
||||
Date then (1, 1, today.year () + 1);
|
||||
mT = then.mT;
|
||||
return true;
|
||||
}
|
||||
else if (found == "goodfriday")
|
||||
{
|
||||
Date then (Date::easter(today.year()));
|
||||
mT = then.mT - 86400*2;
|
||||
return true;
|
||||
}
|
||||
else if (found == "easter")
|
||||
{
|
||||
Date then (Date::easter(today.year()));
|
||||
mT = then.mT;
|
||||
return true;
|
||||
}
|
||||
else if (found == "eastermonday")
|
||||
{
|
||||
Date then (Date::easter(today.year()));
|
||||
mT = then.mT + 86400;
|
||||
return true;
|
||||
}
|
||||
else if (found == "ascension")
|
||||
{
|
||||
Date then (Date::easter(today.year()));
|
||||
mT = then.mT + 86400*39;
|
||||
return true;
|
||||
}
|
||||
else if (found == "pentecost")
|
||||
{
|
||||
Date then (Date::easter(today.year()));
|
||||
mT = then.mT + 86400*49;
|
||||
return true;
|
||||
}
|
||||
else if (found == "midsommar")
|
||||
{
|
||||
for (int midsommar = 20; midsommar <= 26; midsommar++)
|
||||
{
|
||||
Date then (6, midsommar, today.year ());
|
||||
if (6 == then.dayOfWeek ())
|
||||
{
|
||||
mT = then.mT;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (found == "midsommarafton")
|
||||
{
|
||||
for (int midsommar = 19; midsommar <= 25; midsommar++)
|
||||
{
|
||||
Date then (6, midsommar, today.year ());
|
||||
if (5 == then.dayOfWeek ())
|
||||
{
|
||||
mT = then.mT;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (found == "now")
|
||||
{
|
||||
mT = time (NULL);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Support "21st" to indicate the next date that is the 21st day.
|
||||
@@ -670,13 +1070,13 @@ bool Date::isRelativeDate (const std::string& input)
|
||||
|
||||
if (isdigit (input[1]))
|
||||
{
|
||||
number = ::atoi (input.substr (0, 2).c_str ());
|
||||
ordinal = lowerCase (input.substr (2, std::string::npos));
|
||||
number = atoi (input.substr (0, 2).c_str ());
|
||||
ordinal = lowerCase (input.substr (2));
|
||||
}
|
||||
else
|
||||
{
|
||||
number = ::atoi (input.substr (0, 2).c_str ());
|
||||
ordinal = lowerCase (input.substr (1, std::string::npos));
|
||||
number = atoi (input.substr (0, 2).c_str ());
|
||||
ordinal = lowerCase (input.substr (1));
|
||||
}
|
||||
|
||||
// Sanity check.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user