Quote:
Originally Posted by Rellwood
I'll DM you, I need to organize the list..THANK YOU! 
|
Thanks for the list. Unfortunately I can't do what you want to do without coding the rules by hand, which I can't do in the template language. The reason: there are no "rules" that I can see to map booksource to the composite column. In other words, the process requires what is your head, not what is in the data. Example: how can the program know that "Amazon" goes into a different hierarchy than "Kobo"? You know, but calibre doesn't.
More work for you but doable:
- You make a column "Text, shown in the tag browser" where the values are all the prefixes. A quick count indicates you have some 15 of these. Why not "Fixed set of values"? That type would work well if you are sure about the prefix values. It is harder to change your mind because there isn't any operation to rename one of the values in both the booklist and the field definition. (Yes, there probably should be.
)
- For each book, set the new column to the correct prefix. Given that you know that mapping from item to prefix you can do this in bulk medatadata edit. Search for books with the value then use bulk edit to set the prefix value. As there are approx 50 different sources, you would need to do 50 search/edit operations.
- Make a composite column that combines the prefix column and the source column. The template would be something like
Code:
program:
source = field('booksource');
prefix = test(source, field('#prefix'), '');
test(prefix,
strcat(prefix, '.', field('#booksource')),
'1 - Calibre.Missing Original Source'
)
It says that if either the prefix or the source is empty then the answer is '1- cal...', otherwise the answer is prefix.source.
- From then on, for each new book set the source and the prefix.