|
|
|
@ -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 = " <spine toc=\"ncx\">\n"
|
|
|
|
|
}
|
|
|
|
|