View Single Post
Old 10-13-2015, 12:03 PM   #618
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,027
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Montana Harper View Post
FIRST ISSUE FIXED! (I had an errant override that was keeping it hidden.)
Progress!

Quote:
Originally Posted by Montana Harper View Post
For the second issue:
...
I can use include/exclude metadata to get rid of any extraneous stuff, so that's not a problem. I just need to know if there's a way to move individual items from one entry name to another (maybe using regex in an if/then kind of way, like replace_metadata, but more comprehensive).
Normalizing metadata from different sites is always going to be an uphill battle. But because an eFiction site(like wraithbait) generally only has so many 'tags', it's not a sisyphean task like it is on AO3.

This is how I would approach it:

Code:
[www.wraithbait.com]
## First, you may as well use the same metadata names.  
## Then you can use [defaults] to set them to cust columns.
## (ships is always defined)
add_to_extra_valid_entries:,freeformtags,ao3categories

## make sure you can see the changes on titlepage for testing:
add_to_titlepage_entries:,freeformtags,ao3categories,ships

## second, put a copy of the data you want in each:
## '.NOREPL' tells the system to *not* apply the source metadata's
## in/exclude/replace_metadata -- Only works on include_in_ lines.
## That prevents problems with recursion loops.
include_in_ships:category.NOREPL
include_in_ao3categories:category.NOREPL
include_in_freeformtags:category.NOREPL,genre.NOREPL

## then use include and exclude to limit what's in each.
## (https://github.com/JimmXinu/FanFicFare/wiki/InExcludeMetadataFeature)
## (since I had to look it up myself)
## pre vs post will only matter if you have replace_metadata lines that
## operate on ships, ao3categories or freeformtags.
include_metadata_post:
# assume ships (and only ships) have '/' in them.
 ships=~/
 ships==Other Pairings
 ships==Other Male Pairings
 ao3categories==Slash Pairings
 ao3categories==Ship Pairings
 ao3categories==Threesomes and Moresomes

exclude_metadata_post:
# presumably, exclude everything that is included in ships or ao3categories
 freeformtags=~/
 freeformtags=~Pairings
 freeformtags==Threesomes and Moresomes
This works for me, with the two examples given at least. You can add more lines or conditionals to the include/excludes to fine tune as needed.
JimmXinu is offline   Reply With Quote