This (it's still a WIP; I am still debating whether this will be better than multiple non-template rules) returns a syntax error about an unexpected end of program near "unknown." Where exactly is the mistake?
Code:
program:
vl = $#vls;
pc = $$#pagecount;
fmt = $$#formats;
lang = $$#languages
if
'Cleanup' in vl
then
# Checks for a missing format
if
fmt == ''
then
'add_book.png'
fi
# Checks for a missing pagecount
if
pc == 'None'
then
'cover_flow.png'
fi
# Checks for a missing language
if
lang == 'None'
then
'languages.png'
fi
# Checks for an ORIGINAL_EPUB in formats
if
fmt == 'ORIGINAL_EPUB'
then
'add_book.png'
fi
# Returns a generic icon if no specific issue is flagged
else
'polish.png'
fi