todo_cli_app 0.1.0 → 0.2.0

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 +4 -4
  2. data/README.md +1 -1
  3. data/lib/parser.rb +12 -1
  4. data/lib/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95063a1e4b786e7bbf9791959c9c4b91391dc624d8f9dcaa46fcd32e1e4baaf9
4
- data.tar.gz: 626f4c7c37a78542373e72af0186535a80aaf5bf8c44f8820a5397496e5b06b0
3
+ metadata.gz: f719e4ece6562acbae21e4b49ad0ccd745cbb22d677d4c93d67235a6abe6258d
4
+ data.tar.gz: 2e8a792cc93450fe14a8114e7296d4a556562334352966b4c67000f75351caab
5
5
  SHA512:
6
- metadata.gz: a5483884fc56111c19e7783406c886b1eb40b2478969f7774781d103f8a7565df364643d03aeea8c7d134779e9a8444daf0d278c22ba2a9bc078a233e385ba4e
7
- data.tar.gz: 3410c99f7bc59e047a216d83e6c07bda2d1a2f95e5de123d0ff459bdd3aefdfb31ed32f7c3679d623c9562f0035b1945db7152f266f4af6bc955ed3b2f6a860a
6
+ metadata.gz: 0a60969051029059dcd7b5e8cc093cafd5673976ae2c29dbc331d8b31746503de3e88a4c335664beb754b06abd4e3f659c7d26520d6ade21b5291bbf84b21af0
7
+ data.tar.gz: 30b8b0d901f123de5394f3c3f8dfe4a5344eb56e242f22228dd8a5e650d56896c31a085ecaec0213dfd539e86429d9a900faf22e73b87a3213359d1f5b54a7fa
data/README.md CHANGED
@@ -6,7 +6,7 @@ Why not?
6
6
 
7
7
  # How to use
8
8
 
9
- 1. `link ./exe/todo /usr/local/bin/todo` or whatever folder that is present in $PATH
9
+ 1. `gem install todo_cli_app`
10
10
  2. `todo -h` to get started
11
11
 
12
12
  # Contribute
@@ -5,7 +5,7 @@ module ToDo
5
5
  # OptionParser wrapper for the to-do app.
6
6
  #
7
7
  class Parser
8
- Options = Struct.new(:date, :yesterday, :query, :visualize, keyword_init: true)
8
+ Options = Struct.new(:date, :yesterday, :tomorrow, :query, :visualize, keyword_init: true)
9
9
 
10
10
  attr_reader :args
11
11
 
@@ -20,12 +20,18 @@ module ToDo
20
20
  Usage:
21
21
  todo -d, --date 2020-12-25 # Open todo for the date
22
22
  todo -y, --yesterday # Open todo yesterday
23
+ todo -t, --tomorrow # Open todo for tomorrow
23
24
  todo # Open todo for today
24
25
  todo -f, --find algo # Looks for todo with word "algo"
25
26
  todo -v, --visualize # Opens an HTML file with the to-dos
26
27
 
27
28
  TXT
28
29
 
30
+ parser.on('-t', '--tomorrow', "Todo's for tomorrow") do |t|
31
+ options.tomorrow = t
32
+ options.date = Date.today + 1
33
+ end
34
+
29
35
  parser.on('-y', '--yesterday', "Todo's for yesterday") do |y|
30
36
  options.yesterday = y
31
37
  options.date = Date.today - 1
@@ -43,6 +49,11 @@ module ToDo
43
49
  options.visualize = v
44
50
  end
45
51
 
52
+ parser.on('-V', '--version', 'See the version') do |_v|
53
+ puts VERSION
54
+ exit 0
55
+ end
56
+
46
57
  parser.parse!(args)
47
58
  end
48
59
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module ToDo
4
4
  MAJOR = 0
5
- MINOR = 1
5
+ MINOR = 2
6
6
  PATCH = 0
7
7
  VERSION = [MAJOR, MINOR, PATCH].join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: todo_cli_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Manuel Ramallo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-27 00:00:00.000000000 Z
11
+ date: 2020-12-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A to-do app, the ruby cli-only edition to-do app [insert registered mark
14
14
  logo here].