View Single Post
Old 04-10-2020, 07:31 PM   #15
carmenchu
Groupie
carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.
 
Posts: 193
Karma: 266070
Join Date: Dec 2010
Location: Spain
Device: Win10,Win11,Ubuntu,PockbookLux44
Quote:
Originally Posted by Doitsu View Post
IMHO, your plugin is almost ready for an official release. I only have one minor nitpick: the plugin never reads or writes the "metas" preference setting.
Thanks: I seem to have corrected it in the new attachment.
Query: can really
Code:
prefs['metas'] = prefs['metas']
be required? Seems sappy...

Quote:
Originally Posted by Doitsu View Post

I also have a minor suggestion:

if you change:

Code:
        tags = soup.find_all(ttags, class_=re.compile("calibre"))
to:

Code:
        if ttags == ['']:
            tags = soup.find_all(class_=re.compile("calibre"))
        else:
            tags = soup.find_all(ttags, class_=re.compile("calibre"))
the user can use the following preference setting:

Code:
  "tags": ""
to tell the plugin to remove calibre classes from all tags.
I have implemented a variant of your suggestion, and (I hope!) avoided the trouble of a void "tags": "", getting the "tags" preferences obliterated on next run.
It's an option which I wouldn't recommend, save for report purposes: one can achieve the same result by a simple search & replace of class="calibre\d*" (I purposely skip class="calibre\d* other" except in report: my notion isn't to eliminate manuel searchs and edits, but only their mechanical part).
By the way, is there a simple way of getting the list of tags ordered? It would be easier to read and edit, but I can't get it done...
----

**Do people know that there is a downloadable epub version of the python manual here? The improvement of consulting on i.e., the calibre viewer, with full, searchable toc and searcheable text, cannot be told--try it!**
Attached Files
File Type: zip RedundantI_v2.zip (4.1 KB, 578 views)

Last edited by carmenchu; 04-10-2020 at 07:33 PM. Reason: mispelling
carmenchu is offline   Reply With Quote