tdo 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.markdown +28 -0
  2. data/VERSION +1 -1
  3. data/lib/tdo.rb +5 -1
  4. data/tdo.gemspec +1 -1
  5. metadata +2 -2
@@ -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.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
- t = to_hash( self.read_tasks )
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
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tdo}
8
- s.version = "0.0.0"
8
+ s.version = "0.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joshua Hawxwell"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 0
9
- version: 0.0.0
8
+ - 1
9
+ version: 0.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Joshua Hawxwell