doing 1.0.24 → 1.0.26
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 -215
- data/bin/doing +15 -7
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +33 -7
- 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: 3631ac831d0c67d8082a02f66bf733e49bfc759091f235b87464af7ddb163eec
|
4
|
+
data.tar.gz: 9366ddb434383df32e204d409e588915d5e959f5b9c77f6411fb6781f24c6c4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 716adc40f91a6b4a637e66fc310bbb70904112a67bd1a28a744bde5f19dbeb21c5040d66e3662fc9a33d5122307fc768a5859858786077ff48b5b5f9a649d3e1
|
7
|
+
data.tar.gz: 42f564a64a07e81b29879f8364df85ae75644875cd752b2274f1481c24791baa97be354de39f1a1b521f82b2e652d6fe11294329d32ad6d314ad8e079c9c8db7
|
data/README.md
CHANGED
@@ -600,218 +600,4 @@ Feel free to [poke around](http://github.com/ttscoff/doing/), I'll try to add mo
|
|
600
600
|
|
601
601
|
## Changelog
|
602
602
|
|
603
|
-
|
604
|
-
|
605
|
-
- `doing note` operates on whatever is most recent, not just the last note in Currently
|
606
|
-
- `doing tag` with no count specified operates on most recent entry in any section, not just Currently
|
607
|
-
- `doing tag` with a count greater than 1 requires a section to be specified
|
608
|
-
- Improved results reporting for `doing tag`
|
609
|
-
- When removing tag do a whole-word match to avoid removing part of a longer tag
|
610
|
-
|
611
|
-
#### 1.0.23
|
612
|
-
|
613
|
-
- Apply default_tags after autotagging to avoid tags triggering tags
|
614
|
-
- Set `doing recent` to default to All sections instead of Currently
|
615
|
-
- Fix error in time reporting
|
616
|
-
- improved y/n prompt for TTY
|
617
|
-
|
618
|
-
#### 1.0.22
|
619
|
-
|
620
|
-
- Fix handling of "local" config files, allowing per-project configurations
|
621
|
-
- Allow cascading of local config files
|
622
|
-
- Allow `doing today` and `yesterday` to specify a section
|
623
|
-
|
624
|
-
#### 1.0.21
|
625
|
-
|
626
|
-
- Add legitimate regex search capabilities
|
627
|
-
- Synonyms for grep (search) and now (next)
|
628
|
-
- CSS fix
|
629
|
-
|
630
|
-
#### 1.0.20
|
631
|
-
|
632
|
-
- Rewrite HTML export templates with responsive layout and typography
|
633
|
-
- Ability to customize the HTML output using HAML and CSS
|
634
|
-
- New command `doing templates` to export default templates for HAML and CSS
|
635
|
-
- New config options under `html_template` for `haml` and `css`
|
636
|
-
|
637
|
-
#### 1.0.19
|
638
|
-
|
639
|
-
- For `doing note -e` include the entry title so you know what you're adding a note to
|
640
|
-
- For any other command that allows `-e` include a comment noting that anything after the first line creates a note
|
641
|
-
- Ignore # comments when parsing editor results
|
642
|
-
- Add a .md extension to the temp file passed to the editor so you can take advantage of any syntax highlighting and other features in your editor
|
643
|
-
|
644
|
-
#### 1.0.18
|
645
|
-
|
646
|
-
- Fix `undefined method [] for nil class` error in `doing view`
|
647
|
-
- Loosened up the template color resetting a bit more
|
648
|
-
|
649
|
-
#### 1.0.17
|
650
|
-
|
651
|
-
- Add `--stdout` global option to send reporting to STDOUT instead of STDERR (for use with LaunchBar et al)
|
652
|
-
|
653
|
-
#### 1.0.16
|
654
|
-
|
655
|
-
- Fixes overzealous color resetting
|
656
|
-
|
657
|
-
#### 1.0.15
|
658
|
-
|
659
|
-
- CLI/text totals block was outputting when HTML output was selected
|
660
|
-
- Have all template colors reset bold and background automatically when called
|
661
|
-
|
662
|
-
#### 1.0.14
|
663
|
-
|
664
|
-
Catching up on the changelog. Kind of. A lot has happened, mostly fixes.
|
665
|
-
|
666
|
-
- Fish completion
|
667
|
-
- views and sections subcommands have -c option to output single column
|
668
|
-
- Fix html title when tag_bool is NONE
|
669
|
-
- Fix @from tagging missing closing paren
|
670
|
-
- Fix tag coloring
|
671
|
-
|
672
|
-
#### 1.0.13
|
673
|
-
|
674
|
-
- Fix gsub error in doing meanwhile
|
675
|
-
|
676
|
-
#### 1.0.8pre
|
677
|
-
|
678
|
-
* JSON output option to view commands
|
679
|
-
* Added autotagging to tag command
|
680
|
-
* date filtering, improved date language
|
681
|
-
* added doing on command
|
682
|
-
* let view templates define output format (csv, json, html, template)
|
683
|
-
* add `%chompnote` template variable (item note with newlines and extra whitespace stripped)
|
684
|
-
|
685
|
-
#### 1.0.7pre
|
686
|
-
|
687
|
-
* fix for `-v` option
|
688
|
-
* Slightly fuzzier searching in the grep command
|
689
|
-
* cleaner exits, `only_timed` key for view configs
|
690
|
-
* making the note command append new notes better, and load existing notes in the editor if `-e` is called
|
691
|
-
* handle multiple tag input in `show` tag filter
|
692
|
-
* Global tag operations, better reporting
|
693
|
-
|
694
|
-
#### 1.0.4pre
|
695
|
-
|
696
|
-
* Improved HTML output
|
697
|
-
* `--only_timed` option for view/show commands that only outputs items with elapsed timers (interval between start and done dates)
|
698
|
-
* add seconds for timed items in CSV output, run `--only_timed` before chopping off `--count #`
|
699
|
-
* fix for 1.8.7 `Dir.home` issue
|
700
|
-
* version bump
|
701
|
-
* don't show tag totals with zero times
|
702
|
-
* zsh completion for doing
|
703
|
-
* HTML styling
|
704
|
-
* `--only_timed` option
|
705
|
-
* added zsh completion file to `README.md`
|
706
|
-
* add zsh completion file
|
707
|
-
|
708
|
-
#### 1.0.3pre
|
709
|
-
|
710
|
-
* `done` command: making `--took` modify start time if `--back` isn't specified
|
711
|
-
* Cleaned up time totals, improved HTML output
|
712
|
-
* fixes for `--back` and `--took` parsing
|
713
|
-
* Adding more complete terminal reporting to archive command
|
714
|
-
|
715
|
-
#### 1.0.0pre
|
716
|
-
|
717
|
-
* Skipped ahead in the version numbering. Because I don't care.
|
718
|
-
* Added a `note` command and `--note` flags for entry creation commands
|
719
|
-
|
720
|
-
#### 0.2.6pre
|
721
|
-
|
722
|
-
* `--totals`, `--[no-]times`, `--output [csv,html]` options for `yesterday` command.
|
723
|
-
* Add tests for Darwin to hide OS X-only features on other systems
|
724
|
-
* `-f` flag to `now` command for finishing last task when starting a new one (Looks back for the last unfinished task in the list)
|
725
|
-
* `--took` option for `done` and `finish` for specifying intervals from the start date for the completion date
|
726
|
-
* Basic command line reporting
|
727
|
-
* `--auto` flag for `finish` and `done` that will automatically set the completion time to 1 minute before the next start time in the list. You can use it retroactively to add times to sequential todos.
|
728
|
-
* `doing grep` for searching by text or regex
|
729
|
-
|
730
|
-
#### 0.2.5
|
731
|
-
|
732
|
-
* Default to showing times #26, show totals even if no tags exist #27, fix indentation #29
|
733
|
-
* Add section label to archived tasks automatically, excepting `Currently` section
|
734
|
-
* Today outputs and backdate for finish
|
735
|
-
* HTML styling and fix for 1.8.7 haml errors
|
736
|
-
* Look, HTML output! (`--output html`)
|
737
|
-
* Also, `--output csv`
|
738
|
-
* let doing `archive` function on all sections
|
739
|
-
* option to exclude date from _@done_,
|
740
|
-
* output newlines in sections and views
|
741
|
-
* Flagging (`doing mark`)
|
742
|
-
* fix for view/section guess error
|
743
|
-
* Adding tag filtering to archive command (`doing archive \@done`)
|
744
|
-
* `doing yesterday`
|
745
|
-
* `doing done -r` to remove last doing tag (optionally from `-s Section`)
|
746
|
-
* Add `-f` flag to specify alternate doing file
|
747
|
-
* `meanwhile` command
|
748
|
-
|
749
|
-
#### 0.2.1
|
750
|
-
|
751
|
-
- CSV output for show command (`--csv`)
|
752
|
-
- HTML output for show command (`--output html`)
|
753
|
-
- fuzzy searching for all commands that specify a view.
|
754
|
-
- In the terminal, you'll see "Assume you meant XXX" to show what match it found, but this is output to STDERR (and won't show up if you're redirecting the output or using it in GeekTool, etc.)
|
755
|
-
- `tags_color` in view config to highlight tags at the end of the lines. Can be set to any of the `%colors`.
|
756
|
-
- Basic time tracking.
|
757
|
-
- `-t` on `show` and `view` will turn on time calculations
|
758
|
-
- Intervals between timestamps and dated _@done_ tags are calculated for each line, if the tag exists.
|
759
|
-
- You must include a `%interval` token in the appropriate template for it to show
|
760
|
-
- _@start(date)_ tags can optionally be used to override the timestamp in the calculation
|
761
|
-
- Any other tags in the line have that line's total added to them
|
762
|
-
- Totals for tags can be displayed at the end of output with `--totals`
|
763
|
-
|
764
|
-
|
765
|
-
#### 0.2.0
|
766
|
-
|
767
|
-
- `doing done` without argument tags last entry done
|
768
|
-
- `-a` archives them
|
769
|
-
- `doing finish` or `doing finish X` marks last X entries done
|
770
|
-
- `-a` archives them
|
771
|
-
- `doing tag tag1 [tag2]` tags last entry or `-c X` entries
|
772
|
-
- `doing tag -r tag1 [tag2]` removes said tag(s)
|
773
|
-
- custom views additions
|
774
|
-
- custom views can include `tags` and `tags_bool`
|
775
|
-
- `tags` is a space-separated list of tags to filter the results by
|
776
|
-
- `tags_bool` defines `AND` (all tags must exist), `OR` (any tag exists), or `NONE` (none of the tags exist)
|
777
|
-
- `order` key (`asc` or `desc`) defines output sort order by date
|
778
|
-
- section key can be set to `All` to combine sections
|
779
|
-
- `doing show` updates
|
780
|
-
- accepts `all` as a section
|
781
|
-
- arguments following section name are tags to filter by
|
782
|
-
- `-b` sets boolean (`AND`, `OR`, `NONE`) or (`ALL`, `ANY`, `NONE`) (default `OR`/`ANY`)
|
783
|
-
- use `-c X` to limit results
|
784
|
-
- use `-s` to set sort order (`asc` or `desc`)
|
785
|
-
- use `-a` to set age (`newest` or `oldest`)
|
786
|
-
- fuzzy section guessing when specified section isn't found
|
787
|
-
- fuzzy view guessing for `doing view` command
|
788
|
-
|
789
|
-
----
|
790
|
-
|
791
|
-
#### 0.1.9
|
792
|
-
|
793
|
-
- colors in templated output
|
794
|
-
- `open` command
|
795
|
-
- opens in the default app for file type
|
796
|
-
- `-a APPNAME` (`doing open -a TaskPaper`)
|
797
|
-
- `-b bundle_id` (`doing open -b com.sublimetext.3`)
|
798
|
-
- `-e` switch for `now`, `later` and `done` commands
|
799
|
-
- save a tmp file and open it in an editor
|
800
|
-
- allows multi-line entries, anything after first line is considered a note
|
801
|
-
- assumed when no input is provided (`doing now`)
|
802
|
-
- `doing views` shows all available custom views
|
803
|
-
- `doing view` without a view name will let you choose a view from a menu
|
804
|
-
- `doing archive` fixed so that `-k X` works to keep `X` number of entries in the section
|
805
|
-
|
806
|
-
#### 0.1.7
|
807
|
-
|
808
|
-
- colors in templated output
|
809
|
-
- `open` command
|
810
|
-
- opens in the default app for file type
|
811
|
-
- `-a APPNAME` (`doing open -a TaskPaper`)
|
812
|
-
- `-b bundle_id` (`doing open -b com.sublimetext.3`)
|
813
|
-
- `-e` switch for `now`, `later`, and `done` commands
|
814
|
-
- save a tmp file and open it in an editor
|
815
|
-
- allows multi-line entries, anything after first line is considered a note
|
816
|
-
- assumed when no input is provided (`doing now`)
|
817
|
-
|
603
|
+
See [CHANGELOG.md](https://github.com/ttscoff/doing/blob/master/CHANGELOG.md)
|
data/bin/doing
CHANGED
@@ -21,7 +21,11 @@ include GLI::App
|
|
21
21
|
version Doing::VERSION
|
22
22
|
|
23
23
|
wwid = WWID.new
|
24
|
-
|
24
|
+
if Dir.respond_to?('home')
|
25
|
+
wwid.user_home = Dir.home
|
26
|
+
else
|
27
|
+
wwid.user_home = File.expand_path("~")
|
28
|
+
end
|
25
29
|
wwid.configure
|
26
30
|
|
27
31
|
|
@@ -129,7 +133,7 @@ command :note do |c|
|
|
129
133
|
c.desc "Edit entry with #{ENV['EDITOR']}"
|
130
134
|
c.switch [:e, :editor], :negatable => false, :default_value => false
|
131
135
|
|
132
|
-
c.desc "Replace/Remove last entry's note"
|
136
|
+
c.desc "Replace/Remove last entry's note (default append)"
|
133
137
|
c.switch [:r, :remove], :negatable => false, :default_value => false
|
134
138
|
|
135
139
|
c.action do |global_options,options,args|
|
@@ -314,7 +318,7 @@ end
|
|
314
318
|
|
315
319
|
desc 'Add a completed item with @done(date). No argument finishes last entry.'
|
316
320
|
arg_name 'entry'
|
317
|
-
command :done do |c|
|
321
|
+
command [:done,:did] do |c|
|
318
322
|
c.desc 'Remove @done tag'
|
319
323
|
c.default_value false
|
320
324
|
c.switch [:r, :remove], :negatable => false, :default_value => false
|
@@ -327,9 +331,8 @@ command :done do |c|
|
|
327
331
|
c.default_value false
|
328
332
|
c.switch [:a, :archive], :negatable => false, :default_value => false
|
329
333
|
|
330
|
-
|
331
|
-
|
332
|
-
# c.flag [:at]
|
334
|
+
c.desc 'Set finish date to specific date/time (natural langauge parsed, e.g. --at=1:30pm). If used, ignores --back. Used with --took, backdates start date'
|
335
|
+
c.flag [:at]
|
333
336
|
|
334
337
|
c.desc 'Backdate start date by interval [4pm|20m|2h|yesterday noon]'
|
335
338
|
c.flag [:b, :back]
|
@@ -352,6 +355,7 @@ command :done do |c|
|
|
352
355
|
c.action do |global_options,options,args|
|
353
356
|
took = 0
|
354
357
|
|
358
|
+
|
355
359
|
if options[:took]
|
356
360
|
took = wwid.chronify_qty(options[:took])
|
357
361
|
raise "Unable to parse date string for --took" if took.nil?
|
@@ -364,7 +368,11 @@ command :done do |c|
|
|
364
368
|
date = options[:took] ? Time.now - took : Time.now
|
365
369
|
end
|
366
370
|
|
367
|
-
if options[:
|
371
|
+
if options[:at]
|
372
|
+
finish_date = wwid.chronify(options[:at])
|
373
|
+
raise "Unable to parse date string for --at" if finish_date.nil?
|
374
|
+
date = options[:took] ? finish_date - took : finish_date
|
375
|
+
elsif options[:took]
|
368
376
|
finish_date = date + took
|
369
377
|
elsif options[:back]
|
370
378
|
finish_date = date
|
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid.rb
CHANGED
@@ -131,6 +131,12 @@ class WWID
|
|
131
131
|
|
132
132
|
@config[:include_notes] ||= true
|
133
133
|
|
134
|
+
# if ENV['DOING_DEBUG'].to_i == 3
|
135
|
+
# if @config['default_tags'].length > 0
|
136
|
+
# raise "DEFAULT CONFIG CHANGED"
|
137
|
+
# end
|
138
|
+
# end
|
139
|
+
|
134
140
|
File.open(@config_file, 'w') { |yf| YAML::dump(@config, yf) } unless @config == user_config
|
135
141
|
|
136
142
|
@config = @local_config.deep_merge(@config)
|
@@ -393,7 +399,7 @@ class WWID
|
|
393
399
|
if qty.strip =~ /^(\d+):(\d\d)$/
|
394
400
|
minutes += $1.to_i * 60
|
395
401
|
minutes += $2.to_i
|
396
|
-
elsif qty.strip =~ /^(\d+)([hmd])?$/
|
402
|
+
elsif qty.strip =~ /^(\d+(?:\.\d+)?)([hmd])?$/
|
397
403
|
amt = $1
|
398
404
|
type = $2.nil? ? "m" : $2
|
399
405
|
|
@@ -615,7 +621,11 @@ class WWID
|
|
615
621
|
if @content.has_key?(section)
|
616
622
|
last_item = @content[section]['items'].dup.sort_by{|item| item['date'] }.reverse[0]
|
617
623
|
$stderr.puts "Editing note for #{last_item['title']}"
|
618
|
-
|
624
|
+
note = ''
|
625
|
+
unless last_item['note'].nil?
|
626
|
+
note = last_item['note'].map{|line| line.strip }.join("\n")
|
627
|
+
end
|
628
|
+
return "#{last_item['title']}\n# EDIT BELOW THIS LINE ------------\n#{note}"
|
619
629
|
else
|
620
630
|
raise "Section #{section} not found"
|
621
631
|
end
|
@@ -707,7 +717,13 @@ class WWID
|
|
707
717
|
}
|
708
718
|
item['title'] = title
|
709
719
|
else
|
710
|
-
|
720
|
+
new_title = autotag(item['title'])
|
721
|
+
unless new_title == item['title']
|
722
|
+
@results.push("Tags updated: #{new_title}")
|
723
|
+
item['title'] = new_title
|
724
|
+
else
|
725
|
+
@results.push(%Q{Autotag: No changes})
|
726
|
+
end
|
711
727
|
end
|
712
728
|
|
713
729
|
index += 1
|
@@ -772,7 +788,7 @@ class WWID
|
|
772
788
|
elsif current_note.length > 0 && note.length > 0
|
773
789
|
@results.push(%Q{Replaced note from "#{title}"})
|
774
790
|
elsif note.length > 0
|
775
|
-
@results.push(%Q{Added note to #{title}})
|
791
|
+
@results.push(%Q{Added note to "#{title}"})
|
776
792
|
else
|
777
793
|
@results.push(%Q{Entry "#{title}" has no note})
|
778
794
|
end
|
@@ -898,7 +914,7 @@ class WWID
|
|
898
914
|
sections.each_with_index {|section, i|
|
899
915
|
puts "% 3d: %s" % [i+1, section]
|
900
916
|
}
|
901
|
-
print "> "
|
917
|
+
print "#{colors['green']}> #{colors['default']}"
|
902
918
|
num = STDIN.gets
|
903
919
|
return false if num =~ /^[a-z ]*$/i
|
904
920
|
return sections[num.to_i - 1]
|
@@ -1637,9 +1653,12 @@ EOS
|
|
1637
1653
|
#
|
1638
1654
|
def autotag(text)
|
1639
1655
|
return unless text
|
1656
|
+
current_tags = text.scan(/@\w+/)
|
1657
|
+
whitelisted = []
|
1640
1658
|
@config['autotag']['whitelist'].each {|tag|
|
1641
1659
|
text.sub!(/(?<!@)(#{tag.strip})\b/i) do |m|
|
1642
1660
|
m.downcase! if tag =~ /[a-z]/
|
1661
|
+
whitelisted.push("@#{m}")
|
1643
1662
|
"@#{m}"
|
1644
1663
|
end unless text =~ /@#{tag}\b/i
|
1645
1664
|
}
|
@@ -1647,12 +1666,19 @@ EOS
|
|
1647
1666
|
@config['autotag']['synonyms'].each {|tag, v|
|
1648
1667
|
v.each {|word|
|
1649
1668
|
if text =~ /\b#{word}\b/i
|
1650
|
-
|
1669
|
+
unless current_tags.include?("@#{tag}") || whitelisted.include?("@#{tag}")
|
1670
|
+
tail_tags.push(tag)
|
1671
|
+
end
|
1651
1672
|
end
|
1652
1673
|
}
|
1653
1674
|
}
|
1675
|
+
if whitelisted.length > 0
|
1676
|
+
@results.push("Whitelisted tags: #{whitelisted.join(', ')}")
|
1677
|
+
end
|
1654
1678
|
if tail_tags.length > 0
|
1655
|
-
|
1679
|
+
tags = tail_tags.uniq.map {|t| '@'+t }.join(' ')
|
1680
|
+
@results.push("Synonym tags: #{tags}")
|
1681
|
+
text + ' ' + tags
|
1656
1682
|
else
|
1657
1683
|
text
|
1658
1684
|
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.26
|
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-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|