class PROIEL::Converter::Text

Public Class Methods

print_diffable_div(div) click to toggle source
print_formatted_div(div) click to toggle source
process(tb, options) click to toggle source
# File lib/proiel/cli/converters/text.rb, line 5
def process(tb, options)
  tb.sources.each do |source|
    puts "% id = #{source.id}"
    puts "% export_time = #{source.export_time}"
    puts "% title = #{source.title}"
    puts "% author = #{source.author}"
    puts "% citation_part = #{source.citation_part}"
    puts "% language = #{source.language}"

    source.divs.each do |div|
      puts
      puts "# #{div.title}"
      puts

      if options['diffable']
        print_diffable_div(div)
      else
        print_formatted_div(div)
      end
    end
  end
end