pomo 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/History.md +7 -0
- data/Readme.md +25 -20
- data/bin/pomo +22 -4
- data/lib/pomo/task.rb +8 -2
- data/lib/pomo/version.rb +1 -1
- data/pomo.gemspec +2 -2
- metadata +2 -2
data/History.md
CHANGED
data/Readme.md
CHANGED
@@ -9,7 +9,26 @@ With Pomo you can add, remove, list, view, and start timing tasks all via the
|
|
9
9
|
command-line with a simple, slick interface. You are reminded of the remaining
|
10
10
|
time on a task via Growl. These notifications appear half-way, at the 5 minute point,
|
11
11
|
and when the task duration has expired.
|
12
|
+
|
13
|
+
## Task Selection API
|
14
|
+
|
15
|
+
Taken from `pomo help`:
|
16
|
+
|
17
|
+
Most of the subcommands work directly with tasks,
|
18
|
+
and because of this pomo provides a unified task selection api
|
19
|
+
shown below which can be used with most of the commands
|
20
|
+
(those with [task ...] in their synopsis).
|
12
21
|
|
22
|
+
n : selects a single task by index : Ex: pomo remove 1
|
23
|
+
[n ]+ : selects several tasks by index : Ex: pomo remove 2 8 1
|
24
|
+
n..n : selects a range of tasks : Ex: pomo remove 5..9
|
25
|
+
n..-n : selects a range of tasks : Ex: pomo remove 2..-1
|
26
|
+
first : selects the first task : Ex: pomo remove first
|
27
|
+
last : selects the last task : Ex: pomo remove last
|
28
|
+
complete : selects complete tasks : Ex: pomo remove complete
|
29
|
+
incomplete : selects incomplete tasks : Ex: pomo remove incomplete
|
30
|
+
all : selects all tasks : Ex: pomo remove all
|
31
|
+
|
13
32
|
## Examples
|
14
33
|
|
15
34
|
View global or command specific help:
|
@@ -23,7 +42,7 @@ Get started by adding a task:
|
|
23
42
|
And another:
|
24
43
|
$ pomo add "Destroy IE" --description "because IE is terrible"
|
25
44
|
|
26
|
-
List your tasks:
|
45
|
+
List your tasks (or use `pomo` which defaults to `pomo list`):
|
27
46
|
$ pomo list
|
28
47
|
0. Fix IE stying issues : 25 minutes
|
29
48
|
1. Destroy IE : 25 minutes
|
@@ -38,6 +57,11 @@ Once you have completed the task, list again:
|
|
38
57
|
√ 0. Fix IE stying issues : 25 minutes
|
39
58
|
1. Destroy IE : 25 minutes
|
40
59
|
|
60
|
+
Or take a break:
|
61
|
+
$ pomo break
|
62
|
+
$ pomo break 10
|
63
|
+
$ pomo break --length 10
|
64
|
+
|
41
65
|
List only remaining tasks:
|
42
66
|
$ pomo list --incomplete
|
43
67
|
1. Destroy IE : 25 minutes
|
@@ -83,25 +107,6 @@ Remove all tasks:
|
|
83
107
|
$ pomo remove all
|
84
108
|
$ pomo rm all
|
85
109
|
|
86
|
-
## Task Selection API
|
87
|
-
|
88
|
-
Taken from `pomo help`:
|
89
|
-
|
90
|
-
Most of the subcommands work directly with tasks,
|
91
|
-
and because of this pomo provides a unified task selection api
|
92
|
-
shown below which can be used with most of the commands
|
93
|
-
(those with [task ...] in their synopsis).
|
94
|
-
|
95
|
-
n : selects a single task by index : Ex: pomo remove 1
|
96
|
-
[n ]+ : selects several tasks by index : Ex: pomo remove 2 8 1
|
97
|
-
n..n : selects a range of tasks : Ex: pomo remove 5..9
|
98
|
-
n..-n : selects a range of tasks : Ex: pomo remove 2..-1
|
99
|
-
first : selects the first task : Ex: pomo remove first
|
100
|
-
last : selects the last task : Ex: pomo remove last
|
101
|
-
complete : selects complete tasks : Ex: pomo remove complete
|
102
|
-
incomplete : selects incomplete tasks : Ex: pomo remove incomplete
|
103
|
-
all : selects all tasks : Ex: pomo remove all
|
104
|
-
|
105
110
|
## License
|
106
111
|
|
107
112
|
(The MIT License)
|
data/bin/pomo
CHANGED
@@ -29,6 +29,8 @@ program :int_message, "\nTerminated pomo" \
|
|
29
29
|
|
30
30
|
list = Pomo::List.new '~/.pomo'
|
31
31
|
|
32
|
+
default_command :list
|
33
|
+
|
32
34
|
command :start do |c|
|
33
35
|
c.syntax = 'pomo start [task] [options]'
|
34
36
|
c.summary = 'Start a task'
|
@@ -57,10 +59,25 @@ command :add do |c|
|
|
57
59
|
c.option '-d', '--description string', 'Add verbose task description'
|
58
60
|
c.option '-l', '--length minutes', Integer, 'Change the default length in minutes'
|
59
61
|
c.action do |args, options|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
62
|
+
task = Pomo::Task.new(args.shift, options.__hash__)
|
63
|
+
list << task
|
64
|
+
list.save
|
65
|
+
say "Task #{task} added"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
command :break do |c|
|
70
|
+
c.syntax = 'pomo break [length] [options]'
|
71
|
+
c.summary = 'Take a break'
|
72
|
+
c.description = 'Take a break, defaults to 5 minutes or [length] or --length'
|
73
|
+
c.example 'Take a five minute break', 'pomo break'
|
74
|
+
c.example 'Take a 30 minute break', 'pomo break 30'
|
75
|
+
c.example 'Take a 30 minute break', 'pomo break --length 30'
|
76
|
+
c.option '-l', '--length minutes', Integer, 'Change the default length in minutes'
|
77
|
+
c.action do |args, options|
|
78
|
+
options.default :length => args.first ? args.first.to_i : 5
|
79
|
+
task = Pomo::Task.new('Break time', options.__hash__)
|
80
|
+
task.start
|
64
81
|
end
|
65
82
|
end
|
66
83
|
|
@@ -84,6 +101,7 @@ command :remove do |c|
|
|
84
101
|
end
|
85
102
|
end
|
86
103
|
alias_command :rm, :remove
|
104
|
+
alias_command :clear, :remove, 'all'
|
87
105
|
|
88
106
|
command :view do |c|
|
89
107
|
c.syntax = 'pomo view [task ...] [options]'
|
data/lib/pomo/task.rb
CHANGED
@@ -12,7 +12,6 @@ module Pomo
|
|
12
12
|
# Task name.
|
13
13
|
|
14
14
|
attr_reader :name
|
15
|
-
alias :to_s :name
|
16
15
|
|
17
16
|
##
|
18
17
|
# Length in minutes.
|
@@ -39,6 +38,13 @@ module Pomo
|
|
39
38
|
@complete = false
|
40
39
|
end
|
41
40
|
|
41
|
+
##
|
42
|
+
# Quoted task name.
|
43
|
+
|
44
|
+
def to_s
|
45
|
+
name.inspect
|
46
|
+
end
|
47
|
+
|
42
48
|
##
|
43
49
|
# Check if the task has been completed.
|
44
50
|
|
@@ -50,7 +56,7 @@ module Pomo
|
|
50
56
|
# Start timing the task.
|
51
57
|
|
52
58
|
def start
|
53
|
-
complete_message = "time is up
|
59
|
+
complete_message = "time is up! hope you are finished #{self}"
|
54
60
|
progress (0..length).to_a.reverse, :format => "(:progress_bar) :remaining minutes remaining", :complete_message => complete_message do |remaining|
|
55
61
|
if remaining == length / 2
|
56
62
|
notify_info "#{remaining} minutes remaining, half way there!"
|
data/lib/pomo/version.rb
CHANGED
data/pomo.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{pomo}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.5"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["TJ Holowaychuk"]
|
9
|
-
s.date = %q{2009-10-
|
9
|
+
s.date = %q{2009-10-16}
|
10
10
|
s.default_executable = %q{pomo}
|
11
11
|
s.description = %q{Pomodoro time management for the command-line}
|
12
12
|
s.email = %q{tj@vision-media.ca}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pomo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TJ Holowaychuk
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-16 00:00:00 -07:00
|
13
13
|
default_executable: pomo
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|