todo_cli_app 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/parser.rb +12 -1
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f719e4ece6562acbae21e4b49ad0ccd745cbb22d677d4c93d67235a6abe6258d
|
4
|
+
data.tar.gz: 2e8a792cc93450fe14a8114e7296d4a556562334352966b4c67000f75351caab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a60969051029059dcd7b5e8cc093cafd5673976ae2c29dbc331d8b31746503de3e88a4c335664beb754b06abd4e3f659c7d26520d6ade21b5291bbf84b21af0
|
7
|
+
data.tar.gz: 30b8b0d901f123de5394f3c3f8dfe4a5344eb56e242f22228dd8a5e650d56896c31a085ecaec0213dfd539e86429d9a900faf22e73b87a3213359d1f5b54a7fa
|
data/README.md
CHANGED
data/lib/parser.rb
CHANGED
@@ -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
|
|
data/lib/version.rb
CHANGED
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.
|
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-
|
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].
|