View Single Post
Old 04-03-2023, 06:50 PM   #8287
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,069
Karma: 75568269
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Question: What order should include_in, replace_metadata, and include_metadata_pre run?

I created a custom entry and set it a placeholder to be transformed and included in seriesUrl. The replacement isn't working as expected. Would be easier than making a dozen story sections...

EDIT: Here's the code

Code:
[defaults]

# Custom metadata entries
add_to_extra_valid_entries:,collectionUrl

[archiveofourown.org]
## I also tried replacing 'seriesUrl'
 collectionUrl=>abc=>https://archiveofourown.org/collections/SpecReqs2023&&collection==Spectre Requisitions 2023

## Generates placeholder collectionUrl
include_in_collectionUrl:"abc"

## Copy collectionURL to series
include_in_seriesUrl:collectionUrl

include_metadata_pre:
## To include placeholder only when there's a collection
 collectionUrl==abc&&collections==Spectre Requisitions 2023
EDIT: It was a typo. The replace_metadata was checking 'collection' and not 'collections'

EDIT: Another issue though: the placeholder will apply for all books, ignoring the include_metadata.

Last edited by ownedbycats; 04-03-2023 at 07:08 PM.
ownedbycats is offline   Reply With Quote