Sha256: 5ddcbda97645f55a93f37dbea152ffe2c762b239a4c4c3c154710494380b1a40

Contents?: true

Size: 1.31 KB

Versions: 31

Compression:

Stored size: 1.31 KB

Contents

# @@yesterday
desc 'List entries from yesterday'
long_desc 'Show only entries with start times within the previous 24 hour period. Use --before, --after, and --from to limit to
time spans within the day.'
command :yesterday do |c|
  c.example 'doing yesterday', desc: 'List all entries from the previous day'
  c.example 'doing yesterday --after 8am --before 5pm', desc: 'List entries from the previous day between 8am and 5pm'
  c.example 'doing yesterday --totals', desc: 'List entries from previous day, including tag timers'

  c.desc 'Specify a section'
  c.arg_name 'NAME'
  c.flag %i[s section], default_value: 'All'

  add_options(:output_template, c, default_template: 'today')
  add_options(:time_filter, c)
  add_options(:time_display, c)
  add_options(:save, c)

  c.action do |_global_options, options, _args|
    raise InvalidPlugin.new('output', options[:output]) if options[:output] && options[:output] !~ Doing::Plugins.plugin_regex(type: :export)

    options[:sort_tags] = options[:tag_sort]

    opt = options.clone
    opt[:order] = Doing.setting(['templates', options[:config_template], 'order'])
    opt[:yesterday] = true
    Doing::Pager.page @wwid.yesterday(options[:section], options[:times], options[:output], opt).chomp
    Doing.config.save_view(opt.to_view, options[:save].downcase) if options[:save]
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
doing-2.1.80 bin/commands/yesterday.rb
doing-2.1.79 bin/commands/yesterday.rb
doing-2.1.78 bin/commands/yesterday.rb
doing-2.1.77 bin/commands/yesterday.rb
doing-2.1.76 bin/commands/yesterday.rb
doing-2.1.75 bin/commands/yesterday.rb
doing-2.1.74 bin/commands/yesterday.rb
doing-2.1.73 bin/commands/yesterday.rb
doing-2.1.72 bin/commands/yesterday.rb
doing-2.1.69 bin/commands/yesterday.rb
doing-2.1.68 bin/commands/yesterday.rb
doing-2.1.66 bin/commands/yesterday.rb
doing-2.1.65 bin/commands/yesterday.rb
doing-2.1.64 bin/commands/yesterday.rb
doing-2.1.63 bin/commands/yesterday.rb
doing-2.1.62 bin/commands/yesterday.rb
doing-2.1.61 bin/commands/yesterday.rb
doing-2.1.60 bin/commands/yesterday.rb
doing-2.1.58 bin/commands/yesterday.rb
doing-2.1.57 bin/commands/yesterday.rb