koi 0.3.0 → 0.3.1
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.md +48 -14
- data/VERSION +1 -1
- data/koi.gemspec +2 -2
- data/lib/koi.rb +7 -5
- metadata +2 -2
data/README.md
CHANGED
@@ -3,9 +3,7 @@ koi
|
|
3
3
|
|
4
4
|
minimal task management for hackers.
|
5
5
|
|
6
|
-
$ sudo gem install koi
|
7
|
-
|
8
|
-
_Note: this project is still under heavy development!_
|
6
|
+
$ sudo gem install koi
|
9
7
|
|
10
8
|
Synopsis
|
11
9
|
--------
|
@@ -25,22 +23,24 @@ Let's see what we've got now with `list`:
|
|
25
23
|
|
26
24
|
$ koi list
|
27
25
|
|
28
|
-
|
29
|
-
|
26
|
+
[0] refactor spaghetti code
|
27
|
+
[1] find a better name
|
30
28
|
|
31
29
|
Tasks can be refered to by index `1`, `2` or by name. You don't have to type in the full name though:
|
32
30
|
|
33
|
-
$ koi tag spaghetti #
|
34
|
-
$ koi
|
31
|
+
$ koi tag spaghetti #food
|
32
|
+
$ koi did 1
|
35
33
|
|
36
|
-
I just went ahead and tagged my first task with `#
|
34
|
+
I just went ahead and tagged my first task with `#food`, and completed my 2nd one. Let's check our status by just typing `koi`:
|
37
35
|
|
38
|
-
$ koi
|
36
|
+
$ koi
|
37
|
+
|
38
|
+
[0] refactor spaghetti code #food
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
[x] find a better name
|
41
|
+
|
42
|
+
The `status` command, also the default command when you just type `koi`, shows your top 5 tasks, as well as
|
43
|
+
your recently completed tasks. As you can see, task `1` was completed, shown by an `x` instead of `1`.
|
44
44
|
|
45
45
|
You can also specify tags when adding new tasks:
|
46
46
|
|
@@ -49,8 +49,42 @@ You can also specify tags when adding new tasks:
|
|
49
49
|
And remove tasks:
|
50
50
|
|
51
51
|
$ koi remove pasta
|
52
|
+
$ koi kill 2
|
53
|
+
|
54
|
+
As well as sticky tasks, with `+` or `float`:
|
55
|
+
|
56
|
+
$ koi + pasta
|
57
|
+
$ koi
|
58
|
+
|
59
|
+
[0] + make pasta #food #yum #kitchen
|
60
|
+
[1] refactor spaghetti code
|
61
|
+
[2] find a better name
|
62
|
+
|
63
|
+
If you want to show all koi with a specific tag, you can use the `show` command:
|
64
|
+
|
65
|
+
$ koi show #yum
|
66
|
+
|
67
|
+
[0] cucumbers #yum
|
68
|
+
[1] pancakes #yum
|
69
|
+
|
70
|
+
And if you want a log of all your activities, just try:
|
71
|
+
|
72
|
+
$ koi log
|
73
|
+
|
74
|
+
Bumping tasks up or down
|
75
|
+
------------------------
|
76
|
+
|
77
|
+
To move koi up in the list, use `rise`:
|
78
|
+
|
79
|
+
$ koi rise 3
|
80
|
+
|
81
|
+
To move koi down the list, use `sink`:
|
82
|
+
|
83
|
+
$ koi sink burgers
|
84
|
+
|
85
|
+
Simple.
|
52
86
|
|
53
|
-
**koi** creates
|
87
|
+
**koi** creates a _.koi_ folder in the directory you initialize your project in. Inside that folder is a _database.yml_ with all your tasks for that project.
|
54
88
|
|
55
89
|
|
56
90
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/koi.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{koi}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["cloudhead"]
|
12
|
-
s.date = %q{2010-03-
|
12
|
+
s.date = %q{2010-03-11}
|
13
13
|
s.default_executable = %q{koi}
|
14
14
|
s.description = %q{minimalist console-based task management for hackers}
|
15
15
|
s.email = %q{self@cloudhead.net}
|
data/lib/koi.rb
CHANGED
@@ -104,9 +104,8 @@ module Koi
|
|
104
104
|
|
105
105
|
def status options = {}
|
106
106
|
todo = @db.select {|e| e.new? }.size
|
107
|
-
out "#{todo} koi in the water" unless todo.zero?
|
108
107
|
|
109
|
-
self.list @db.list[0
|
108
|
+
self.list @db.list[0...5]
|
110
109
|
|
111
110
|
@db.select {|e| e[:status] == :completed }.
|
112
111
|
sort_by {|e| e[:completed_at] }[0..3].reverse.each do |e|
|
@@ -116,23 +115,26 @@ module Koi
|
|
116
115
|
true
|
117
116
|
end
|
118
117
|
|
119
|
-
def show tags
|
118
|
+
def show tags = []
|
120
119
|
tags = [tags].flatten
|
121
|
-
self.list @db.select {|e|
|
120
|
+
self.list @db.select {|e| (tags & e[:tags]).any? }
|
122
121
|
end
|
123
122
|
|
124
123
|
#
|
125
124
|
# List current tasks
|
126
125
|
#
|
127
|
-
def list entities = @db.list
|
126
|
+
def list entities = @db.list
|
128
127
|
out
|
129
128
|
|
129
|
+
entities = entities.is_a?(Fixnum) ? @db.list[0...entities] : entities
|
130
|
+
|
130
131
|
entities.reject {|e| e[:status] == :removed }.each_with_index do |e, i|
|
131
132
|
out " [#{i}]".blue +
|
132
133
|
"#{e.sticky?? " + ".bold : " "}" +
|
133
134
|
e[:title].underline +
|
134
135
|
" #{e[:tags].join(' ')}".cyan
|
135
136
|
end.tap do |list|
|
137
|
+
out " ..." if @db.list.length > entities.length && !entities.length.zero?
|
136
138
|
out " there are no koi in the water".green if list.size.zero?
|
137
139
|
end
|
138
140
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: koi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cloudhead
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-03-
|
12
|
+
date: 2010-03-11 00:00:00 -05:00
|
13
13
|
default_executable: koi
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|