View Single Post
Old 10-20-2023, 03:34 AM   #13
kjdavies
Zealot
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 112
Karma: 53342
Join Date: Jun 2013
Device: Sony PRS-600
Quote:
Originally Posted by chaley View Post
Yes it is and that's why it isn't going to happen, at least by me.
Building this in is more than I want to do. It would be difficult to get "right" and cover all the corner cases.

You can do it yourself today with templates, either in bulk edit or action chains single field edit. In bulk edit you would use "template" as the source. In action chains you would use a template to compute the resulting value.
The template would fetch all the tags for a book, filter and modifiy them as desired using regexp or whatever, then return that result. Bulk edit would have the search regexp '^(.*)$', replace regexp '\1', and the destination field of tags. Action chains would be operating on tags.

A third way is to use action chains "python code" and write what you want directly against calibre's db. In this case you would fetch the tags from the db, filter and modify them as needed, then store them back into the db. This process processes tag-by-tag not book-by-book, which may or may not be what you want to do.
Right, I do have ways to do this latter, I just need to think through my order of operations.

I've added a custom column to most of my libraries, #scratch (long text, not in tag browser) specifically so I've got a place to mess it up a few times while I figure it out... I haven't added #scratchtag yet, but I'm thinking about it.

And I agree, getting this one right could be a bit fiddly. It's why I didn't submit a ticket for it.

What I really need to do is buckle down and get better at Python. It's on my List (of things to do), but it's not close enough to the top yet.
kjdavies is offline   Reply With Quote