I'm interested in automatically running the
remove_unused_css method from calibre.ebooks.oeb.polish.css as part of one of my personal plugins which is a gui CSS tweaker.
The input parameters are (container, report=None, remove_unused_classes=False).
I'm OK with 1 and 3 but I'm not sure how to use
report.
As far as I can tell, the method just returns True/False depending on whether any css rules or html classes were removed. I'd like to be able to access some detail of what changed, which I can see is being 'reported'.
I'm afraid the documented help
param report: An optional callable that takes a single argument. It is called with information about the operations being performed. doesn't enlighten me.
The fact that I don't really understand calibre's logging system may be at the heart of my problems so if there's a 'Start-here-and-all-will-be-revealed' feel free to point me at it. Understanding the logging system is probably long overdue on my part.
Thanks in advance for any helpful info