#Use Keynote's image export function, making sure to specify that
#all build steps should be included.
#Then place all images in a folder, and use "ls -1 *.png > imagelist"
#to create a file with the list of image names.
#Finally, copy this script into the directory and run
#'gawk -f keynote2html.awk -v title="Title of Talk" imagelist'
(1) {
page[NR] = $1;
}
END {
for ( i=1; i<=NR; i++ ) {
stem = page[i];
sub( ".png", "", stem );
if ( i==1 ) { outfile = "index.html"; }
else {outfile = stem ".html"; }
#header
print "
" title "" >> outfile;
print "> outfile;
print "link=\"#FFFFFF\" vlink=\"#0033AA\">" >> outfile;
#Top row of navigation links
print "" >> outfile;
print "| Top | " >> outfile;
if ( i>1 ) {
sprev = page[i-1];
sub( ".png", "", sprev );
print "Previous | " >> outfile;
} else { print "Previous | " >> outfile; }
if ( iNext" >> outfile;
} else { print "Next | " >> outfile; }
print "
" >> outfile;
#Show Image
print "
" >> outfile;
#Bottom row of navigation links
print "" >> outfile;
print "| Top | " >> outfile;
if ( i>1 ) {
sprev = page[i-1];
sub( ".png", "", sprev );
print "Previous | " >> outfile;
} else { print "Previous | " >> outfile; }
if ( iNext" >> outfile;
} else { print "Next | " >> outfile; }
#Footer
print "" >> outfile;
}
}