View Single Post
Old 09-20-2016, 06:54 PM   #8
Auramazda
Member
Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.
 
Posts: 16
Karma: 1422
Join Date: Mar 2016
Device: none
Quote:
Originally Posted by Toxaris View Post
What is wrong with a simple search and replace?
When you open a css and read .calibre92 you want a button that can delete every calibre in the book in one click, and yes I have already search and replace it 92 times with a very great happyness, so I hope for the next time they send me this thing I have something more faster to correct them

Quote:
Originally Posted by DiapDealer View Post
First off: you're right. Regex is not the best tool for removing tags based on attribute values. But I don't think that's what the OP was asking for (nor what Toxaris was suggesting using regex for). The OP is asking for something that removes classes (classes that are no longer being used by CSS) from attribute strings. For this purpose, regex is quite safe/sufficient (as Toxaris noted).
Yes this is my dream

Quote:
By the way: both the TagMechanic plugin for Sigil, and "Diap's Editing Toolbag" for calibre make it trivial to successfully remove the tag with the class "deleteme" (along with the matching closing tag), per your example.
I have missed this plugin, is a great tool (I will use it in the near future), but is a manually tool and I will always have to write all 92 calibre class to delete them.

I find something a little extreme with smoothRemove plugin that can resolve (delete every class and span but not i and b), with TagMechanic convert the class in italic and bold and the rest in the mincer of smoothRemove

Last edited by Auramazda; 09-20-2016 at 07:44 PM.
Auramazda is offline   Reply With Quote