View Single Post
Old 08-26-2014, 03:35 PM   #3272
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,043
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by MiniMouse View Post
I'm trying to create something like the following: Fill my column 'pairing' with the text "slash" if the 'ships' is filled with Arthur/Merlin.
Here's an example of one way to do it:

Code:
[test1.com]
# creates a new metadata entry 'pairing'
add_to_extra_valid_entries:,pairing

# populates pairing with the same values as ships.
include_in_pairing:ships

# replace pairings with straight or slash as you prefer.
add_to_replace_metadata:
 pairing=>Jane/Thor=>straight
 pairing=>Arthur/Merlin=>slash

# only include slash or straight in pairing, discarding any 
# that weren't replaced.
add_to_include_metadata_post:
 pairing==slash
 pairing==straight

# populate custom column
add_to_custom_columns_settings:
 pairing=>#timeline
You could add that code to [defaults] to effect all sites, or to only certain sites in their sections. Adding it to site test1.com is shown.
JimmXinu is offline