tdo 0.0.0 → 0.0.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.markdown +28 -0
- data/VERSION +1 -1
- data/lib/tdo.rb +5 -1
- data/tdo.gemspec +1 -1
- metadata +2 -2
data/README.markdown
CHANGED
@@ -2,6 +2,34 @@
|
|
2
2
|
|
3
3
|
A simple ruby app that can edit and read a todo list.
|
4
4
|
|
5
|
+
## How To
|
6
|
+
|
7
|
+
Install with:
|
8
|
+
|
9
|
+
(sudo) gem install tdo
|
10
|
+
|
11
|
+
Then add a new task with:
|
12
|
+
|
13
|
+
tdo "I'm a new task!"
|
14
|
+
|
15
|
+
...Or add keep your tasks in groups with:
|
16
|
+
|
17
|
+
tdo @work "Do that job thing"
|
18
|
+
|
19
|
+
View your tasks with:
|
20
|
+
|
21
|
+
tdo -r
|
22
|
+
tdo -r @work
|
23
|
+
|
24
|
+
Mark tasks as done when finished:
|
25
|
+
|
26
|
+
tdo -d "I'm a new task"
|
27
|
+
tdo -d @work "Do that job thing"
|
28
|
+
|
29
|
+
Then clear and forget:
|
30
|
+
|
31
|
+
tdo -c
|
32
|
+
|
5
33
|
|
6
34
|
## Copyright
|
7
35
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.1
|
data/lib/tdo.rb
CHANGED
@@ -21,7 +21,11 @@ module Tdo
|
|
21
21
|
# @param [String] task to add
|
22
22
|
# @param [String] group to add the task to
|
23
23
|
def self.add_task( task, group='ungrouped' )
|
24
|
-
|
24
|
+
if File.exists? TODO_FILE
|
25
|
+
t = to_hash( self.read_tasks )
|
26
|
+
else
|
27
|
+
t = {}
|
28
|
+
end
|
25
29
|
t[group] ||= [] # need to create new group if it doesn't exist
|
26
30
|
t[group] << task.strip
|
27
31
|
|
data/tdo.gemspec
CHANGED