View Single Post
Old 09-28-2020, 08:22 PM   #4585
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,149
Karma: 77213683
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
What would be the best way to add "Anthology" to a #fanficstatus (text, fixed values) column for anthologies?

I tried a few times to do a replace_metadata but couldn't get it to work (and sometimes it also broke my Complete => Oneshot replace).

Current personal.ini:

Spoiler:
Code:
## This is an example of what your personal configuration might look
## like.  Uncomment options by removing the '#' in front of them.

[defaults]

custom_columns_settings: 
 "N"=>#read
 oneshot=>#fanficstatus

## Some sites also require the user to confirm they are adult for
## adult content.  Uncomment by removing '#' in front of is_adult.
is_adult:true

## If set, an image (regardless of source) will only be used as a
## cover image if it is >= both the dimensions listed here.  When not
## set, any size image will be used.  Note that some sites, like ffnet
## use relatively small images(180,240).
cover_min_size: 100,100

### Anthology stuff
anthology_title_pattern:${title}
anthology_tags:

replace_metadata: 
## Prettyizes fanfiction publishers.
 site=>www.fanfiction.net=>FanFiction.net
 site=>archiveofourown.org=>Archive of Our Own
## AO3 orphan_account
 author=>^orphan_account$=>Unknown
 author=>\(orphan_account\)=>
## Category standardization and deduplication
 category=>\([0-9]+\)|\(Video Game\)|\(Video Games\)|(|- Fandom\(Movies\)|\(Movie [0-9]+\)|\(Comics\)|\(TV\))$=>
 category=>(^Mass.Effect$|^Mass Effect\s$|Mass Effect - All Media Types|Mass Effect - Various Authors|Mass Effect: Paragon Lost)=>Mass Effect Trilogy
 category=>(^(?=.*Elder Scrolls)(?!.*The Elder Scrolls).*|Elder Scrolls V: Skyrim)=>The Elder Scrolls
 category=>(Pocket Monsters \|\ Pokemon)=>Pokémon
 category=>(Pokémon - All Media Types)=>Pokémon
## Sets one-chapter fics to oneshot
 oneshot=>Completed=>Oneshot&&numChapters=>^1$
## Sets anthology fics to anthology

## Sorts anything other than a few selected categories into "Fanfiction.Other"
 tagscategory=>^(?!.*(Half-Life|Portal|Mass Effect|Crossover)).*$=>Other
## Adds Fanfiction. to the beginning of tagcategory
 tagscategory=>^(.*)$=>Fanfiction.\1
## Some more tagcategory standardization
 tagscategory=>(Portal|Half-Life)=>Half-Life & Portal
 tagscategory=>(Mass Effect: Andromeda|Mass Effect Trilogy)=>Mass Effect

add_to_replace_metadata:
## Changes breaks to paragraphs in comments for better formatting
 description=><br/>=></p><p>
## Removes images from summaries
 description=><img[^>]+>=>

include_metadata_post:
## Removes other tags if Crossover is a category
 tagscategory==Fanfiction.Crossover&&category==Crossover

exclude_metadata_post:

## Adds "Crossover" if more than one category after category replaces/includes/excludes.
add_category_when_multi_category: Crossover

# 'add_to_' concats on to existing param, thus the leading comma
add_to_extra_valid_entries:,oneshot,tagscategory,

# oneshot is a copy of status because status itself isn't a list.
include_in_oneshot:status

# tagscategory is a copy category for Fanfiction.category in tags
include_in_tagscategory:category

include_subject_tags: tagscategory

generate_cover_settings:
 ${site}=>^FanFiction.net$=>FFNet
 ${site}=>^Archive of Our Own$=>AO3

[epub]
include_tocpage: true

[archiveofourown.org]
## AO3 anti-hammer
slow_down_sleep_time:10
## Some attributes cause problems for EBook readers.  By default,
## FanFicFare will remove all attributes except the ones specified
## from all tags.  (The only exception is that <img> tags will also
## keep src, alt and longdesc attributes.)
## Example: To add 'style', 'title' and 'align' to the list to keep,
## in your personal.ini [defaults] put:
add_to_keep_html_attrs:,title,align

[https://archiveofourown.org/works/21814324]
never_make_cover:true
## This fic has non-breaking spaces which look weird in description, this removes them
add_to_replace_metadata_filelist:file:///D:/Documents/Miscellany/ReplaceNBSP.txt



Last edited by ownedbycats; 09-28-2020 at 08:25 PM.
ownedbycats is offline   Reply With Quote