do_stuff 0.2.2 → 0.2.3
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 +24 -16
- data/lib/do_stuff/runner.rb +6 -2
- metadata +2 -2
data/README.md
CHANGED
@@ -30,38 +30,46 @@ Usage
|
|
30
30
|
See `t -h`. Examples of use below.
|
31
31
|
|
32
32
|
```
|
33
|
+
[~]$ t -h
|
34
|
+
usage: t list unfinished tasks
|
35
|
+
t <task desc> add a new task
|
36
|
+
t <task num> erase task
|
37
|
+
t -e [task num] edit task file and jump to given task
|
38
|
+
t -h, --help show this message
|
33
39
|
[~]$ t That thing I need to do.
|
34
40
|
Added #1: That thing I need to do.
|
35
|
-
[~]$ t
|
36
|
-
|
37
|
-
[~]$ t
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
Added #4: And another.
|
41
|
+
[~]$ t -e # open the todo file with $EDITOR
|
42
|
+
Added #2: That thing I added from -e.
|
43
|
+
[~]$ t Walk the dog.
|
44
|
+
Added #3: Walk the dog.
|
45
|
+
[~]$ t Wash my clothes.
|
46
|
+
Added #4: Wash my clothes.
|
42
47
|
[~]$ t ALL the things.
|
43
48
|
Added #5: ALL the things.
|
44
49
|
[~]$ t
|
45
50
|
1. That thing I need to do.
|
46
51
|
2. That thing I added from -e.
|
47
|
-
3.
|
48
|
-
4.
|
52
|
+
3. Walk the dog.
|
53
|
+
4. Wash my clothes.
|
49
54
|
5. ALL the things.
|
50
55
|
[~]$ t 2
|
51
56
|
Erased #2: That thing I added from -e.
|
52
57
|
[~]$ t 4
|
53
|
-
Erased #4:
|
58
|
+
Erased #4: Wash my clothes.
|
54
59
|
[~]$ t
|
55
60
|
1. That thing I need to do.
|
56
|
-
3.
|
61
|
+
3. Walk the dog.
|
57
62
|
5. ALL the things.
|
58
|
-
[~]$ t Edit my todo list.
|
59
|
-
Added #2: Edit my todo list.
|
63
|
+
[~]$ t Edit my todo list in vim.
|
64
|
+
Added #2: Edit my todo list in vim.
|
60
65
|
[~]$ t
|
61
66
|
1. That thing I need to do.
|
62
|
-
2. Edit my todo list.
|
63
|
-
3.
|
67
|
+
2. Edit my todo list in vim.
|
68
|
+
3. Walk the dog.
|
64
69
|
5. ALL the things.
|
65
|
-
[~]$ t -e2 #
|
70
|
+
[~]$ t -e2 # edit with $EDITOR, jumping to line with task #2
|
71
|
+
Changed #2:
|
72
|
+
-Edit my todo list in vim.
|
73
|
+
+Finish the demonstration.
|
66
74
|
```
|
67
75
|
|
data/lib/do_stuff/runner.rb
CHANGED
@@ -3,6 +3,10 @@ require 'optparse'
|
|
3
3
|
|
4
4
|
module DoStuff
|
5
5
|
module Runner
|
6
|
+
RED = "\033[31;1m"
|
7
|
+
GREEN = "\033[32;1m"
|
8
|
+
RESET = "\033[m"
|
9
|
+
|
6
10
|
def self.execute(*argv)
|
7
11
|
dostuffrc = ENV['HOME'] + '/.do_stuffrc'
|
8
12
|
abort "Error: Couldn't find #{dostuffrc}.\nPlease create it and put " +
|
@@ -63,8 +67,8 @@ module DoStuff
|
|
63
67
|
old_keys.each do |task_num|
|
64
68
|
if pre_todolist[task_num] != post_todolist[task_num]
|
65
69
|
puts "Changed ##{task_num}:"
|
66
|
-
puts "
|
67
|
-
puts "
|
70
|
+
puts "#{RED}-#{pre_todolist[task_num]}#{RESET}"
|
71
|
+
puts "#{GREEN}+#{post_todolist[task_num]}#{RESET}"
|
68
72
|
end
|
69
73
|
end
|
70
74
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: do_stuff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-03-03 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A minimalistic command-line todo list
|
15
15
|
email: scott@scott-olson.org
|