Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 10-08-2020, 05:17 PM   #1
un_pogaz
Chalut o/
un_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watch
 
un_pogaz's Avatar
 
Posts: 156
Karma: 10500
Join Date: Dec 2017
Device: Kobo
[GUI Plugin] Comments Cleaner

Comments Cleaner is a small plugin that clean comments from superfluous and unwanted CSS rules (background-color, text color, font-family, among other things), but keeps the basic elements (italic, bold).
The plugin will also try to convert plain-text comments.

The plugin has the following options:
  • Keep or remove Hyperlinks
  • Weights management
    • Round the value to the hundred
    • Rounded to Bold
  • Remove Strikethrough, Underline and Italic
  • Headings management
    • Converte to a paragraph
    • Converte to a paragraph but keep the bold
  • Text alignment
    • Automatic justification
    • Force justification
    • Remove alignment
  • Specific alignment for lists
  • Keep or Delete the ID and CLASS attributs
  • Remove all formatting (NO MERCY!!)
  • Try a conversion from Mardown format (the key word is TRY)
  • Remove Multiple Line Return <br> and create a new paragraph instead
  • Convert 'Line Return' into paragraph
  • Management of empty paragraphs
  • Ability to specify others CSS rules to keep in addition to the basic CSS rule
Basic CSS rules keep by default:
Spoiler:
text-align
font-weight
font-style
text-decoration


Installation
Open Preferences -> Plugins -> Get new plugins and install the "Comments Cleaner" plugin.
You may also download the attached zip file and install the plugin manually, then restart calibre as described in the Introduction to plugins thread

The plugin works for Calibre 2 and later.
It is therefore compatible for QtWebKit (Calibre <4) and QtWebEngine (Calibre >=4), as well as Python2 (Calibre <5) and Python3 (Calibre >=5).

Version History:
Spoiler:

version 1.3.1
Reduce the height of the configuration window

version 1.3
Improvements of mass edit:
- Add a progres bar window and possibility to cancel the current operation
- (internal) Don't update the unchanged comments in the Database

Add new options for the cleaning:
- Round the Weights value instead of truncated
- Remove Strikethrough, Underline and Italic
- Try a conversion from Mardown format (the key word is TRY)
- Management of empty paragraphs
- Convert 'Line Return' into paragraph
- Specific alignment for lists
- Remove all formatting (NO MERCY!!)

and a lot of improvements for the cleaning (internal, too many)

version 1.2.2
Fix a rare issue with LibraryDatabase()

version 1.2.1
Fix a error when loading the Spanish translation

version 1.2.0
Support translation
Spanish translation by dunhill

version 1.1.0
- Add a option for Multiple Line Return.
- Add a option for the Headings.
- Add a option for the ID and CLASS attributs.

version 1.0.0
Strategy change: All CSS rules are removed. Only a handful basic rules as keep.
- Added a option to specify additional CSS rules to keep.
- Saving parameters in a JSON (common to all libraries). Your settings will be reset!
- Added an option to remove Multiple Line Return <br> and create a new paragraph instead.

version 0.3.1
[Fix] Transforms non-html (full text) comments to HTML

version 0.3
Add option for the Weight

version 0.2.1
Add "Delete all align" in the justification option

version 0.2
First release

GitHub

Note for those who wish to provide a translation:
I am French! Although for obvious reasons, the default language of the plugin is English, keep in mind that already a translation.
Attached Thumbnails
Click image for larger version

Name:	exempl13.gif
Views:	33
Size:	16.7 KB
ID:	183363   Click image for larger version

Name:	2020-11-15 (1.3).png
Views:	29
Size:	37.8 KB
ID:	183414  
Attached Files
File Type: zip Comments-Cleaner-1.3.1.zip (93.9 KB, 367 views)

Last edited by un_pogaz; 11-26-2020 at 03:46 PM.
un_pogaz is offline   Reply With Quote
Old 10-08-2020, 07:23 PM   #2
un_pogaz
Chalut o/
un_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watch
 
un_pogaz's Avatar
 
