I am trying to convert these three rules into an advanced one:
Context: the first rule checks for url: identifiers I want to remove from finished fanfics, and the second two check for missing ao3/ffnet identifiers that I want to add to in-progress fanfics. If I see the icon, I then run my Cleanup: Fanfiction action chain to automagically do it.
I have this, which works (I changed a few things around):
Code:
program:
status = $#fanficstatus;
publisher = $publisher;
ids = $identifiers;
u = select(ids, 'url');
a = select(ids, 'ao3');
f = select(ids, 'ffnet');
if
u
&& '(Archive of Our Own|Fanfiction.net)' in publisher
&& '(Completed|Abandoned|Oneshot)' in status
then "metadata.png:"
elif
u
&& a
&& publisher = 'Archive of Our Own'
&& status = 'In-Progress'
then "metadata.png:"
elif
u
&& f
&& publisher = 'FanFiction.net'
&& status = 'In-Progress'
then "metadata.png:"
fi
Except that
&& a and
&& f both specify "if these identifiers exist." How do I get it to instead specify "if these identifiers do not exist"?
Also, how would I specificy "if (A or F) exist" for the first part?
I see this part but I don't really understand how to make the syntax work
Code:
or_expression ::= and_expression [ '||' and_expression ]*
and_expression ::= not_expression [ '&&' not_expression ]*
not_expression ::= [ '!' not_expression ]* | compare_exp