First, note that the test of 'u' is the same in all the condition clauses and you never subsequently use 'u', so it can be factored out.
You use 'unary not' (!) to invert a condition, in your case to return True if the variable is empty.
Given the above, I think you want:
Code:
program:
if select(ids, 'url') then
status = $#fanficstatus;
publisher = $publisher;
ids = $identifiers;
a = select(ids, 'ao3');
f = select(ids, 'ffnet');
if
(a || f)
&& '(Archive of Our Own|Fanfiction.net)' in publisher
&& '(Completed|Abandoned|Oneshot)' in status
then "metadata.png:"
elif
!a
&& publisher = 'Archive of Our Own'
&& status = 'In-Progress'
then "metadata.png:"
elif
!f
&& publisher = 'FanFiction.net'
&& status = 'In-Progress'
then "metadata.png:"
fi
fi