From aa2ee539fa9f6387dddae5e28afaffe1f9310151 Mon Sep 17 00:00:00 2001 From: Brett Terpstra Date: Fri, 7 Feb 2020 16:06:38 -0600 Subject: [PATCH] version bump --- README.md | 38 ++++++++++++++++---------------------- bin/doing | 10 +++++++++- lib/doing/version.rb | 2 +- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index f28f877a..3db00119 100644 --- a/README.md +++ b/README.md @@ -433,36 +433,22 @@ Example: Archive all Currently items for `@client` that are marked `@done` ## Extras -### Bash completion +### Shell completion -See the file `doing.completion.bash` in the git repository for full bash completion. Thanks to [fcrespo82](https://github.com/fcrespo82) for getting it [started](https://gist.github.com/fcrespo82/9609318). +__Bash:__ See the file [`doing.completion.bash`](https://github.com/ttscoff/doing/blob/master/doing.completion.bash) in the git repository for full bash completion. Thanks to [fcrespo82](https://github.com/fcrespo82) for getting it [started](https://gist.github.com/fcrespo82/9609318). -### Zsh completion -See the file `doing.completion.zsh` in the git repository for zsh completion. +__Zsh:__ See the file [`doing.completion.zsh`](https://github.com/ttscoff/doing/blob/master/doing.completion.zsh) in the git repository for zsh completion. Courtesy of [Gabe Anzelini](https://github.com/gabeanzelini). -### Launchbar +__Fish:__ See the file [`doing.fish`](https://github.com/ttscoff/doing/blob/master/doing.fish) in the git repository for Fish completion. This is the least complete of all of the completions, but it will autocomplete the first level of subcommands, and your custom sections and views for the `doing show` and `doing view` commands. -The previous incarnation of `doing` had a [LaunchBar](http://obdev.at/launchbar/) action that I used frequently. The Day One popup has mostly replaced that for me, but only because I have a system that connects it to my WWID file. However, I've still found a place for adding WWID entries without including them in my journal, and LaunchBar is the perfect way to do that for me. +### Launchbar/Alfred -All you need is an AppleScript saved at `~/Library/Application Support/LaunchBar/Actions/Doing.scpt`. It should look like this: +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. +{% download 117 %} - on handle_string(message) - -- get the input from LaunchBar - if message is "?" then - -- if the input is just "?" display the last three entries - set _doing to do shell script "/usr/bin/doing recent 3" - tell application "LaunchBar" to display in large type _doing - else - -- otherwise, create a new entry using the input - do shell script "/usr/bin/doing now " & quoted form of message - end if - - end handle_string - - -Evan Lovely has [converted this to an Alfred workflow as well](http://www.evanlovely.com/blog/technology/alfred-for-terpstras-doing/). +Evan Lovely has [created an Alfred workflow as well](http://www.evanlovely.com/blog/technology/alfred-for-terpstras-doing/). ## Troubleshooting @@ -504,6 +490,14 @@ I'll try to document some of the code structure as I flesh it out. I'm currently ## Changelog +#### 1.0.17 + +- Add `--stdout` global option to send reporting to STDOUT instead of STDERR (for use with LaunchBar et al) + +#### 1.0.16 + +- Fixes overzealous color resetting + #### 1.0.15 - CLI/text totals block was outputting when HTML output was selected diff --git a/bin/doing b/bin/doing index bc97059b..3a659a87 100755 --- a/bin/doing +++ b/bin/doing @@ -34,6 +34,10 @@ desc 'Output notes if included in the template' default_value true switch [:notes], :default_value => true, :negatable => true +desc 'Send results report to STDOUT instead of STDERR' +default_value false +switch [:stdout], :default_value => false, :negatable => false + # desc 'Wrap notes at X chars (0 for no wrap)' # flag [:w,:wrapwidth], :must_match => /^\d+$/, :type => Integer @@ -1076,7 +1080,11 @@ end post do |global,command,options,args| # Use skips_post before a command to skip this # block on that command only - $stderr.puts wwid.results.join("\n") + if global[:stdout] + $stdout.print wwid.results.join("\n") + else + $stderr.puts wwid.results.join("\n") + end end on_error do |exception| diff --git a/lib/doing/version.rb b/lib/doing/version.rb index 9f8ec5ea..0cc3aba7 100644 --- a/lib/doing/version.rb +++ b/lib/doing/version.rb @@ -1,3 +1,3 @@ module Doing - VERSION = '1.0.16' + VERSION = '1.0.17' end