doing 1.0.20 → 1.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -6
- data/bin/doing +23 -13
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +9 -3
- data/lib/templates/doing.css +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a5b37a6be186a84231607095b3d365922e544bd0fe9b2fedb93427e6bbbd82f
|
4
|
+
data.tar.gz: 8d164c8a14642d66f46cd48e238ea43f1e765ed43c4a689c1600bfb42dd8a8cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f03dd15248dce1ada9aa541b548768234fb10ae95cecf4424e29c001e9229e19238f121d83377fc81f9543ea88bcfc90c21e816663cad05955f8c4148da8d004
|
7
|
+
data.tar.gz: caf24a8c97de4c758043e0f6c0fb9fac3bd0f10df9381a124ba89015c541bdbc24a6691c3c5181a4ad49f554d38bdde4b156bd5b8deb36617f4ff6351e341288
|
data/README.md
CHANGED
@@ -418,12 +418,12 @@ You can also add notes at the time of entry by using the `-n` or `--note` flag w
|
|
418
418
|
|
419
419
|
#### Displaying entries:
|
420
420
|
|
421
|
-
show
|
422
|
-
recent
|
423
|
-
today
|
424
|
-
yesterday
|
425
|
-
last
|
426
|
-
grep
|
421
|
+
show - List all entries
|
422
|
+
recent - List recent entries
|
423
|
+
today - List entries from today
|
424
|
+
yesterday - List entries from yesterday
|
425
|
+
last - Show the last entry
|
426
|
+
grep, search - Show entries matching text or pattern
|
427
427
|
|
428
428
|
`doing show` on its own will list all entries in the "Currently" section. Add a section name as an argument to display that section instead. Use "all" to display all entries from all sections.
|
429
429
|
|
@@ -439,6 +439,8 @@ If you have a use for it, you can use `-o csv` on the show or view commands to o
|
|
439
439
|
|
440
440
|
`doing on` allows for full date ranges and filtering. `doing on saturday`, or `doing on one month to today` will give you ranges. You can use the same terms with the `show` command by adding the `-f` or `--from` flag. `doing show @done --from "monday to friday"` will give you all of your completed items for the last week (assuming it's the weekend).
|
441
441
|
|
442
|
+
You can also show entries matching a search string with `doing grep` (synonym `doing search`). If you want to search with regular expressions or for an exact match, surround your search query with forward slashes, e.g. `doing search /project name/`. If you pass a search string without slashes, it's treated as a fuzzy search string, meaning matches can be found as long as the characters in the search string are in order and with no more than three other characters between each. By default searches are across all sections, but you can limit it to one with the `-s SECTION_NAME` flag. Searches can be displayed with the default template, or output as HTML, CSV, or JSON.
|
443
|
+
|
442
444
|
#### Views
|
443
445
|
|
444
446
|
view - Display a user-created view
|
@@ -548,6 +550,12 @@ Feel free to [poke around](http://github.com/ttscoff/doing/), I'll try to add mo
|
|
548
550
|
|
549
551
|
## Changelog
|
550
552
|
|
553
|
+
#### 1.0.21
|
554
|
+
|
555
|
+
- Add legitimate regex search capabilities
|
556
|
+
- Synonyms for grep (search) and now (next)
|
557
|
+
- CSS fix
|
558
|
+
|
551
559
|
#### 1.0.20
|
552
560
|
|
553
561
|
- Rewrite HTML export templates with responsive layout and typography
|
data/bin/doing
CHANGED
@@ -46,7 +46,7 @@ flag [:f, :doing_file]
|
|
46
46
|
|
47
47
|
desc 'Add an entry'
|
48
48
|
arg_name 'entry'
|
49
|
-
command :now do |c|
|
49
|
+
command [:now,:next] do |c|
|
50
50
|
c.desc 'Section'
|
51
51
|
c.arg_name 'section_name'
|
52
52
|
c.default_value wwid.current_section
|
@@ -114,6 +114,11 @@ command :now do |c|
|
|
114
114
|
end
|
115
115
|
|
116
116
|
desc 'Add a note to the last entry'
|
117
|
+
long_desc %{
|
118
|
+
If -r is provided with no other arguments, the last note is removed. If new content is specified through arguments or STDIN, any previous note will be replaced with the new one.
|
119
|
+
|
120
|
+
Use -e to load the last entry in a text editor where you can append a note.
|
121
|
+
}
|
117
122
|
arg_name 'note_text'
|
118
123
|
command :note do |c|
|
119
124
|
c.desc 'Section'
|
@@ -125,7 +130,6 @@ command :note do |c|
|
|
125
130
|
c.switch [:e,:editor], :negatable => false, :default_value => false
|
126
131
|
|
127
132
|
c.desc "Replace/Remove last entry's note"
|
128
|
-
c.long_desc "If -r is provided with no other arguments, the last note is removed. If new content is specified through arguments or STDIN, any previous note will be replaced with the new one."
|
129
133
|
c.switch [:r,:remove], :negatable => false, :default_value => false
|
130
134
|
|
131
135
|
c.action do |global_options,options,args|
|
@@ -226,7 +230,10 @@ command :meanwhile do |c|
|
|
226
230
|
end
|
227
231
|
end
|
228
232
|
|
229
|
-
desc 'Output HTML templates for customization
|
233
|
+
desc 'Output HTML templates for customization'
|
234
|
+
long_desc %{
|
235
|
+
Templates are printed to STDOUT for piping to a file. Save them and use them in the configuration file under html_template. Example `doing templates --type=HAML > ~/styles/my_doing.haml`
|
236
|
+
}
|
230
237
|
command :templates do |c|
|
231
238
|
c.desc "Type of template to output (HAML|CSS)"
|
232
239
|
c.arg_name 'template_type'
|
@@ -327,8 +334,7 @@ command :done do |c|
|
|
327
334
|
c.desc 'Backdate start date by interval [4pm|20m|2h|yesterday noon]'
|
328
335
|
c.flag [:b,:back]
|
329
336
|
|
330
|
-
c.desc 'Set completion date to start date plus interval (XX[mhd] or HH:MM)'
|
331
|
-
c.long_desc 'If used without the --back option, the start date will be moved back to allow the completion date to be the current time.'
|
337
|
+
c.desc 'Set completion date to start date plus interval (XX[mhd] or HH:MM). If used without the --back option, the start date will be moved back to allow the completion date to be the current time.'
|
332
338
|
c.flag [:t,:took]
|
333
339
|
|
334
340
|
c.desc 'Section'
|
@@ -424,8 +430,7 @@ command :finish do |c|
|
|
424
430
|
c.desc 'Set the completed date to the start date plus XX[hmd]'
|
425
431
|
c.flag [:t,:took]
|
426
432
|
|
427
|
-
c.desc 'Auto-generate finish dates from next entry\'s start time'
|
428
|
-
c.long_desc 'Automatically generate completion dates 1 minute before next start date. --auto overrides the --date and --back parameters.'
|
433
|
+
c.desc 'Auto-generate finish dates from next entry\'s start time. Automatically generate completion dates 1 minute before next start date. --auto overrides the --date and --back parameters.'
|
429
434
|
c.default_value false
|
430
435
|
c.switch [:auto], :negatable => false, :default_value => false
|
431
436
|
|
@@ -549,7 +554,7 @@ command :mark do |c|
|
|
549
554
|
end
|
550
555
|
|
551
556
|
desc 'List all entries'
|
552
|
-
long_desc 'The argument can be a section name, tag(s) or both. "pick" or "choose" as an argument will offer a section menu.'
|
557
|
+
long_desc 'The argument can be a section name, @tag(s) or both. "pick" or "choose" as an argument will offer a section menu.'
|
553
558
|
arg_name 'section [tags]'
|
554
559
|
command :show do |c|
|
555
560
|
c.desc 'Tag boolean (AND,OR,NONE)'
|
@@ -568,8 +573,9 @@ command :show do |c|
|
|
568
573
|
c.default_value 'asc'
|
569
574
|
c.flag [:s,:sort], :default_value => 'asc'
|
570
575
|
|
571
|
-
c.desc
|
572
|
-
|
576
|
+
c.desc %{
|
577
|
+
Date range to show, or a single day to filter date on. Date range argument should be quoted. Date specifications can be natural language. To specify a range, use "to," or "through,". Example `doing show --from "monday to friday"`
|
578
|
+
}
|
573
579
|
c.flag [:f,:from]
|
574
580
|
|
575
581
|
c.desc 'Show time intervals on @done tasks'
|
@@ -648,9 +654,9 @@ command :show do |c|
|
|
648
654
|
end
|
649
655
|
|
650
656
|
desc 'Search for entries'
|
651
|
-
long_desc 'Search all sections (or limit to a single section) for entries matching text or regular expression.'
|
657
|
+
long_desc 'Search all sections (or limit to a single section) for entries matching text or regular expression. Normal strings are fuzzy matched, delineate regex with /expression/'
|
652
658
|
arg_name 'search_pattern'
|
653
|
-
command :grep do |c|
|
659
|
+
command [:grep,:search] do |c|
|
654
660
|
c.desc 'Section'
|
655
661
|
c.default_value "all"
|
656
662
|
c.flag [:s,:section], :default_value => "All"
|
@@ -807,8 +813,12 @@ end
|
|
807
813
|
|
808
814
|
desc 'Show the last entry'
|
809
815
|
command :last do |c|
|
816
|
+
c.desc 'Specify a section'
|
817
|
+
c.default_value wwid.current_section
|
818
|
+
c.flag [:s,:section]
|
819
|
+
|
810
820
|
c.action do |global_options,options,args|
|
811
|
-
puts wwid.last.strip
|
821
|
+
puts wwid.last(true,options[:s]).strip
|
812
822
|
end
|
813
823
|
end
|
814
824
|
|
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid.rb
CHANGED
@@ -792,7 +792,11 @@ class WWID
|
|
792
792
|
if opt[:search]
|
793
793
|
items.keep_if {|item|
|
794
794
|
text = item['note'] ? item['title'] + item['note'].join(" ") : item['title']
|
795
|
-
|
795
|
+
if opt[:search].strip =~ /^\/.*?\/$/
|
796
|
+
pattern = opt[:search].sub(/\/(.*?)\//,'\1')
|
797
|
+
else
|
798
|
+
pattern = opt[:search].split('').join('.{0,3}')
|
799
|
+
end
|
796
800
|
text =~ /#{pattern}/i
|
797
801
|
}
|
798
802
|
end
|
@@ -1255,9 +1259,11 @@ EOTEMPLATE
|
|
1255
1259
|
list_section({:section => section, :wrap_width => cfg['wrap_width'], :count => count, :format => cfg['date_format'], :template => cfg['template'], :order => "asc", :times => times, :totals => opt[:totals] })
|
1256
1260
|
end
|
1257
1261
|
|
1258
|
-
def last(times=true)
|
1262
|
+
def last(times=true,section=nil)
|
1263
|
+
section ||= @current_section
|
1264
|
+
section = guess_section(section)
|
1259
1265
|
cfg = @config['templates']['last']
|
1260
|
-
list_section({:section =>
|
1266
|
+
list_section({:section => section, :wrap_width => cfg['wrap_width'], :count => 1, :format => cfg['date_format'], :template => cfg['template'], :times => times})
|
1261
1267
|
end
|
1262
1268
|
|
1263
1269
|
def tag_times(format="text")
|
data/lib/templates/doing.css
CHANGED
@@ -49,7 +49,7 @@ article > ul > li:hover {
|
|
49
49
|
|
50
50
|
.date {
|
51
51
|
color: #7d9ca2;
|
52
|
-
font-size:
|
52
|
+
font-size: 17px;
|
53
53
|
padding: 15px 1ch 0 0;
|
54
54
|
text-align: right;
|
55
55
|
white-space: nowrap;
|
@@ -71,7 +71,7 @@ article > ul > li:hover {
|
|
71
71
|
.note {
|
72
72
|
color: #aaa;
|
73
73
|
display: block;
|
74
|
-
font-size:
|
74
|
+
font-size: 17px;
|
75
75
|
line-height: 1.1;
|
76
76
|
padding: 1em 0 0 2ch;
|
77
77
|
position: relative;
|