paradeiser 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.travis.yml +8 -0
- data/Gemfile +6 -0
- data/Guardfile +17 -0
- data/README.md +76 -187
- data/Rakefile +12 -1
- data/TODO.md +62 -0
- data/VISION.md +474 -0
- data/bin/pom +60 -0
- data/doc/Paradeiser::Pomodoro_status.svg +50 -0
- data/lib/paradeiser.rb +25 -2
- data/lib/paradeiser/controllers/controller.rb +30 -0
- data/lib/paradeiser/controllers/paradeiser_controller.rb +10 -0
- data/lib/paradeiser/controllers/pomodori_controller.rb +38 -0
- data/lib/paradeiser/errors.rb +31 -0
- data/lib/paradeiser/executor.rb +15 -0
- data/lib/paradeiser/models/hook.rb +26 -0
- data/lib/paradeiser/models/job.rb +25 -0
- data/lib/paradeiser/models/pomodoro.rb +58 -0
- data/lib/paradeiser/models/repository.rb +57 -0
- data/lib/paradeiser/models/scheduler.rb +43 -0
- data/lib/paradeiser/refinements.rb +5 -0
- data/lib/paradeiser/router.rb +29 -0
- data/lib/paradeiser/version.rb +1 -1
- data/lib/paradeiser/view.rb +21 -0
- data/lib/paradeiser/views/paradeiser/init.erb +1 -0
- data/lib/paradeiser/views/pomodori/finish.erb +1 -0
- data/lib/paradeiser/views/pomodori/report.erb +5 -0
- data/lib/paradeiser/views/pomodori/start.erb +1 -0
- data/lib/paradeiser/views/pomodori/status.erb +9 -0
- data/paradeiser.gemspec +21 -4
- data/templates/linux/hooks/after-finish +10 -0
- data/templates/linux/hooks/after-start +7 -0
- data/templates/mac/hooks/after-finish +10 -0
- data/templates/mac/hooks/after-start +7 -0
- data/test/helper.rb +24 -0
- data/test/integration/test_pom.rb +17 -0
- data/test/lib/assertions.rb +10 -0
- data/test/lib/at_mock.rb +6 -0
- data/test/lib/options_mock.rb +7 -0
- data/test/lib/pomodoro_mock.rb +11 -0
- data/test/lib/process_status_mock.rb +2 -0
- data/test/lib/pstore_mock.rb +16 -0
- data/test/templates/hooks/pre-finish +1 -0
- data/test/unit/test_paradeiser_controller.rb +88 -0
- data/test/unit/test_pomodori_controller.rb +103 -0
- data/test/unit/test_pomodori_view.rb +78 -0
- data/test/unit/test_pomodoro.rb +100 -0
- data/test/unit/test_pomodoro_hooks.rb +83 -0
- data/test/unit/test_repository.rb +127 -0
- data/test/unit/test_router.rb +36 -0
- data/test/unit/test_scheduler.rb +44 -0
- metadata +244 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dcbd4bf94f9cbba76054b78656e283c3b626d32
|
4
|
+
data.tar.gz: 4368ba13bf80540e2a58bc76e49bb2347a1275e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91a9cd45c540b4be0ee843f525329dd7f53287cfb0e8b746df60dae4ad1968a04077e7bae9a1249024d8eeab7b8cb718d25b29860e0efc29663810454d49c9fc
|
7
|
+
data.tar.gz: f72225528fedafccf789eb37a23daf9294803d0aa623e06da9a040844c049fd171a7efaf092382551833bfccbca79ae09450822a41f19469854bb9774b16a614
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/Guardfile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
guard 'bundler' do
|
2
|
+
watch('Gemfile')
|
3
|
+
watch(%r|^.*\.gemspec|)
|
4
|
+
end
|
5
|
+
|
6
|
+
guard 'minitest' do
|
7
|
+
watch(%r|^test/unit/test_(.*)\.rb|){|m| "test/unit/test_#{m[1]}.rb"}
|
8
|
+
watch(%r|^lib/*\.rb|){'test'}
|
9
|
+
watch(%r|^lib/.*/*\.rb|){'test'}
|
10
|
+
watch(%r{^lib/.*/([^/]+)\.rb$}){|m| "test/unit/test_#{m[1]}.rb"}
|
11
|
+
watch(%r|^test/helper\.rb|){'test'}
|
12
|
+
watch(%r{^lib/.*/views/(.*)/[^/]+\.erb$}){|m| "test/unit/test_#{m[1]}_view.rb"}
|
13
|
+
|
14
|
+
# Integration tests
|
15
|
+
watch(%r{^bin/([^/]+)$}){|m| "test/integration/test_#{m[1]}.rb"}
|
16
|
+
watch(%r|^test/integration/test_(.*)\.rb|){|m| "test/integration/test_#{m[1]}.rb"}
|
17
|
+
end
|
data/README.md
CHANGED
@@ -1,15 +1,25 @@
|
|
1
1
|
# Paradeiser
|
2
2
|
|
3
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/paradeiser.png)](http://badge.fury.io/rb/paradeiser)
|
4
|
+
[![Build Status](https://secure.travis-ci.org/nerab/paradeiser.png?branch=master)](http://travis-ci.org/nerab/paradeiser)
|
4
5
|
|
5
|
-
|
6
|
+
_This project is developed with the [readme-driven development](http://tom.preston-werner.com/2010/08/23/readme-driven-development.html) method. This file describes the functionality that is actually implemented, whereas the [VISION](VISION.md) describes the vision where the tool should go._
|
6
7
|
|
7
|
-
|
8
|
+
Paradeiser is a command-line tool for the [Pomodoro Technique](http://www.pomodorotechnique.com/). It keeps track of the current pomodoro and assists the user in managing active and past pomodori:
|
9
|
+
|
10
|
+
* Records finished pomodori
|
8
11
|
* Keeps track of the timer for the active pomodoro and the break
|
9
|
-
* Provides out-of-the-box reports
|
10
|
-
|
12
|
+
* Provides out-of-the-box reports
|
13
|
+
|
14
|
+
Paradeiser itself is not concerned with the actual management of tasks. There are plenty of tools for that; e.g. [TaskWarrior](http://taskwarrior.org/).
|
15
|
+
|
16
|
+
## Concepts
|
17
|
+
|
18
|
+
### Rule #1
|
11
19
|
|
12
|
-
|
20
|
+
There must never be more than one pomodoro [xor](http://en.wikipedia.org/wiki/Xor) break at any given time.
|
21
|
+
|
22
|
+
This is scoped to a single user account (not just the `$POM_DIR` directory, but also the `at` queue).
|
13
23
|
|
14
24
|
## Installation
|
15
25
|
|
@@ -21,220 +31,107 @@ Paradeiser itself is not concerned with the actual management of tasks. There ar
|
|
21
31
|
|
22
32
|
$ pom start
|
23
33
|
|
24
|
-
|
25
|
-
|
26
|
-
If a break is still active, it will be stopped before the new pomodoro is started.
|
27
|
-
|
28
|
-
Note that for a single user account (technically, for a `~/.paradeiser` directory), not more than one pomodoro [xor](http://en.wikipedia.org/wiki/Xor) one break can be active at any given time.
|
34
|
+
Because of Rule #1, calling start while a pomodoro is active will print an error message.
|
29
35
|
|
30
36
|
### Finish the pomodoro
|
31
37
|
|
32
38
|
$ pom finish
|
33
|
-
$ pom stop # alias
|
34
|
-
|
35
|
-
If a pomodoro is active, it will be marked as successful after stopping it, regardless of whether the 25 minutes are over or not. If a break is active, it will be stopped. If neither a pomodoro nor or break are active, a warning message will be printed.
|
36
|
-
|
37
|
-
### Record an interruption of the current pomodoro
|
38
|
-
|
39
|
-
$ pom interrupt --external Phone call from boss
|
40
|
-
$ pom interrupt --internal "Couldn't stay away from Twitter"
|
41
|
-
|
42
|
-
Remaining arguments, if present, will be added to the interrupt as annotation. If no pomodoro is active or interrupted (status is idle or paused), the command will throw an error.
|
43
|
-
|
44
|
-
### Resume the pomodoro after an interruption
|
45
|
-
|
46
|
-
$ pom resume
|
47
|
-
|
48
|
-
If there is no interrupted pomodoro, the command will throw an error.
|
49
39
|
|
50
|
-
|
40
|
+
If a pomodoro is active, it will be marked as successful after stopping it, regardless of whether the 25 minutes are over or not.
|
51
41
|
|
52
|
-
|
42
|
+
If there is no active pomodoro, an error message will be printed.
|
53
43
|
|
54
|
-
|
44
|
+
### Initialize Paradeiser
|
55
45
|
|
56
|
-
|
46
|
+
* Initialize the default directory that is used to store the Paradeiser configuration and data:
|
57
47
|
|
58
|
-
|
48
|
+
$ pom init
|
59
49
|
|
60
|
-
|
50
|
+
Creates the `$POM_DIR` directory and the sample hooks in `$POM_DIR/hooks`. The data store will not be created on `pom init`, but when the first write operation happens (e.g. `pom start`, but not `pom report`).
|
61
51
|
|
62
|
-
|
52
|
+
* Initialize an abritrary directory
|
63
53
|
|
64
|
-
|
54
|
+
$ pom init /tmp
|
65
55
|
|
66
|
-
|
67
|
-
$ pom abandon # alias
|
56
|
+
This command initializes `/tmp` as `$POM_DIR`.
|
68
57
|
|
69
|
-
|
58
|
+
## Timer with `at`
|
70
59
|
|
71
|
-
|
60
|
+
A central aspect of the Pomodoro Technique is the timer function:
|
72
61
|
|
73
|
-
|
62
|
+
* The remaining time of the active pomodoro or break must be displayed to the user.
|
63
|
+
* When the pomodoro or break is over, the user also needs to get a notification.
|
74
64
|
|
75
|
-
|
65
|
+
The `at` command is used for this. We just tell it to call
|
76
66
|
|
77
|
-
|
67
|
+
pom finish
|
78
68
|
|
79
|
-
|
69
|
+
when the pomodoro is over.
|
80
70
|
|
81
|
-
|
82
|
-
macbook@01:23:45:67:89:0A "Home Office"
|
83
|
-
macbook@45:01:89:0A:67:23 "Starbucks"
|
71
|
+
When a pomodoro is started, Paradeiser enqueues itself to `at` like this:
|
84
72
|
|
85
|
-
|
73
|
+
echo pom finish | at now + 25 minutes
|
86
74
|
|
87
|
-
|
88
|
-
Home Office
|
75
|
+
When `at` calls Paradeiser with this command, the pomodoro / break will be over and Paradeiser can do all the internal processing related to stopping the pomodoro / break (incl. calling the appropriate hooks, see below).
|
89
76
|
|
90
|
-
|
91
|
-
|
92
|
-
$ pom location "Home Office"
|
93
|
-
macbook@01:23:45:67:89:0A
|
94
|
-
|
95
|
-
* Label a location
|
96
|
-
|
97
|
-
$ pom location macbook@01:23:45:67:89:0A "Your Label"
|
98
|
-
|
99
|
-
## Low-level commands
|
100
|
-
|
101
|
-
We don't want another daemon, and `at` exists. We just tell `at` to call
|
102
|
-
|
103
|
-
pom _stop-break
|
104
|
-
|
105
|
-
when the break is over. The underscore convention marks this command as a protected one that is not to be called from outside.
|
106
|
-
|
107
|
-
So when `at` calls Paradeiser with this line, the pomodoro or break are over and Paradeiser does all the internal processing related to stopping the break (incl. calling the appropriate hooks, see below).
|
77
|
+
Paradeiser uses a dedicated at queue named 'p' to organize its jobs and to prevent accidentially overwriting other scheduled tasks.
|
108
78
|
|
109
79
|
## Status
|
110
80
|
|
111
|
-
|
112
|
-
Pomodoro #2 started at 11:03. 14 minutes remaining.
|
81
|
+
Paradeiser can print the current status to STDOUT with the `pom status` command. The current state is provided as process exit status (which is also useful when the output is suppressed).
|
113
82
|
|
114
|
-
|
115
|
-
No pomodoro active. Last pomodoro was finished successfully at 2013-07-16 17.07.
|
83
|
+
* Given an active pomodoro:
|
116
84
|
|
117
|
-
|
118
|
-
|
85
|
+
$ pom status
|
86
|
+
Pomodoro #2 is active (started 11:03, 14 minutes remaining).
|
119
87
|
|
120
|
-
|
121
|
-
|
88
|
+
$ pom status > /dev/null
|
89
|
+
$ echo $?
|
90
|
+
0
|
122
91
|
|
123
|
-
|
124
|
-
03:39
|
92
|
+
* Given no active pomodoro and the last one (not earlier as today) was finished:
|
125
93
|
|
126
|
-
|
127
|
-
|
94
|
+
$ pom status
|
95
|
+
No active pomodoro. Last one was finished at 16:58.
|
128
96
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
"type": "break",
|
133
|
-
"length": 600,
|
134
|
-
"remaining": 363,
|
135
|
-
"start": 1373988295,
|
136
|
-
"end": 1373988595
|
137
|
-
}
|
138
|
-
}
|
97
|
+
$ pom status > /dev/null
|
98
|
+
$ echo $?
|
99
|
+
1
|
139
100
|
|
140
101
|
## Reports
|
141
102
|
|
142
103
|
$ pom report
|
143
|
-
|
144
|
-
|
145
|
-
3 pomodori finished
|
146
|
-
1 pomodoro cancelled
|
147
|
-
1 internal interruptions (27 minutes in total)
|
148
|
-
2 external interruptions (2 hours and 28 minutes in total)
|
149
|
-
4 breaks (3 short, 1 long; 45 minutes in total)
|
150
|
-
|
151
|
-
Most efficient location: Home Office (2/0/1/0)
|
152
|
-
Least efficient location: Coffeshop (1/1/0/2)
|
153
|
-
|
154
|
-
The following locations do not have a label. Assign it with
|
155
|
-
|
156
|
-
$ pom location macbook@01:23:45:67:89:0A "Your Label"
|
157
|
-
|
158
|
-
The command defaults to `--day`. Alternative options are `--week`, `--month` or `--year`. Without a value, the argument assumes the current day / week / month / year. The first day of the period can be specified as argument, e.g. `pom report --day=2013-07-18`. The period is parsed with [Chronic](http://chronic.rubyforge.org/), which also enables symbolic values like `pom report --month="last month"`.
|
159
|
-
|
160
|
-
The efficiency is calculated (per location) from the number of successful vs. cancelled pomodori, together with the number and length of interruptions. Breaks are not counted towards efficiency.
|
161
|
-
|
162
|
-
### Verbose Reports (timesheet)
|
163
|
-
|
164
|
-
$ pom report --verbose
|
165
|
-
TODO Ordered list of pomodori and breaks, each with annotations (like a time sheet)
|
166
|
-
|
167
|
-
The same options as for regular reports apply.
|
168
|
-
|
169
|
-
### Exporting a Report
|
170
|
-
|
171
|
-
$ pom report --weekly --format JSON # weekly report in JSON format
|
172
|
-
{
|
173
|
-
"TODO": "Specify"
|
174
|
-
}
|
175
|
-
|
176
|
-
## Output Policy
|
177
|
-
Paradeiser follows the [Rule of Silence](http://www.faqs.org/docs/artu/ch01s06.html#id2878450). If all goes well, a command will not print any output to `STDOUT`. Reports are exempted from this rule.
|
178
|
-
|
179
|
-
Error and warning messages always go to `STDERR`.
|
104
|
+
<list of pomodori>
|
180
105
|
|
181
106
|
## Hooks
|
182
|
-
Instead of handling tasks itself, Paradeiser integrates with external tools via hooks. Every event will attempt to find and execute an appropriate script in
|
107
|
+
Instead of handling tasks itself, Paradeiser integrates with external tools via hooks. Every event will attempt to find and execute an appropriate script in `$POM_DIR/hooks/`. Sufficient information will be made available via environment variables.
|
183
108
|
|
184
|
-
`
|
109
|
+
`before-` hooks will be called before the action is executed internally. If a `before-`hook exits non-zero, paradeiser will abort the action and exit non-zero itself; indicating in a message to STDERR which hook caused the abort.
|
185
110
|
|
186
|
-
`
|
111
|
+
`after-` hooks will be called after the action was executed internally. The exit status of a `post`-hook will be passed through paradeiser, but it will not affect the execution of the action anymore.
|
187
112
|
|
188
113
|
### Available Hooks
|
189
114
|
|
190
|
-
* `
|
191
|
-
* `
|
192
|
-
* `
|
193
|
-
* `
|
194
|
-
* `pre-interrupt` is called after the `interrupt` command was received, but before internal action processing begins
|
195
|
-
* `post-interrupt` is called after all interal processing for the `interrupt` action ended
|
196
|
-
* `pre-cancel` is called after the `cancel` command was received, but before internal action processing begins
|
197
|
-
* `post-cancel` is called after all interal processing for the `cancel` action ended
|
198
|
-
* `pre-break` is called after the `break` command was received, but before internal processing for the `break` action begins
|
199
|
-
* `post-break` is called after the timer of the current break fired (the break is over), but after internal processing for the `break` action ended
|
200
|
-
|
201
|
-
Commands are invoked by the user (e.g. `pom start`). Actions are what Paradeiser does internally.
|
115
|
+
* `before-start` is called after the `start` command was received, but before internal processing for the `start` action begins
|
116
|
+
* `after-start` is called after all interal processing for the `start` action ended
|
117
|
+
* `before-finish` is called after the timer of the current pomodoro fired (the pomodoro is over), but before internal processing for the `finish` action begins
|
118
|
+
* `after-finish` is called after all interal processing for the `finish` action ended
|
202
119
|
|
203
120
|
Examples for the use of hooks are:
|
204
121
|
|
205
|
-
* Displaying a desktop notification on `
|
206
|
-
* tmux status bar integration like [pomo](https://github.com/visionmedia/pomo) by writing the status to `~/.pomo_stat` from the `
|
207
|
-
* Displaying a desktop notification
|
208
|
-
|
209
|
-
# ~/.paradeiser/hooks/post-stop
|
210
|
-
notify-send "Break" "$POMODORO_TITLE is over." -u critical
|
211
|
-
|
212
|
-
* Displaying a desktop notification on MacOS:
|
213
|
-
|
214
|
-
# ~/.paradeiser/hooks/post-stop
|
215
|
-
terminal-notifier-success -message "$POMODORO_TITLE is over."
|
216
|
-
|
217
|
-
`$POMODORO_TITLE` is one of the environment variables set by Paradeiser that provides the context for hooks. See below for the full list of available environment variables.
|
122
|
+
* Displaying a desktop notification on `after-finish`
|
123
|
+
* tmux status bar integration like [pomo](https://github.com/visionmedia/pomo) by writing the status to `~/.pomo_stat` from the `after-` hooks.
|
124
|
+
* Displaying a desktop notification
|
218
125
|
|
219
|
-
|
126
|
+
`$POM_TITLE` is one of the environment variables set by Paradeiser that provides the context for hooks. See below for the full list of available environment variables.
|
220
127
|
|
221
|
-
|
128
|
+
## Environment Variables
|
222
129
|
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
# exit unless $(task)
|
230
|
-
|
231
|
-
# find all active
|
232
|
-
active = $(task active) # doesn't work yet; find the right column with 'task columns' and the info in http://taskwarrior.org/projects/taskwarrior/wiki/Feature_custom_reports
|
233
|
-
|
234
|
-
# TODO tag all active tasks so that we can re-start them
|
235
|
-
|
236
|
-
# stop all active
|
237
|
-
task $(task active) stop
|
130
|
+
Variable | Used in | Description
|
131
|
+
--- | --- | ---
|
132
|
+
`$POM_DIR` | Everywhere | Directory where the data store and the hooks are stored. Defaults to `~/.paradeiser/`.
|
133
|
+
`$POM_ID` | Hooks | Identifier of the pomodoro
|
134
|
+
`$POM_STARTED_AT` | Hooks | Timestamp of when the pomodoro was started
|
238
135
|
|
239
136
|
## Similar Projects
|
240
137
|
|
@@ -250,11 +147,14 @@ They have a lot of what I wanted, but pomo focuses very much on the tasks themse
|
|
250
147
|
### State Machine
|
251
148
|
Paradeiser uses a [state machine](https://github.com/pluginaweek/state_machine) to model a pomodoro. Internal event handlers do the actual work; among them is the task of calling the external hooks.
|
252
149
|
|
253
|
-
|
254
|
-
|
150
|
+
![State Transition Diagram](https://rawgithub.com/nerab/paradeiser/master/doc/Paradeiser::Pomodoro_status.svg)
|
151
|
+
|
152
|
+
The graph was created using the rake task that comes with `state_machine`:
|
153
|
+
|
154
|
+
rake state_machine:draw CLASS=Paradeiser::Pomodoro TARGET=doc FORMAT=svg HUMAN_NAMES=true ORIENTATION=landscape
|
255
155
|
|
256
156
|
## API
|
257
|
-
The actual storage backend is *not a public API* and may change at any given time.
|
157
|
+
The actual storage backend is *not a public API* and may change at any given time.
|
258
158
|
|
259
159
|
## Sync
|
260
160
|
In todays world of distributed devices, synching data is a problem almost every app needs to solve. Paradeiser is no exception - it is very easy to come up with use cases that involve many computers. Maybe the user has different devices (mobile and desktop), maybe the user works in different environments, and wants to record all pomodori into a single system.
|
@@ -268,20 +168,9 @@ There are many potential solutions to this problem:
|
|
268
168
|
|
269
169
|
All of these are too much overhead right now, so the decision was made to keep Paradeiser simple and not implement any sync features. This may me revisited in a later version of the app.
|
270
170
|
|
271
|
-
##
|
272
|
-
Recording the location of a pomodoro allows Paradeiser to compare the average count of successful and cancelled pomodori and the number of interruptions by location, so that a report can tell in which environment we get the most work done.
|
273
|
-
|
274
|
-
In order to record the current location at the start of the pomodoro, Paradeiser will record the hostname and the MAC address of the default gateway:
|
275
|
-
|
276
|
-
* OSX
|
277
|
-
|
278
|
-
arp 0.0.0.0 | head -1 | awk {'print $4'}
|
279
|
-
|
280
|
-
* Linux:
|
281
|
-
|
282
|
-
GATEWAY=$(netstat -rn | grep "^0.0.0.0" | cut -c17-31); ping -c1 $GATEWAY >/dev/null; arp -n $GATEWAY | tail -n1 | cut -c34-50
|
171
|
+
## Issues
|
283
172
|
|
284
|
-
|
173
|
+
1. `at` is disabled on MacOS by default. You will need to [turn it on](https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/atrun.8.html) in order to make Paradeiser work correctly.
|
285
174
|
|
286
175
|
## What about the app's name?
|
287
176
|
In Austrian German, "Paradeiser" means tomato, of which the Italian translation is pomodoro.
|
data/Rakefile
CHANGED
@@ -1 +1,12 @@
|
|
1
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rake/testtask'
|
3
|
+
|
4
|
+
require 'paradeiser'
|
5
|
+
require 'tasks/state_machine'
|
6
|
+
|
7
|
+
Rake::TestTask.new(:test) do |test|
|
8
|
+
test.libs << 'lib' << 'test' << 'test/helpers'
|
9
|
+
test.test_files = FileList['test/**/test_*.rb']
|
10
|
+
end
|
11
|
+
|
12
|
+
task :default => :test
|
data/TODO.md
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# Paradeiser Backlog
|
2
|
+
|
3
|
+
* Implement break
|
4
|
+
|
5
|
+
Cancel all enqueued commands on `pom break`, just like with `pom start`. Otherwise commands already enqueued to `at` would accidentially change a newer thing while thinking of operating on the older thing.
|
6
|
+
|
7
|
+
This is safe (and required) because of Rule #1.
|
8
|
+
|
9
|
+
* Implement interrupts
|
10
|
+
|
11
|
+
* Implement `pom annotate` and annotations for most commands
|
12
|
+
|
13
|
+
* Improve status messages with relative times and dates (`distance_of_time_in_words_to_now`)
|
14
|
+
|
15
|
+
* POM_ID is not available to `*-start` hooks because the pomodoro wasn't saved yet. We could either assign it before saving it or allow saving idle pomodori.
|
16
|
+
|
17
|
+
* A text-based repo format would be much more UNIX-like. Think about a JSON repo. Loading it could share a lot of code with import (which we will need anyway). And we cannot trust a JSON repo any more than an import file.
|
18
|
+
|
19
|
+
* Make `start` the default subcommand for `pom break`, so that `pom break` is the same as `pom break start`.
|
20
|
+
|
21
|
+
* Have the router catch warnings (those errors that extend Warning) and print the message to STDERR, but do not exit. The actual exit code is still determined by the controller.
|
22
|
+
|
23
|
+
* Add more tests for the scheduler (error cases like no access, or job not added due to other issues)
|
24
|
+
|
25
|
+
* With the --trace option, print the job id and instructions to look at the `at` queue after enqueing a job. Also, print if a hook wasn't found or was found, but is not executable.
|
26
|
+
|
27
|
+
* Scope the id to the day by introducing a key class the is an aggregate of day and id.
|
28
|
+
- The view only shows the id for any given day in most reports. That means that a day (current by default, others in queries or import) is the scope of a pomodoro id.
|
29
|
+
- We don't have to globally identify pomodori with uuids because of rule #1
|
30
|
+
|
31
|
+
This also makes `pom import` simple - only if there is nothing on record for the time between the start and end times of the imported thing, it is accepted into our system.
|
32
|
+
|
33
|
+
Deleting or overwriting existing pomodori is not supported. Manual editing, if ever needed, can be done with exporting, deleting the db file, fixing up the exported file, and importing it into a fresh $POM_DIR.
|
34
|
+
|
35
|
+
Active pomodori or breaks are not exported or imported.
|
36
|
+
|
37
|
+
* Use Highline#color to color output pro:Paradeiser
|
38
|
+
- Status: red/green/yellow
|
39
|
+
- Errors red, warnings yellow, otherwise white
|
40
|
+
- Turn off when running w/o tty and when --no-color is given
|
41
|
+
|
42
|
+
* Print only the id of the pom that was just created / modified / queried when not running in a tty
|
43
|
+
- test with `if $stdin.tty?`
|
44
|
+
- If that approach works well, suggest it for TaskWarrior too (for bulk actions, e.g. in scripts)
|
45
|
+
|
46
|
+
* Implement documentation Approach
|
47
|
+
- `pom help` is what the user will use to get information.
|
48
|
+
- Not sure how to allow the user to look at features that are not related to a command. Either extend `pom help` to accept arbitrary keywords, or look into 'gem man`.
|
49
|
+
|
50
|
+
Development Tasks
|
51
|
+
|
52
|
+
- Describe each feature / command in one md file (alternatively, store at GitHub issues as feature, would allow discussion).
|
53
|
+
- When a feature is done, move it to a doc file (not the readme; it's getting too big) or a wiki page.
|
54
|
+
- `pom help <command>` consumes the feature files.
|
55
|
+
- Feature files could be exported onto a the github wiki or static pages about Paradeiser.
|
56
|
+
- As part of finishing a feature, the feature file is moved from the backlog file to in individual doc file, and the README is updated to mention that feature.
|
57
|
+
|
58
|
+
* Promote Paradeiser
|
59
|
+
- Publish an [ASCII cast](http://ascii.io/)
|
60
|
+
- Tell the TaskWarrior community about Paradeiser
|
61
|
+
- Tell the Pomodoro community about Paradeiser
|
62
|
+
- Tell the Ruby community about Paradeiser (e.g. @neverbendeasy does kanban)
|