View Single Post
Old 05-03-2022, 10:36 AM   #10
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by chaley View Post
I tried your code and with 3 changes it works for me.

The first change is in the driver. I have no collections attributes. However, the check used an 'and' where I think you want an 'or' because it required me to define some.
Whoops. I had planned to revisit that line for the first condition but realised later that I didn't need to. And forgot to test everything. Easily fixed
Quote:
The second is in books. Because of how python handles references, collections_attributes had %template% appended to it for each book. That caused the template to be executed more than once per book
That's horrible. I have hit that in other languages but not in Python. And there was another spot it was needed a couple of lines earlier.
Quote:
The third is in books. For the reasons I mentioned above, I can't use comma as the template separator (my authors are LN, FN). I changed it to what I was using, ':@:'
I really, really don't line this. And it's why I haven't replied. I don't want to do it, but, everything else is worse. The option for the delimiter is sort of tempting, but, I think it will just complicate things. And I suppose we can always change it later if needed.

I have checked the code in and created a pull request. I think I included all your changes. And then I noticed Kovid had created a new release. Is the weekend coming early?
davidfor is offline   Reply With Quote