Posts: 156
Karma: 10500
Join Date: Dec 2017
Device: Kobo
reserverd for futur usage
un_pogaz is offline   Reply With Quote
Old 10-09-2020, 12:20 PM   #3
un_pogaz
Chalut o/
un_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watch
 
un_pogaz's Avatar
 
Posts: 156
Karma: 10500
Join Date: Dec 2017
Device: Kobo
Update to the 0.3.1

version 0.3
Add option for the Weight

version 0.3.1
[Fix] Transforms non-html (full text) comments to HTML

Last edited by BetterRed; 10-09-2020 at 06:54 PM.
un_pogaz is offline   Reply With Quote
Old 10-09-2020, 06:54 PM   #4
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 16,731
Karma: 19705250
Join Date: Mar 2012
Location: Sydney Australia
Device: none
↑ ↑ ↑

Moderator Notice

I removed the link, most users will get new versions via calibre itself, or if they want to download they can go to first post.

BR
BetterRed is offline   Reply With Quote
Old 10-11-2020, 03:16 PM   #5
un_pogaz
Chalut o/
un_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watch
 
un_pogaz's Avatar
 
Posts: 156
Karma: 10500
Join Date: Dec 2017
Device: Kobo
New version: 1.0.0
Strategy change: All CSS rules are removed. Only a handful basic rules as keep.
- Added a option to specify additional CSS rules to keep.
- Saving parameters in a JSON (common to all libraries). Your settings will be reset!
- Added an option to remove Multiple Line Return <br> and create a new paragraph instead.
un_pogaz is offline   Reply With Quote
Old 10-12-2020, 12:57 PM   #6
un_pogaz
Chalut o/
un_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watch
 
un_pogaz's Avatar
 
Posts: 156
Karma: 10500
Join Date: Dec 2017
Device: Kobo
version 1.1.0
- Add a option for Multiple Line Return.
- Add a option for the Headings.
- Add a option for the ID and CLASS attributs.

version 1.2.0
Support translation
Spanish translation by dunhill
un_pogaz is offline   Reply With Quote
Old 10-13-2020, 06:56 PM   #7
Cimaco
Junior Member
Cimaco began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2020
Device: none
Exclamation Al tratar de instalar el complemento en Calibre 5.2 Sale este mensaje

Favor su ayuda!
Attached Thumbnails
Click image for larger version

Name:	ERROR-Excepcion no considerada.png
Views:	50
Size:	24.5 KB
ID:	182701  
Cimaco is offline   Reply With Quote
Old 10-13-2020, 08:41 PM   #8
dunhill
Addict
dunhill doesn't litterdunhill doesn't litterdunhill doesn't litter
 
dunhill's Avatar
 
Posts: 252
Karma: 242
Join Date: Sep 2017
Device: moon+ reader, kindle paperwhite
Quote:
Originally Posted by Cimaco View Post
Favor su ayuda!
Try downloading this version to see if it works and comment. I have sent new translation files to un_pogaz because it was translating different versions of the plugin.
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	49
Size:	73.5 KB
ID:	182703  
Attached Files
File Type: zip Comments Cleaner 1.2.0 (con nueva traducción).zip (83.7 KB, 76 views)

Last edited by dunhill; 10-13-2020 at 08:52 PM.
dunhill is offline   Reply With Quote
Old 10-14-2020, 09:06 AM   #9
un_pogaz
Chalut o/
un_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watch
 
un_pogaz's Avatar
 
Posts: 156
Karma: 10500
Join Date: Dec 2017
Device: Kobo
version 1.2.1
Fix a error when loading the Spanish translation

Sorry for the inconvenience.
Sin of trust, I would check the compatibility of the translations next time.

Last edited by un_pogaz; 10-14-2020 at 12:32 PM.
un_pogaz is offline   Reply With Quote
Old 10-14-2020, 08:23 PM   #10
Cimaco
Junior Member
Cimaco began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2020
Device: none
Thumbs up Muchas Gracias, Se instalo el complemento.

El complemento se instalo en Calibre 5.2.

Gracias.
Cimaco is offline   Reply With Quote
Old 11-16-2020, 03:56 AM   #11
un_pogaz
Chalut o/
un_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watch
 
