Class: Doing::TaskPaperExport

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/doing/plugins/export/taskpaper_export.rb

Class Method Summary collapse

Methods included from Util

#args_for_editor, #deep_merge_hashes, #deep_merge_hashes!, #default_editor, #duplicable?, #duplicate_frozen_values, #editor_with_args, #exec_available, #find_default_editor, #first_available_exec, #mergable?, #merge_default_proc, #merge_values, #safe_load_file, #user_home, #write_to_file

Class Method Details

.render(wwid, items, variables: {}) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/doing/plugins/export/taskpaper_export.rb', line 17

def self.render(wwid, items, variables: {})
  return if items.nil?

  options = variables[:options]

  options[:highlight] = false
  options[:wrap_width] = 0
  options[:tags_color] = false
  options[:output] = 'template'
  options[:template] = '- %title @date(%date)%note'

  Doing.logger.debug('TaskPaper Export:', "#{items.count} items output to TaskPaper format")
  @out = wwid.list_section(options)
end

.settingsObject



11
12
13
14
15
# File 'lib/doing/plugins/export/taskpaper_export.rb', line 11

def self.settings
  {
    trigger: 'task(?:paper)?|tp'
  }
end