diff --git a/g2e.awk b/g2e.awk index f3092d8..292f2c4 100644 --- a/g2e.awk +++ b/g2e.awk @@ -13,6 +13,8 @@ BEGIN{ "date -u +%FT%TZ" | getline meta["date"] + content_header_template = "content-header.opf" + # read metadata file fields while( getline < metadatafile ){ key = $1; sub(":","",key) @@ -23,6 +25,10 @@ BEGIN{ sub(/^.+\//,"",value) # get basename } + if(key=="translator"){ + content_header_template = "content-header-translator.opf" + } + meta[key] = value # set index file as an argument to be read @@ -59,7 +65,7 @@ BEGIN{ } # start writing metadata files - content = write_template("content-header.opf", meta ) + content = write_template(content_header_template, meta ) toc = write_template( "toc-header.ncx", meta ) spinetoc = " \n" } diff --git a/templates/content-header.opf b/templates/content-header.opf index a0b80a1..b9fe72e 100644 --- a/templates/content-header.opf +++ b/templates/content-header.opf @@ -8,7 +8,6 @@ {author} {description} {publishDate} - {translator} {date}