View Single Post
Old 08-18-2013, 01:24 PM   #1607
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,025
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by davidfor View Post
That was the first thing I tried. But, the comma is replaced by a semi-colon. Actually, it half works. I hadn't looked before. The title page has the comma separated list. The semi-colon is only in the tag.
Hmm. That works for custom columns because they are set as a string. Tags are kept as list objects in python. So calibre, when it sees a ',' in a tag entry is changing it to a ';'.

So there isn't an easy way to do it.

There is, however, a complicated way. You can make two copies of category in new entries, modify those, and then replace the original category with the two new ones. It's not intuitive, but because of the order things get included and replaced it does work.
Code:
extra_valid_entries:splitcat1,splitcat2
include_in_splitcat1:category
include_in_splitcat2:category
include_in_category:splitcat1,splitcat2

replace_metadata:
 splitcat1=>Magical Girl Lyrical Nanoha=>Lyrical Nanoha
 splitcat2=>Magical Girl Lyrical Nanoha=>Magical Girl
 splitcat1=>Puella Magi Madoka Magica/魔法少女まどか★マギカ=>Puella Magi Madoka Magica
 splitcat2=>Puella Magi Madoka Magica/魔法少女まどか★マギカ=>魔法少女まどか★マギカ
JimmXinu is offline