doing 1.0.61 → 1.0.62
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/doing +14 -5
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +3 -0
- 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: 9e2384e06e56e40f7f6c2b26121d16e0caa2cf40639158fc0f079f8ae26738da
|
4
|
+
data.tar.gz: 9e62f0ac38c0f19082094b88382e9779b743a4885403d796dddfb21a68ea1de2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cdb34a404ae818f10ee9facaba83fd44c584d06950fd2908b6fbb25b04e6a117a74a20836b765a2dca1cde480928398a42b5999e1678499013cbb1e88e5ccac
|
7
|
+
data.tar.gz: 5a771f4ba236518f54cd11bc99f1258b90026afe4face70db83e98f5f5ee97124eab732c7c65ccd61f1b98e18129c4034ea6c036c145e45abe298f058e25bc3e
|
data/README.md
CHANGED
@@ -29,7 +29,7 @@ _Side note:_ I actually use the library behind this utility as part of another s
|
|
29
29
|
|
30
30
|
## Installation
|
31
31
|
|
32
|
-
The current version of `doing` is <!--VER-->1.0.
|
32
|
+
The current version of `doing` is <!--VER-->1.0.61<!--END VER-->.
|
33
33
|
|
34
34
|
$ [sudo] gem install doing
|
35
35
|
|
@@ -167,7 +167,7 @@ The config also contains templates for various command outputs. Include placehol
|
|
167
167
|
- there are some random special combo colors. Use `doing colors` to see the list
|
168
168
|
- `%interval`: when used with the `-t` switch on the `show` command, it will display the time between a timestamp or _@start(date)_ tag and the _@done(date)_ tag, if it exists. Otherwise, it will remain empty.
|
169
169
|
|
170
|
-
Date formats are based on Ruby [`strftime`](http://www.ruby-doc.org/stdlib-2.1.1/libdoc/date/rdoc/Date.html#method-i-strftime) formatting.
|
170
|
+
Date formats are based on Ruby [`strftime`](http://www.ruby-doc.org/stdlib-2.1.1/libdoc/date/rdoc/Date.html#method-i-strftime) formatting. You can try it out [here](http://strftime.net).
|
171
171
|
|
172
172
|
My normal template for the `recent` command looks like this:
|
173
173
|
|
data/bin/doing
CHANGED
@@ -310,7 +310,7 @@ end
|
|
310
310
|
|
311
311
|
desc 'Add a completed item with @done(date). No argument finishes last entry.'
|
312
312
|
arg_name 'ENTRY'
|
313
|
-
command [
|
313
|
+
command %i[done did] do |c|
|
314
314
|
c.desc 'Remove @done tag'
|
315
315
|
c.switch %i[r remove], negatable: false, default_value: false
|
316
316
|
|
@@ -367,7 +367,7 @@ command [:done, :did] do |c|
|
|
367
367
|
|
368
368
|
date = options[:took] ? finish_date - took : finish_date
|
369
369
|
elsif options[:took]
|
370
|
-
finish_date = date + took
|
370
|
+
finish_date = options[:back] ? date + took : nil
|
371
371
|
elsif options[:back]
|
372
372
|
finish_date = date
|
373
373
|
else
|
@@ -375,7 +375,9 @@ command [:done, :did] do |c|
|
|
375
375
|
end
|
376
376
|
|
377
377
|
section = wwid.guess_section(options[:s]) || options[:s].cap_first
|
378
|
-
|
378
|
+
if finish_date
|
379
|
+
donedate = options[:date] ? "(#{finish_date.strftime('%F %R')})" : ''
|
380
|
+
end
|
379
381
|
|
380
382
|
if options[:e]
|
381
383
|
raise 'No EDITOR variable defined in environment' if ENV['EDITOR'].nil?
|
@@ -394,8 +396,15 @@ command [:done, :did] do |c|
|
|
394
396
|
if options[:r]
|
395
397
|
wwid.tag_last({ tags: ['done'], count: 1, section: section, remove: true })
|
396
398
|
else
|
397
|
-
|
398
|
-
|
399
|
+
options = { tags: ['done'],
|
400
|
+
archive: options[:a],
|
401
|
+
back: finish_date,
|
402
|
+
count: 1,
|
403
|
+
date: options[:date],
|
404
|
+
section: section,
|
405
|
+
took: took == 0 ? nil : took
|
406
|
+
}
|
407
|
+
wwid.tag_last(options)
|
399
408
|
end
|
400
409
|
elsif !args.empty?
|
401
410
|
title, note = wwid.format_input(args.join(' '))
|
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid.rb
CHANGED
@@ -776,6 +776,7 @@ class WWID
|
|
776
776
|
opt[:remove] ||= false
|
777
777
|
opt[:autotag] ||= false
|
778
778
|
opt[:back] ||= false
|
779
|
+
opt[:took] ||= nil
|
779
780
|
|
780
781
|
sec_arr = []
|
781
782
|
|
@@ -833,6 +834,8 @@ class WWID
|
|
833
834
|
else
|
834
835
|
done_date = item['date'] + (opt[:back] - item['date'])
|
835
836
|
end
|
837
|
+
elsif opt[:took]
|
838
|
+
done_date = item['date'] + opt[:took]
|
836
839
|
else
|
837
840
|
done_date = Time.now
|
838
841
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.62
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|