Oxprenolol, Parc des Combes, Berlin Sculpture-Network & Chekhov (inhabited locality)

This commit is contained in:
nik gaffney 2020-11-11 13:44:35 +01:00
parent b88e7aded1
commit 4014222eb1

View file

@ -94,9 +94,9 @@ File.write($cards_csv, "name,type,text,illustration\n", mode: "w")
# optional deck labels # optional deck labels
$label = options.deck_label $label = options.deck_label
# Occasions # Occasions (with text escaping...)
def write_occasion(line) def write_occasion(line)
File.write($cards_csv, "#{line},O,#{$label},img/o_card.svg\n", mode: "a") File.write($cards_csv, "\"" + %Q[#{line}] + "\"" + ",O,#{$label},img/o_card.svg\n", mode: "a")
end end
# Qualifiers # Qualifiers
@ -117,10 +117,20 @@ when "txt"
File.foreach($cards_q) { |line| write_qualifier line.chomp } File.foreach($cards_q) { |line| write_qualifier line.chomp }
File.foreach($cards_v) { |line| write_verb line.chomp } File.foreach($cards_v) { |line| write_verb line.chomp }
when "ods" when "ods"
puts "reading descriptions from ods file: " + options.input_file if options.verbose if options.verbose
ods.column(1).each { |line| write_occasion line.chomp } puts "reading descriptions from ods file: " + options.input_file
ods.column(2).each { |line| write_qualifier line.chomp } puts ods.info
ods.column(3).each { |line| write_verb line.chomp } end
# filter empty cells
ods.column(1).reject{ |n| n.nil?}.each do |line|
puts "1> " + line if options.verbose; write_occasion line.chomp
end
ods.column(2).reject{ |n| n.nil?}.each do |line|
puts "2> " + line if options.verbose; write_qualifier line.chomp
end
ods.column(3).reject{ |n| n.nil?}.each do |line|
puts "3> " + line if options.verbose; write_verb line.chomp
end
else else
puts "input format not supported." puts "input format not supported."
exit exit