syc-task 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +47 -4
- data/lib/sycstring/string_util.rb +1 -0
- data/lib/syctask/environment.rb +1 -0
- data/lib/syctask/version.rb +1 -1
- data/lib/syctime/time_util.rb +4 -0
- metadata +120 -101
data/README.rdoc
CHANGED
@@ -44,6 +44,11 @@ Invoke plan with a filter
|
|
44
44
|
1 - My first task
|
45
45
|
(a)dd, (c)omplete, (s)kip, (q)uit?
|
46
46
|
|
47
|
+
Move tasks to another days plan
|
48
|
+
$ syctask plan today --move tomorrow --id 3,5
|
49
|
+
|
50
|
+
This will move the tasks with ID 3 and 5 from the today's plan to the tomorrow's plan
|
51
|
+
|
47
52
|
===Prioritize tasks
|
48
53
|
Planned tasks can be prioritized in a pair wise comparisson. So each task is
|
49
54
|
compared to all other tasks. The task with the highest priority will bubble on
|
@@ -70,6 +75,21 @@ syctask schedule will then print tasks as follows
|
|
70
75
|
3: 9 - My second task
|
71
76
|
...
|
72
77
|
|
78
|
+
Instead of conducting pairwise comparisson the order of the tasks in the plan
|
79
|
+
can be specified with the -o flag
|
80
|
+
$ syctask plan -o 7,3,10,9
|
81
|
+
|
82
|
+
The plan or schedule command will print the tasks in the specified order
|
83
|
+
Tasks
|
84
|
+
-----
|
85
|
+
0: 7 - My third task
|
86
|
+
1: 3 - My first task
|
87
|
+
2: 10 - My fourth task
|
88
|
+
3: 9 - My second task
|
89
|
+
|
90
|
+
If only a part of the tasks is provided the rest of the tasks is appended to
|
91
|
+
the end of the task plan.
|
92
|
+
|
73
93
|
===Create schedule
|
74
94
|
The schedule command will print a graphical schedule with assigning the tasks
|
75
95
|
added with plan.
|
@@ -97,7 +117,7 @@ The output will be
|
|
97
117
|
0 - 1: My first task
|
98
118
|
|
99
119
|
Adding a task to a meeting
|
100
|
-
$ syctask schedule -a "A:
|
120
|
+
$ syctask schedule -a "A:0"
|
101
121
|
|
102
122
|
will print
|
103
123
|
Meetings
|
@@ -113,7 +133,8 @@ will print
|
|
113
133
|
|
114
134
|
Tasks
|
115
135
|
-----
|
116
|
-
|
136
|
+
0: 1 - My first task
|
137
|
+
|
117
138
|
===List tasks
|
118
139
|
List tasks that are not marked as done in short form
|
119
140
|
$ syctask list
|
@@ -288,8 +309,30 @@ To print to Dell-B1160w-Mono the following command can be used
|
|
288
309
|
$ syctask schedule | lpr -P Dell-B1160w-Mono
|
289
310
|
|
290
311
|
==Notes
|
291
|
-
|
292
|
-
|
312
|
+
Version 0.0.1
|
313
|
+
new, update, list and done is implemented.
|
314
|
+
|
315
|
+
Version 0.0.4
|
316
|
+
* delete: deleting tasks or remove tasks from a task plan
|
317
|
+
* plan: plan tasks and add them to the task plan
|
318
|
+
* schedule: create a schedule with work and busy time and assign the tasks from
|
319
|
+
the task plan to the free times
|
320
|
+
|
321
|
+
Version 0.0.6
|
322
|
+
* start: start a task and track the lead time
|
323
|
+
* stop: stop the tracking and print the lead time of the task
|
324
|
+
* start, stop: the task is logged in the ~/.tasks/task.log file when added and
|
325
|
+
when stopped
|
326
|
+
* prio: prioritize tasks in the task plan, that is specifying the sequence in
|
327
|
+
that the tasks should be conducted
|
328
|
+
* plan: --move flag added to move tasks from the specified plan to another days
|
329
|
+
task plan
|
330
|
+
* update, new: when a follow-up or a due date is provided the task is added to
|
331
|
+
the provided dates task plan. If both dates are set the task is added to both
|
332
|
+
dates task plans
|
333
|
+
|
334
|
+
Version 0.0.7
|
335
|
+
* updated rdoc
|
293
336
|
|
294
337
|
The test files live in the folder test and start with test_.
|
295
338
|
|
data/lib/syctask/environment.rb
CHANGED
data/lib/syctask/version.rb
CHANGED
data/lib/syctime/time_util.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
+
# Functions for time operations
|
1
2
|
module Syctime
|
2
3
|
|
4
|
+
# Translates seconds to years, months, weeks, days, hours, minutes and seconds
|
5
|
+
# The return value is an array [seconds,...,years]
|
3
6
|
def seconds_to_time(seconds)
|
4
7
|
seconds = seconds.round
|
5
8
|
duration = []
|
@@ -12,6 +15,7 @@ module Syctime
|
|
12
15
|
duration << seconds / 60 / 60 / 60 / 24 / 7 / 4 % 12 # years
|
13
16
|
end
|
14
17
|
|
18
|
+
# Translates seconds into a time string like 1 year 2 weeks 5 days 10 minutes.
|
15
19
|
def string_for_seconds(seconds)
|
16
20
|
time = seconds_to_time(seconds)
|
17
21
|
time_name = ['year','month','week','day','hour','minute','second']
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: syc-task
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -115,106 +115,125 @@ description: ! "= Simple task organizer\nsyctask can be used to create, plan, pr
|
|
115
115
|
plan\n 1 - My first task\n (a)dd, (c)omplete, (s)kip, (q)uit? a\n Duration
|
116
116
|
(1 = 15 minutes, return 30 minutes): 3\n --> 1 task(s) planned\n\nInvoke plan
|
117
117
|
with a filter\n $ syctask plan --id \"1,3,5,8\"\n 1 - My first task\n (a)dd,
|
118
|
-
(c)omplete, (s)kip, (q)uit?\n\
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
\
|
134
|
-
\
|
135
|
-
\
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
\
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
\
|
144
|
-
|
145
|
-
|
146
|
-
\
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
\
|
159
|
-
\
|
160
|
-
--
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
\
|
167
|
-
\
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
\
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
tasks
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
the
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
\
|
201
|
-
\
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
118
|
+
(c)omplete, (s)kip, (q)uit?\n\nMove tasks to another days plan\n $ syctask plan
|
119
|
+
today --move tomorrow --id 3,5\n\nThis will move the tasks with ID 3 and 5 from
|
120
|
+
the today's plan to the tomorrow's plan\n\n===Prioritize tasks\nPlanned tasks can
|
121
|
+
be prioritized in a pair wise comparisson. So each task is\ncompared to all other
|
122
|
+
tasks. The task with the highest priority will bubble on\ntop followed by the task
|
123
|
+
with the next highest priority and so on.\n\n $ syctask prio\n 1: My first
|
124
|
+
task\n 2: My second task\n Task 1 has (h)igher or (l)ower priority, or (q)uit:
|
125
|
+
h\n 1: My first task\n 2: My third task\n Task 1 has (h)igher or (l)ower
|
126
|
+
priority, or (q)uit: l\n 1: My third task\n 2: My fourth task\n Task
|
127
|
+
1 has (h)igher or (l)ower priority, or (q)uit: h\n ...\n\nsyctask schedule will
|
128
|
+
then print tasks as follows\n Tasks\n -----\n 0: 10 - My fourth task\n
|
129
|
+
\ 1: 7 - My third task\n 2: 3 - My first task\n 3: 9 - My second task
|
130
|
+
\n ...\n \nInstead of conducting pairwise comparisson the order of the tasks
|
131
|
+
in the plan\ncan be specified with the -o flag\n $ syctask plan -o 7,3,10,9\n\nThe
|
132
|
+
plan or schedule command will print the tasks in the specified order\n Tasks\n
|
133
|
+
\ -----\n 0: 7 - My third task\n 1: 3 - My first task\n 2: 10 - My
|
134
|
+
fourth task\n 3: 9 - My second task\n\nIf only a part of the tasks is provided
|
135
|
+
the rest of the tasks is appended to\nthe end of the task plan.\n\n===Create schedule\nThe
|
136
|
+
schedule command will print a graphical schedule with assigning the tasks\nadded
|
137
|
+
with plan.\n\nCreate a schedule with working time from 8a.m. to 6p.m. and meetings
|
138
|
+
between\n9a.m. and 9.30a.m. and 1p.m. and 2.45p.m.\n $ syctask schedule -w \"8:00-18:00\"
|
139
|
+
-b \"9:00-9:30,13:00-14:45\"\n\nAdd titles to the meetings\n $ syctask schedule
|
140
|
+
-m \"Project status,Management meeting\"\n\nThe output will be\n Meetings\n --------\n
|
141
|
+
\ A - Project status\n B - Management meeting\n\n A B\n
|
142
|
+
\ xxx-///-|---|---|---///////-|---|---|---|\n 8 9 10 11 12 13 14 15
|
143
|
+
\ 16 17 18\n 1\n\n Tasks\n -----\n 0 - 1: My first task\n\nAdding
|
144
|
+
a task to a meeting\n $ syctask schedule -a \"A:0\"\n\nwill print\n Meetings\n
|
145
|
+
\ --------\n A - Project status\n 1 - My first task\n B - Management
|
146
|
+
meeting\n\n A B\n ----///-|---|---|---///////-|---|---|---|\n
|
147
|
+
\ 8 9 10 11 12 13 14 15 16 17 18\n \n\n Tasks\n -----\n 0:
|
148
|
+
1 - My first task\n\n===List tasks\nList tasks that are not marked as done in short
|
149
|
+
form\n $ syctask list\n\nList all tasks in long form\n $ syctask list --all
|
150
|
+
--complete\n\nSearch tasks that match a pattern\n $ syctask list --id \"<10\"
|
151
|
+
--follow_up \">2013-02-25\" --title \"My \\w task\"\n\n===Update tasks\nExcept for
|
152
|
+
title and id all values can be updated. Note and tags are not\noverridden rather
|
153
|
+
supplemented with the update value.\n\nUpdate task with ID 1 and provide some informative
|
154
|
+
note\n $ syctask update 1 --note \"Some explanation about the progress on the
|
155
|
+
task\"\n\n===Complete tasks\nComplete the task with ID 1 and provide a final note\n
|
156
|
+
\ $ syctask done 1 --note \"Finalize my first task\"\n\n===Delete tasks\nDelete
|
157
|
+
tasks with ID 1,3 and 5 from the default task directory\n $ syctask delete --id
|
158
|
+
1,3,5\n\nDelete tasks with ID 8 and 12 from the planned tasks of today. The tasks
|
159
|
+
are\nonly removed from the planned tasks and not physically deleted.\n $ syctask
|
160
|
+
delete --plan today --id 8,12\n\n===Task directory and project directory\nThe global
|
161
|
+
options --taskdir and --project determine where the command finds\nor creates the
|
162
|
+
tasks. The default task directory is ~/.tasks, so if no task\ndirectory is specified
|
163
|
+
all commands obtain tasks from or create tasks in\n~/.tasks. If a project is specified
|
164
|
+
the tasks will be saved to or obtained from the task directories subdirectory specified
|
165
|
+
with the --project flag.\n\n --taskdir --project Tasks in\n - -
|
166
|
+
\ default_task_dir\n x - task_dir\n - x
|
167
|
+
\ default_task_dir/project\n x x task_dir/project\n\nIn
|
168
|
+
the table the relation of commands to --taskdir and --project are listed.\n\n Command
|
169
|
+
\ --taskdir --project Comment\n delete x x deletes the
|
170
|
+
tasks in taskdir/project \n done x x marks tasks in taskdir/project
|
171
|
+
as done\n help - - \n list x x
|
172
|
+
\ lists tasks in taskdir/project\n new x x creates
|
173
|
+
tasks in taskdir/project\n plan x x retrieves tasks to
|
174
|
+
plan from taskdir/projekt\n prio - - input to prio are
|
175
|
+
planned tasks (see plan)\n scan x x creates scanned tasks
|
176
|
+
in taskdir/project\n schedule - - schedules the planned tasks
|
177
|
+
(see plan)\n start - - starts task from planned tasks (see
|
178
|
+
plan)\n stop - - stops task from planned task\n update
|
179
|
+
\ x x updates task in taskdir/project \n\n===Files\n\n* Task
|
180
|
+
files\nThe tasks are named ID.task where ID is any Integer as 10.task. The files
|
181
|
+
are\nsaved as YAML files and can be edited directly.\n\n* Planned tasks files\nThe
|
182
|
+
planned tasks are save to YYYY-MM-DD_planned_tasks in the default task\ndirectory.
|
183
|
+
Each task is saved with the tasks directory and the ID.\n\n* Schedule files\nThe
|
184
|
+
schedule is saved to YYYY-MM-DD_schedule in the default task directory. The\nfiles
|
185
|
+
are saved as YAML files and can be changed manually.\n\n==Working with syctask\nTo
|
186
|
+
work with syctask and get the most out of it there is to follow a certain\nprocess.\n\n===Creating
|
187
|
+
a schedule\n==== View tasks\nIn the morning before I start to work I scan my tasks
|
188
|
+
with syctask list to get\nan overview of my open tasks.\n $ syctask list\n \n====
|
189
|
+
Plan tasks\nNext I start the planning phase with syctask plan. If I have a specific
|
190
|
+
schedule\nfor the day I will filter for the respective tasks\n $ syctask plan\n\n====
|
191
|
+
Prioritize tasks (optionally)\nIf I want to process the tasks in a specific sequence
|
192
|
+
I prioritize the tasks\nwith \n $ syctask prio\n\n==== Create schedule\nI create
|
193
|
+
a schedule with my working hours and meetings that have been scheduled with \n $
|
194
|
+
syctask -w \"8:00-18:00\" -b \"9:00-10:00,14:30-16:00\" -m \"Team,Status\"\n\n====
|
195
|
+
Create an agenda\nI assign the topics I want to discuss in the meetings to the meetings
|
196
|
+
with\n syctask schedule -a \"A:1,3,6;B:3,5\"\n \n==== Start a task\nTo begin
|
197
|
+
I start the first task in the schedule with syctask start 0 (where 0 is the sequence
|
198
|
+
of the planned tasks, the ID is different e.g. 23)\n $ syctask start 0\n\n====
|
199
|
+
End a task\nTo end the task I invoke \n $ syctask stop\nThis will stop the last
|
200
|
+
started task\n\n==== Complete a task\nWhen the task is done I call \n $ syctask
|
201
|
+
done 23\n\n===Attachements\n* E-mails\nIf an e-mail creates a task I create a new
|
202
|
+
task with syctask new title_of_task.\nThe subject of the e-mail I prepend with the
|
203
|
+
ID and move the e-mail to a\n<b>open topics</b> directory.\n\n* Files\nIf I create
|
204
|
+
files in the course of a task I create a folder in the task\ndirectory with the
|
205
|
+
ID and save the files in this directory. If there is an\nexisting directory I link
|
206
|
+
to the file from the ID directory\n\n==Supported platform\nsyc-task has been tested
|
207
|
+
with 1.9.3\n\n==Add TAB-completion to syctask\nTo activate bash's TAB-completion
|
208
|
+
following lines have to be added to ~/.bashrc\n\n complete -F get_syctask_commands
|
209
|
+
syctask\n\n function get_syctask_commands\n {\n if [ -z $2 ] ; then\n
|
210
|
+
\ COMPREPLY=(`syctask help -c`)\n else\n COMPREPLY=(`syctask help
|
211
|
+
-c $2`)\n fi\n }\n\nAfter ~/.bashrc has been updated the shell session has
|
212
|
+
to be restarted with\n $ source ~/.bashrc\n\nNow syctask followed by TAB TAB
|
213
|
+
will print\n\n $ syctask <TAB><TAB>\n delete done list plan scan stop _doc
|
214
|
+
help new prio schedule start update\n \nTo complete a command we can type\n\n $
|
215
|
+
syctask sch<TAB>\n\nwhich will complete to\n\n $ syctask schedule\n\n==Output
|
216
|
+
to Printer\nTo print syctask's output to a printer pipe the command to lpr\n\n $
|
217
|
+
syctask schedule | lpr\n\nThis will print the schedule to the default printer. \n\nTo
|
218
|
+
determine all available printer lpstat can be used with the lpstat -a command\n\n
|
219
|
+
\ $ lpstat -a\n Canon-LBP6650-3470 accepting requests since Sat 16 Mar 2013
|
220
|
+
04:26:15 PM CET\n Dell-B1160w-Mono accepting requests since Sat 16 Mar 2013 04:27:45
|
221
|
+
PM CET\n \nTo print to Dell-B1160w-Mono the following command can be used\n\n
|
222
|
+
\ $ syctask schedule | lpr -P Dell-B1160w-Mono\n\n==Notes\nVersion 0.0.1 \nnew,
|
223
|
+
update, list and done is implemented.\n\nVersion 0.0.4\n* delete: deleting tasks
|
224
|
+
or remove tasks from a task plan\n* plan: plan tasks and add them to the task plan\n*
|
225
|
+
schedule: create a schedule with work and busy time and assign the tasks from\n
|
226
|
+
\ the task plan to the free times\n\nVersion 0.0.6\n* start: start a task and track
|
227
|
+
the lead time\n* stop: stop the tracking and print the lead time of the task\n*
|
228
|
+
start, stop: the task is logged in the ~/.tasks/task.log file when added and\n when
|
229
|
+
stopped\n* prio: prioritize tasks in the task plan, that is specifying the sequence
|
230
|
+
in\n that the tasks should be conducted\n* plan: --move flag added to move tasks
|
231
|
+
from the specified plan to another days\n task plan\n* update, new: when a follow-up
|
232
|
+
or a due date is provided the task is added to\n the provided dates task plan.
|
233
|
+
If both dates are set the task is added to both\n dates task plans\n\nVersion 0.0.7\n*
|
234
|
+
updated rdoc\n\nThe test files live in the folder test and start with test_.\n\nThere
|
235
|
+
is a rake file available to run all tests\n\n $ rake test\n \n==License\nsyc-task
|
236
|
+
is released under the {MIT License}[http://opensource.org/licenses/MIT]\n\n==Links\n*
|
218
237
|
[http://www.github.com/sugaryourcoffee/syc-task] - Source code on GitHub\n* [http://syc.dyndns.org/drupal/wiki/syc-task]
|
219
238
|
- Development notebook\n* [https://rubygems.org/gems/syc-backup] - RubyGems\n"
|
220
239
|
email: pierre@sugaryourcoffee.de
|