un_pogaz's Avatar
 
Posts: 156
Karma: 10500
Join Date: Dec 2017
Device: Kobo
New version 1.3
Improvements of mass edit:
- Add a progres bar window and possibility to cancel the current operation
- (internal) Don't update the unchanged comments in the Database

Add new options for the cleaning:
- Round the Weights value instead of truncated
- Remove Strikethrough, Underline and Italic
- Try a conversion from Mardown format (the key word is TRY)
- Management of empty paragraphs
- Convert 'Line Return' into paragraph
- Specific alignment for lists
- Remove all formatting (NO MERCY!!)

and a lot of improvements for the cleaning (internal, too many)
un_pogaz is offline   Reply With Quote
Old 11-17-2020, 07:41 PM   #12
dunhill
Addict
dunhill doesn't litterdunhill doesn't litterdunhill doesn't litter
 
dunhill's Avatar
 
Posts: 252
Karma: 242
Join Date: Sep 2017
Device: moon+ reader, kindle paperwhite
Every update better !!!
What I see a little big on the screen, can be resized in width but not in height
Attached Thumbnails
Click image for larger version

Name:	2.png
Views:	37
Size:	183.8 KB
ID:	183456  
dunhill is offline   Reply With Quote
Old 11-18-2020, 12:12 PM   #13
un_pogaz
Chalut o/
un_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watch
 
un_pogaz's Avatar
 
Posts: 156
Karma: 10500
Join Date: Dec 2017
Device: Kobo
Thanks ... and sorry

Personally, I have a 1080p and is nice. But smaller... is true that it becomes limit. I'm watching to see what I can do.

Edit: This configuration is readable and small enough?
Attached Thumbnails
Click image for larger version

Name:	newcon10[1].png
Views:	25
Size:	35.6 KB
ID:	183464  

Last edited by un_pogaz; 11-18-2020 at 01:15 PM.
un_pogaz is offline   Reply With Quote
Old 11-24-2020, 05:14 PM   #14
ownedbycats
Wizard
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
Posts: 1,182
Karma: 345192
Join Date: Oct 2018
Device: Kobo Aura HD
Question: How exactly do I get Markdown > Convert only from plain text comment to activate? Even if I paste a plain text into the HTML source, saving the metadata autoinserts div and paragraph tags.

Also, a suggestion: An option to convert double-dashes (--) into a proper em-dash (—). Would be nice to not have to use the alt code every time if I'm converting to markdown anyways. Thank you.

Last edited by ownedbycats; 11-24-2020 at 05:20 PM.
ownedbycats is offline   Reply With Quote
Old 11-25-2020, 07:02 AM   #15
un_pogaz
Chalut o/
un_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watchun_pogaz is clearly one to watch
 
un_pogaz's Avatar
 
Posts: 156
Karma: 10500
Join Date: Dec 2017
Device: Kobo
Calibre's comment editor will always convert your text to HTML format. It is not possible to save a Markdown format through the GUI.
The "Markdown only from plain text" function is there only for some very rare cases when the text is incorrectly saved inside the metadata.db database file (hence the existence "always convert" for the others case).

For your suggestion to convert the double-dashes (--) into a proper em-dash (—), I am obliged to refuse :
The philosophy of Comments Cleaner is to never modify the text, only the CSS formatting.
For all text editing, I advise you to use the "Search and Replace" option in the mass meta-data editor. It is possible to save an operation.


Nevertheless, you are the second person to make me a similar suggestion (edit the text), and that gives me an idea:
Make a similar plugin that will run a list of "Search and Replace" operations (based on the saved config in the mass meta-data editor)
un_pogaz is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin]Clean Comments Terisa de morgan Plugins 4 10-02-2020 05:07 AM
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 9 04-11-2020 08:14 AM
[GUI Plugin] Manga plugin mastertea Plugins 0 10-20-2019 03:45 PM
[Conversion Plugin] Language Cleaner (profanity filter) jdanders Plugins 5 09-04-2019 01:16 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM


All times are GMT -4. The time now is 01:36 AM.


MobileRead.com is a privately owned, operated and funded community.