tot 0.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.
Files changed (5) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +40 -8
  3. data/lib/tot/version.rb +1 -1
  4. data/lib/tot.rb +12 -2
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NmMwNzQzMTYwMTUwOTIxNWU5ODJjYjE4Y2I4MDg0ZjBlOTUyOTgzOQ==
4
+ NGQ3ODRiNjIyMTM4YTFkYjMxNzE4MDc1YmVmZGM4MmQ3NmRjNDdhMQ==
5
5
  data.tar.gz: !binary |-
6
- NjIwM2QyZDYyMTlhZGFkZGE5ZWQyMWM2ODI3NWU1ZjE4ZGQyZDhkMA==
6
+ NTM2YzA3NDdmZmVkNzNiYmUxNDMwZTNmNjUwYWM2ZDUzZjExM2ExOA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- N2M4ODg2Zjc2MDk1NWEwZmMyNGU3YjM0MTZkNjYwMTBhZjA5MWVmMGNlODI5
10
- MjMxODAwMTZhMTI4M2ZiNmJlYTFkZDU3MzUyODU4MzZkMWRjNGU4MzBjNTdj
11
- OWI2NGM5MDA0YzI0NjkwNWUwNWEzMWM4NzU1NzY2NDg2NmMyMmE=
9
+ Y2JlZDllZTI2Mzk5YzBjNGQyZjAyOTBiZTU1NjA5MTFkOTcyNjQ5MDIxOWEy
10
+ YTEzZmU3NDA1ZWZiOGJmYWZiYzBjNDRhNTFjODZiZWU3ZTUzMTQ4ZjFiMGI3
11
+ NzlhNGI4ODM2OTYxNTA0MjI3YjZkMjJiOWMzM2RmMTVlMzAxZmI=
12
12
  data.tar.gz: !binary |-
13
- NTE0OTRlM2M3NWYyM2E1ZTZkZDYxNzRlOTBiZTFkMjIyY2U4ZDQ0NTZlMTMy
14
- N2M3MjA3OTMzMzNiMmU2MmMwOTU4YjhkZGE1ODY4MmZjNzkxYmRlNjQxZTdm
15
- YmFjNWU3YWQxNjYzMjBhODAxOGZkM2JhM2VkMTQ2YmYyOWYzZWI=
13
+ ZDU4ZGNhMTEwNjk3YWYwNGY3ODhjMTBmYzM4MDk0NWEyZThmNDQ1ZTFlMWI3
14
+ ZWI2YTg2Y2UzOGY1NTEzNzg1MTg2ZGY1MGM5MDAwZWRlMjRmMWE4OTc5ZGFl
15
+ Zjc2ODc4ZTBjNzYzOTNlYmM0ODY4NGUxMjFkZjMwYTNmODIxOTQ=
data/README.md CHANGED
@@ -1,24 +1,56 @@
1
- # Tot
1
+ # ToT
2
2
 
3
3
  Manage your todo on your terminal, inspired by [console-task-checker](https://github.com/alice1017/console-task-checker).
4
4
 
5
5
  ## Installation
6
6
 
7
- Add this line to your application's Gemfile:
7
+ Install it yourself as:
8
8
 
9
- gem 'tot'
9
+ $ gem install tot
10
10
 
11
- And then execute:
11
+ or checkout this repository
12
12
 
13
- $ bundle
13
+ $ git clone https://github.com/ompugao/tot
14
14
 
15
- Or install it yourself as:
15
+ And then execute:
16
+
17
+ $ cd tot
18
+ $ rake install
16
19
 
17
- $ gem install tot
18
20
 
19
21
  ## Usage
20
22
 
21
- Please see
23
+ Please set the environmental variable: EDITOR
24
+
25
+ $ export EDITOR='vim'
26
+
27
+ ### add a task
28
+
29
+ $ tot add
30
+
31
+ <a href="http://www.flickr.com/photos/98458708@N02/9215669896/" title="snapshot_add_task_done by ompugao, on Flickr"><img src="http://farm4.staticflickr.com/3824/9215669896_47f7891590.jpg" width="500" height="358" alt="snapshot_add_task_done"></a>
32
+
33
+ tot executes EDITOR to edit text.
34
+
35
+ <a href="http://www.flickr.com/photos/98458708@N02/9212895053/" title="snapshot_add_task_editor by ompugao, on Flickr"><img src="http://farm6.staticflickr.com/5337/9212895053_034b18ae33.jpg" width="500" height="358" alt="snapshot_add_task_editor"></a>
36
+
37
+ You can see the text of a task by executing:
38
+
39
+ $ tot show
40
+
41
+ You can see the text of tasks by casting list into stdin:
42
+
43
+ <a href="http://www.flickr.com/photos/98458708@N02/9212895163/" title="snapshot_grep_show by ompugao, on Flickr"><img src="http://farm3.staticflickr.com/2876/9212895163_434c70c1d0.jpg" width="500" height="358" alt="snapshot_grep_show"></a>
44
+
45
+ When you have done your task, delete it.
46
+
47
+ $ tot delete
48
+
49
+ or
50
+
51
+ <a href="http://www.flickr.com/photos/98458708@N02/9215670040/" title="snapshot_grep_delete by ompugao, on Flickr"><img src="http://farm4.staticflickr.com/3775/9215670040_598923afbf.jpg" width="500" height="358" alt="snapshot_grep_delete"></a>
52
+
53
+ For more detail, Please see
22
54
 
23
55
  $ tot help
24
56
 
data/lib/tot/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tot
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.3.1"
3
3
  end
data/lib/tot.rb CHANGED
@@ -243,7 +243,12 @@ module Tot
243
243
  def delete
244
244
  if @stdin_tasks.empty?
245
245
  @todo_manager.print_color(true)
246
- @todo_manager.delete_at Readline.readline('Which Task?> ',false).chomp('\n').to_i
246
+ begin
247
+ @todo_manager.delete_at Integer(Readline.readline('Which Task?> ',false).chomp('\n'))
248
+ rescue
249
+ puts 'Invalid input. Please retry.'
250
+ retry
251
+ end
247
252
  @todo_manager.save
248
253
  elsif #@stdin_tasks.size >= 1
249
254
  @stdin_tasks.each do |stdin_task|
@@ -335,7 +340,12 @@ EOF
335
340
  if options['title']
336
341
  todo['title'] = Readline.readline('New Title> ').chomp('\n')
337
342
  elsif options['date']
338
- todo['date'] = Time.parse(Utils.datetime_filter(Readline.readline('date> ', true).chomp('\n')).to_s)
343
+ begin
344
+ todo['date'] = Time.parse(Utils.datetime_filter(Readline.readline('date> ', true).chomp('\n')).to_s)
345
+ rescue
346
+ puts 'Invalid input. Please retry.'
347
+ retry
348
+ end
339
349
  elsif options['tag']
340
350
  todo['tag'] = Readline.readline("tag (old_value: #{todo['tag'].join(' ')})> ", true)
341
351
  .chomp('\n').split(' ')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shohei Fujii
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-05 00:00:00.000000000 Z
11
+ date: 2013-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler