doing 2.0.13 → 2.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/bin/doing +14 -6
- data/doing.rdoc +1 -1
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +39 -13
- 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: 9c03e8b3f5d8a08d11bf11b6303a515074a3af443fd04b5168f186f0f18b390f
|
4
|
+
data.tar.gz: 374e1564d045b98b58c287f10a9508c4ac5887cf61b0273ed18b7103a96aa179
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cc8476e9b0cfdf54b9f534c580a1681282647ddac116b8c7d3ed23bb70eae9d2cedcac2b7dc47da613e73a37cd1169f81a40ad204a8e0224e0c61bf6cf19b89
|
7
|
+
data.tar.gz: 334671030e776716fe4bb92fd311720fdc7ce17d2291c16e1eae76f2071dec907dd381978f85e144b3075d71bfb5a26f42e4d0934301a21b8c2fb580d4cb81ac
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,7 @@ _If you're one of the rare people like me who find this useful, feel free to [bu
|
|
6
6
|
|
7
7
|
<!--README-->
|
8
8
|
|
9
|
-
The current version of `doing` is <!--VER-->2.0.
|
9
|
+
The current version of `doing` is <!--VER-->2.0.14<!--END VER-->.
|
10
10
|
|
11
11
|
Find all of the documentation in the [doing wiki](https://github.com/ttscoff/doing/wiki).
|
12
12
|
|
data/bin/doing
CHANGED
@@ -1582,7 +1582,12 @@ command :show do |c|
|
|
1582
1582
|
|
1583
1583
|
options[:times] = true if options[:totals]
|
1584
1584
|
|
1585
|
-
|
1585
|
+
template = settings['templates']['default'].deep_merge({
|
1586
|
+
'wrap_width' => settings['wrap_width'] || 0,
|
1587
|
+
'date_format' => settings['default_date_format'],
|
1588
|
+
'order' => settings['order'] || 'asc',
|
1589
|
+
'tags_color' => settings['tags_color']
|
1590
|
+
})
|
1586
1591
|
|
1587
1592
|
options[:case] = options[:case].normalize_case
|
1588
1593
|
|
@@ -1603,7 +1608,7 @@ command :show do |c|
|
|
1603
1608
|
opt[:tag] = nil
|
1604
1609
|
opt[:tag_filter] = tag_filter
|
1605
1610
|
opt[:tag_order] = options[:tag_order].normalize_order
|
1606
|
-
opt[:tags_color] = tags_color
|
1611
|
+
opt[:tags_color] = template['tags_color']
|
1607
1612
|
|
1608
1613
|
Doing::Pager.page wwid.list_section(opt)
|
1609
1614
|
end
|
@@ -1674,7 +1679,8 @@ command %i[grep search] do |c|
|
|
1674
1679
|
options[:fuzzy] = false
|
1675
1680
|
raise DoingRuntimeError, %(Invalid output type "#{options[:output]}") if options[:output] && options[:output] !~ Doing::Plugins.plugin_regex(type: :export)
|
1676
1681
|
|
1677
|
-
|
1682
|
+
template = settings['templates']['default'].deep_merge(settings)
|
1683
|
+
tags_color = template.key?('tags_color') ? template['tags_color'] : nil
|
1678
1684
|
|
1679
1685
|
section = wwid.guess_section(options[:section]) if options[:section]
|
1680
1686
|
|
@@ -1740,7 +1746,9 @@ command :recent do |c|
|
|
1740
1746
|
|
1741
1747
|
options[:t] = true if options[:totals]
|
1742
1748
|
options[:sort_tags] = options[:tag_sort] =~ /^n/i
|
1743
|
-
|
1749
|
+
|
1750
|
+
template = settings['templates']['recent'].deep_merge(settings['templates']['default'])
|
1751
|
+
tags_color = template.key?('tags_color') ? template['tags_color'] : nil
|
1744
1752
|
|
1745
1753
|
opts = {
|
1746
1754
|
sort_tags: options[:sort_tags],
|
@@ -1801,8 +1809,7 @@ command :today do |c|
|
|
1801
1809
|
before: options[:before],
|
1802
1810
|
section: options[:section],
|
1803
1811
|
sort_tags: options[:sort_tags],
|
1804
|
-
totals: options[:totals]
|
1805
|
-
order: settings.dig('templates', 'today', 'order')
|
1812
|
+
totals: options[:totals]
|
1806
1813
|
}
|
1807
1814
|
Doing::Pager.page wwid.today(options[:times], options[:output], opt).chomp
|
1808
1815
|
end
|
@@ -2278,6 +2285,7 @@ command :view do |c|
|
|
2278
2285
|
|
2279
2286
|
template = view.key?('template') ? view['template'] : nil
|
2280
2287
|
date_format = view.key?('date_format') ? view['date_format'] : nil
|
2288
|
+
|
2281
2289
|
tags_color = view.key?('tags_color') ? view['tags_color'] : nil
|
2282
2290
|
tag_filter = false
|
2283
2291
|
if options[:tag]
|
data/doing.rdoc
CHANGED
@@ -5,7 +5,7 @@ record of what you've been doing, complete with tag-based time tracking. The
|
|
5
5
|
command line tool allows you to add entries, annotate with tags and notes, and
|
6
6
|
view your entries with myriad options, with a focus on a "natural" language syntax.
|
7
7
|
|
8
|
-
v2.0.
|
8
|
+
v2.0.15
|
9
9
|
|
10
10
|
=== Global Options
|
11
11
|
=== --config_file arg
|
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid.rb
CHANGED
@@ -1637,13 +1637,20 @@ module Doing
|
|
1637
1637
|
## @param opt [Hash] Additional Options
|
1638
1638
|
##
|
1639
1639
|
def list_section(opt = {})
|
1640
|
+
opt[:config_template] ||= 'default'
|
1641
|
+
cfg = @config.dig('templates', opt[:config_template]).deep_merge({
|
1642
|
+
'wrap_width' => @config['wrap_width'] || 0,
|
1643
|
+
'date_format' => @config['default_date_format'],
|
1644
|
+
'order' => @config['order'] || 'asc',
|
1645
|
+
'tags_color' => @config['tags_color']
|
1646
|
+
})
|
1640
1647
|
opt[:count] ||= 0
|
1641
1648
|
opt[:age] ||= 'newest'
|
1642
|
-
opt[:format] ||=
|
1643
|
-
opt[:order] ||=
|
1649
|
+
opt[:format] ||= cfg['date_format']
|
1650
|
+
opt[:order] ||= cfg['order'] || 'asc'
|
1644
1651
|
opt[:tag_order] ||= 'asc'
|
1645
|
-
opt[:tags_color] ||= false
|
1646
|
-
opt[:template] ||=
|
1652
|
+
opt[:tags_color] ||= cfg['tags_color'] || false
|
1653
|
+
opt[:template] ||= cfg['template']
|
1647
1654
|
|
1648
1655
|
# opt[:highlight] ||= true
|
1649
1656
|
title = ''
|
@@ -1684,7 +1691,7 @@ module Doing
|
|
1684
1691
|
|
1685
1692
|
opt[:output] ||= 'template'
|
1686
1693
|
|
1687
|
-
opt[:wrap_width] ||= @config['templates']['default']['wrap_width']
|
1694
|
+
opt[:wrap_width] ||= @config['templates']['default']['wrap_width'] || 0
|
1688
1695
|
|
1689
1696
|
output(items, title, is_single, opt)
|
1690
1697
|
end
|
@@ -1729,13 +1736,18 @@ module Doing
|
|
1729
1736
|
opt[:totals] ||= false
|
1730
1737
|
opt[:sort_tags] ||= false
|
1731
1738
|
|
1732
|
-
cfg = @config['templates']['today']
|
1739
|
+
cfg = @config['templates']['today'].deep_merge(@config['templates']['default']).deep_merge({
|
1740
|
+
'wrap_width' => @config['wrap_width'] || 0,
|
1741
|
+
'date_format' => @config['default_date_format'],
|
1742
|
+
'order' => @config['order'] || 'asc',
|
1743
|
+
'tags_color' => @config['tags_color']
|
1744
|
+
})
|
1733
1745
|
options = {
|
1734
1746
|
after: opt[:after],
|
1735
1747
|
before: opt[:before],
|
1736
1748
|
count: 0,
|
1737
1749
|
format: cfg['date_format'],
|
1738
|
-
order: 'asc',
|
1750
|
+
order: cfg['order'] || 'asc',
|
1739
1751
|
output: output,
|
1740
1752
|
section: opt[:section],
|
1741
1753
|
sort_tags: opt[:sort_tags],
|
@@ -1743,7 +1755,9 @@ module Doing
|
|
1743
1755
|
times: times,
|
1744
1756
|
today: true,
|
1745
1757
|
totals: opt[:totals],
|
1746
|
-
wrap_width: cfg['wrap_width']
|
1758
|
+
wrap_width: cfg['wrap_width'],
|
1759
|
+
tags_color: cfg['tags_color'],
|
1760
|
+
config_template: 'today'
|
1747
1761
|
}
|
1748
1762
|
list_section(options)
|
1749
1763
|
end
|
@@ -1765,7 +1779,7 @@ module Doing
|
|
1765
1779
|
dates = [dates, dates] if dates.instance_of?(String)
|
1766
1780
|
|
1767
1781
|
list_section({ section: section, count: 0, order: 'asc', date_filter: dates, times: times,
|
1768
|
-
output: output, totals: opt[:totals], sort_tags: opt[:sort_tags] })
|
1782
|
+
output: output, totals: opt[:totals], sort_tags: opt[:sort_tags], config_template: 'default' })
|
1769
1783
|
end
|
1770
1784
|
|
1771
1785
|
##
|
@@ -1795,7 +1809,8 @@ module Doing
|
|
1795
1809
|
tag_order: opt[:tag_order],
|
1796
1810
|
times: times,
|
1797
1811
|
totals: opt[:totals],
|
1798
|
-
yesterday: true
|
1812
|
+
yesterday: true,
|
1813
|
+
config_template: 'today'
|
1799
1814
|
}
|
1800
1815
|
|
1801
1816
|
list_section(options)
|
@@ -1813,14 +1828,19 @@ module Doing
|
|
1813
1828
|
opt[:totals] ||= false
|
1814
1829
|
opt[:sort_tags] ||= false
|
1815
1830
|
|
1816
|
-
cfg = @config['templates']['recent']
|
1831
|
+
cfg = @config['templates']['recent'].deep_merge(@config['templates']['default']).deep_merge({
|
1832
|
+
'wrap_width' => @config['wrap_width'] || 0,
|
1833
|
+
'date_format' => @config['default_date_format'],
|
1834
|
+
'order' => @config['order'] || 'asc',
|
1835
|
+
'tags_color' => @config['tags_color']
|
1836
|
+
})
|
1817
1837
|
section ||= @config['current_section']
|
1818
1838
|
section = guess_section(section)
|
1819
1839
|
|
1820
1840
|
list_section({ section: section, wrap_width: cfg['wrap_width'], count: count,
|
1821
1841
|
format: cfg['date_format'], template: cfg['template'],
|
1822
1842
|
order: 'asc', times: times, totals: opt[:totals],
|
1823
|
-
sort_tags: opt[:sort_tags], tags_color: opt[:tags_color] })
|
1843
|
+
sort_tags: opt[:sort_tags], tags_color: opt[:tags_color], config_template: 'recent' })
|
1824
1844
|
end
|
1825
1845
|
|
1826
1846
|
##
|
@@ -1831,7 +1851,12 @@ module Doing
|
|
1831
1851
|
##
|
1832
1852
|
def last(times: true, section: nil, options: {})
|
1833
1853
|
section = section.nil? || section =~ /all/i ? 'All' : guess_section(section)
|
1834
|
-
cfg = @config['templates']['last']
|
1854
|
+
cfg = @config['templates']['last'].deep_merge(@config['templates']['default']).deep_merge({
|
1855
|
+
'wrap_width' => @config['wrap_width'] || 0,
|
1856
|
+
'date_format' => @config['default_date_format'],
|
1857
|
+
'order' => @config['order'] || 'asc',
|
1858
|
+
'tags_color' => @config['tags_color']
|
1859
|
+
})
|
1835
1860
|
|
1836
1861
|
opts = {
|
1837
1862
|
section: section,
|
@@ -1852,6 +1877,7 @@ module Doing
|
|
1852
1877
|
opts[:search] = options[:search] if options[:search]
|
1853
1878
|
opts[:case] = options[:case]
|
1854
1879
|
opts[:not] = options[:negate]
|
1880
|
+
opts[:config_template] = 'last'
|
1855
1881
|
list_section(opts)
|
1856
1882
|
end
|
1857
1883
|
|