Quote:
Originally Posted by ownedbycats
OK, I did some more testing of the code in #7. For some reason it behaves differently for Archive of Our Own and Fanfiction.net.
|
I am not sure of the transformation rules you want.
Here are transforms implemented by the template in #7
- Case 1: Book with metadata
- Publisher: Archive of Our Own
- Status: In-Progress
- ids: url:https://archiveofourown/works/12345
then the template does:- The first 'if' succeeds and
- adds ao3:12345 to ids
- removes url:... from ids
The identifiers are now 'ao3:12345'
- The second 'if' condition fails because In-Progress is not in status.
The result identifiers are 'ao3:12345'. This is wrong? Perhaps the first 'if' is not supposed to remove the url:... identifier?
- Case 2: If the book has the following metadata:
- Publisher: FanFiction
- Status: In-Progress
- ids: ffnet:abcde, url:https://archiveofourown/works/9876
then the template does:- The first 'if' condition fails because of wrong publisher, doing nothing
- The second 'if' condition fails because status is In-Progress, doing nothing.
The ids remain 'ffnet:abcde, url:https://archiveofourown/works/9876'. Is this right?
- Case 3: If the book has the following metadata:
- Publisher: FanFiction
- Status: Completed
- ids: ffnet:abcde, url:https://archiveofourown/works/9876
then the template does:- The first 'if' condition fails because of wrong publisher, doing nothing
- The second 'if' condition succeeds because status is Completed. The url:... id is removed.
The ids become 'ffnet:abcde'. Is this right?
You also must be careful about the order of evaluation. The second 'if' condition might succeed because the first 'if' adds the identifier 'ao3'. You may or may not always want that.