doing 1.0.18 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -3
- data/bin/doing +5 -2
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +5 -4
- 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: d675f8d0e03a45a55e9be965c7e1dd5da2e1f6329bd313327c92234ec54f4b57
|
4
|
+
data.tar.gz: 591e84462f5a8a7d38b94f3daf6482c65d262306f246ffcb9d5125a794eb25bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd522f9ba33483143c8f792d1c4e20c4952a91b968859f8b8c1350fe4b80c063f4158f4301c670164a4fa8404f4c9a94b522f025716a1a0effcab85485e83b91
|
7
|
+
data.tar.gz: 79170973a2dd8b49d31ef3f6b576ab9bc9c34f135585b8f0aac074cb527f5a3da08310d1f6d7192ced81c3747f2289b9ce1065de6bbc2b31627093f209473e5a
|
data/README.md
CHANGED
@@ -336,7 +336,9 @@ Any time you use one of the foreground colors it will reset the bold and backgro
|
|
336
336
|
done - Add a completed item with @done(date). No argument finishes last entry.
|
337
337
|
meanwhile - Finish any @meanwhile tasks and optionally create a new one
|
338
338
|
|
339
|
-
The `doing now` command can accept `-s section_name` to send the new entry straight to a non-default section. It also accepts `--back
|
339
|
+
The `doing now` command can accept `-s section_name` to send the new entry straight to a non-default section. It also accepts `--back=AMOUNT` to let you specify a start date in the past using "natural language." For example, `doing now --back=25m ENTRY` or `doing now --back="yesterday 3:30pm" ENTRY`.
|
340
|
+
|
341
|
+
If you want to use `--back` with `doing done` but want the end time to be different than the start time, you can either use `--took` in addition, or just use `--took` on its own as it will backdate the start time such that the end time is now and the duration is equal to the value of the `--took` argument.
|
340
342
|
|
341
343
|
You can finish the last unfinished task when starting a new one using `doing now` with the `-f` switch. It will look for the last task not marked `@done` and add the `@done` tag with the start time of the new task (either the current time or what you specified with `--back`).
|
342
344
|
|
@@ -488,7 +490,13 @@ __Fish:__ See the file [`doing.fish`](https://github.com/ttscoff/doing/blob/mast
|
|
488
490
|
|
489
491
|
The LaunchBar action requires that `doing` be available in `/usr/local/bin/doing`. If it's not (because you're using RVM or similar), you'll need to symlink it there. Running the action with Return will show the latest 9 items from Currently, along with any time intervals recorded, and includes a submenu of Timers for each tag.
|
490
492
|
|
491
|
-
|
493
|
+
Pressing Spacebar and typing allows you to add a new entry to currently. You an also trigger a custom show command by typing "show [section/tag]" and hitting return.
|
494
|
+
|
495
|
+
Point of interest, the LaunchBar Action makes use of the `-o json` flag for outputting JSON to the action's script for parsing.
|
496
|
+
|
497
|
+
<!--{% download 117 %}-->
|
498
|
+
|
499
|
+
Download the Action at [brettterpstra.com](https://brettterpstra.com/projects/doing/)
|
492
500
|
|
493
501
|
Evan Lovely has [created an Alfred workflow as well](http://www.evanlovely.com/blog/technology/alfred-for-terpstras-doing/).
|
494
502
|
|
@@ -528,10 +536,17 @@ Please try not to email me directly about GitHub projects.
|
|
528
536
|
|
529
537
|
### Developer notes
|
530
538
|
|
531
|
-
|
539
|
+
Feel free to [poke around](http://github.com/ttscoff/doing/), I'll try to add more comments in the future (and retroactively).
|
532
540
|
|
533
541
|
## Changelog
|
534
542
|
|
543
|
+
#### 1.0.19
|
544
|
+
|
545
|
+
- For `doing note -e` include the entry title so you know what you're adding a note to
|
546
|
+
- For any other command that allows `-e` include a comment noting that anything after the first line creates a note
|
547
|
+
- Ignore # comments when parsing editor results
|
548
|
+
|
549
|
+
|
535
550
|
#### 1.0.18
|
536
551
|
|
537
552
|
- Fix `undefined method [] for nil class` error in `doing view`
|
data/bin/doing
CHANGED
@@ -145,8 +145,11 @@ command :note do |c|
|
|
145
145
|
input = wwid.fork_editor(input)
|
146
146
|
if input
|
147
147
|
title, note = wwid.format_input(input)
|
148
|
-
note
|
149
|
-
|
148
|
+
if note
|
149
|
+
wwid.note_last(section, note, true)
|
150
|
+
else
|
151
|
+
raise "No note content"
|
152
|
+
end
|
150
153
|
else
|
151
154
|
raise "No content, cancelled"
|
152
155
|
end
|
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid.rb
CHANGED
@@ -223,10 +223,11 @@ class WWID
|
|
223
223
|
end
|
224
224
|
|
225
225
|
def fork_editor(input="")
|
226
|
-
tmpfile = Tempfile.new('doing')
|
226
|
+
tmpfile = Tempfile.new(['doing','.md'])
|
227
227
|
|
228
228
|
File.open(tmpfile.path,'w+') do |f|
|
229
229
|
f.puts input
|
230
|
+
f.puts "\n# The first line is the entry title, any lines after that are added as a note"
|
230
231
|
end
|
231
232
|
|
232
233
|
pid = Process.fork { system("$EDITOR #{tmpfile.path}") }
|
@@ -267,7 +268,7 @@ class WWID
|
|
267
268
|
note.map! { |line|
|
268
269
|
line.strip
|
269
270
|
}.delete_if { |line|
|
270
|
-
line =~ /^\s*$/
|
271
|
+
line =~ /^\s*$/ || line =~ /^#/
|
271
272
|
}
|
272
273
|
|
273
274
|
[title, note]
|
@@ -433,8 +434,8 @@ class WWID
|
|
433
434
|
section = guess_section(section)
|
434
435
|
if @content.has_key?(section)
|
435
436
|
last_item = @content[section]['items'].dup.sort_by{|item| item['date'] }.reverse[0]
|
436
|
-
|
437
|
-
return last_item['note']
|
437
|
+
$stderr.puts "Editing note for #{last_item['title']}"
|
438
|
+
return "#{last_item['title']}\n# EDIT BELOW THIS LINE ------------\n#{last_item['note'].map{|line| line.strip }.join("\n")}"
|
438
439
|
else
|
439
440
|
raise "Section #{section} not found"
|
440
441
|
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.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|