Be able to specify sheet names that are read for card data in each Cardfile
This commit is contained in:
parent
0c8a377b5f
commit
e366b0c1b2
@ -24,9 +24,9 @@ module SVGGVS
|
||||
settings
|
||||
end
|
||||
|
||||
def each_card
|
||||
def each_card(card_sheet_identifier)
|
||||
doc.each_with_pagename do |name, sheet|
|
||||
if name['Card Data']
|
||||
if name[card_sheet_identifier]
|
||||
headers = sheet.row(1)
|
||||
|
||||
(sheet.first_row + 1).upto(sheet.last_row) do |index|
|
||||
|
@ -3,9 +3,11 @@ module SVGGVS
|
||||
attr_accessor :svg_source, :svg_merged_target, :individual_files_path, :on_card_finished
|
||||
attr_accessor :png_files_path, :png_export_width, :pdf_card_size, :pdf_dpi
|
||||
attr_accessor :pdf_target, :card_back, :card_size, :target, :post_read_data
|
||||
attr_accessor :card_sheet_identifier
|
||||
|
||||
def initialize
|
||||
@index = 0
|
||||
@card_sheet_identifier = "Card Data"
|
||||
end
|
||||
|
||||
def configure
|
||||
@ -58,7 +60,7 @@ module SVGGVS
|
||||
settings_from_hash(data_source.settings)
|
||||
|
||||
@process = proc do
|
||||
data_source.each_card do |card|
|
||||
data_source.each_card(card_sheet_identifier) do |card|
|
||||
if !!@post_read_data
|
||||
@post_read_data.call(card)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user