View Single Post
Old 11-18-2015, 01:55 PM   #748
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,028
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by edeniz View Post
But just in case the author did not list the characters in question in the field "characters", I'd like to basically put the separated character names into the character name field. Is that possible? And if so, how do I avoid duplication? Can't seem to find out the method for it.
This seems to work for me. Note that if you also use sort_ships you'll need to update to the new test version first.

Code:
add_to_extra_valid_entries:,ships2chars
include_in_ships2chars:ships.NOREPL

add_to_replace_metadata:
 ships2chars=>[ ]*/[ ]*=>/
 ships2chars=>[ ]*&[ ]*=>/
 ships2chars=>([^/]+)/([^/]+)/([^/]+)/(.+)=>\1\,\2\,\3\,\4
 ships2chars=>([^/]+)/([^/]+)/(.+)=>\1\,\2\,\3
 ships2chars=>([^/]+)/(.+)=>\1\,\2

include_in_characters:characters,ships2chars
New test version posted (direct link)

- Make sort_ships honor doreplacements (and .NOREPL) flag.
JimmXinu is offline   Reply With Quote