Sha256: 45658b68af11037f0055aab97f46e67876aba1535a35c6f09525cee5e8f563d1

Contents?: true

Size: 824 Bytes

Versions: 103

Compression:

Stored size: 824 Bytes

Contents

# frozen_string_literal: true

# title: TaskPaper Export
# description: Export TaskPaper-friendly data
# author: Brett Terpstra
# url: https://brettterpstra.com
module Doing
  class TaskPaperExport
    include Doing::Util

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

    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

    Doing::Plugins.register 'taskpaper', :export, self
  end
end

Version data entries

103 entries across 103 versions & 1 rubygems

Version Path
doing-2.1.88 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.87 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.86 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.85 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.84 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.83 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.82 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.81 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.80 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.79 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.78 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.77 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.76 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.75 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.74 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.73 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.72 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.69 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.68 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.66 lib/doing/plugins/export/taskpaper_export.rb