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
$label = options.deck_label
# Occasions
# Occasions (with text escaping...)
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
# Qualifiers
@ -117,10 +117,20 @@ when "txt"
File.foreach($cards_q) { |line| write_qualifier line.chomp }
File.foreach($cards_v) { |line| write_verb line.chomp }
when "ods"
puts "reading descriptions from ods file: " + options.input_file if options.verbose
ods.column(1).each { |line| write_occasion line.chomp }
ods.column(2).each { |line| write_qualifier line.chomp }
ods.column(3).each { |line| write_verb line.chomp }
if options.verbose
puts "reading descriptions from ods file: " + options.input_file
puts ods.info
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
puts "input format not supported."
exit