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.21 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.19 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.18 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.17 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.16 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.15 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.14 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.13 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.12 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.11 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.10 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.9 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.8 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.7 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.6 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.6pre lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.5pre lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.4pre lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.3 lib/doing/plugins/export/taskpaper_export.rb
doing-2.1.2pre lib/doing/plugins/export/taskpaper_export.rb