Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-08-2020, 04:17 PM   #1
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
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 (only below Calibre 6)
    • Round 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 or Space
  • Management of empty paragraphs
  • Removing images
  • Ability to specify others CSS rules to keep in addition to the basic CSS rule
  • Possibility to apply the cleaning to others custom HTML columns
  • Support of Category Notes
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 5 and later.

Page: GitHub | MobileRead

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.

Version History:
Spoiler:
version 1.13.0 - 2024/02/19
Added
  • Support drag-and-drop books from the library
Bug fixes
  • Fix some untranslated string

version 1.12.2 - 2024/02/10
Bug fixes
  • Fix some wrong bold cleaning

version 1.12.1 - 2024/01/27
Bug fixes
  • Fix wrong text display when customizing keyboard shortcut

version 1.12.0 - 2023/11/17
Added
  • Support for Category Notes
  • Option for the images
Changed
  • Drop Python 2 / Calibre 4 compatibility, only Calibre 5 and above
Bug fixes
  • Tags with CAPS name don't propely parsed

version 0.11.1 - 2023/09/31
Bug fixes
  • Don't update the config file when Calibre start

version 1.11.0 - 2023/09/08
Changed
  • Fix double ScrollArea in config dialog

version 1.10.0 - 2023/04/10
Added
  • Support of custom HTML columns

version 1.9.0 - 2022/10/19
Changed
  • Again, big rework of common_utils (use submodule)

version 1.8.0 - 2022/10/11
Changed
  • Big rework of common_utils.py

version 1.7.3 - 2022/09/08
Bug fixes
  • Icon not display when a theme colors is used

version 1.7.2 - 2022/08/17
Changed
  • Small improvement of XMLentity

version 1.7.1 - 2022/07/19
Changed
  • Small improvement of compatibility betwen multiple Calibre version

version 1.7.0 - 2022/07/18
Changed
  • Small technical change for compatibility with Calibre 6

version 1.6.3 - 2022/04/25
Changed
  • Improve a bad parse for raw text comment but containing
    tags

version 1.6.2 - 2022/02/22
Changed
  • Various technical improvement

version 1.6.1 - 2022/01/08
Bug fixes
  • Fix a regression of "del align for list <li>"

version 1.6.0 - 2022/01/04
Changed
  • Compatible Calibre6/Qt6

version 1.5.0 - 2021/10/31
Added
  • Improvement of "Single 'Line return'" option: Replace by Space, by new paragraph, no change

version 1.4.1 - 2021/10/03
Changed
  • Clean text full heading
Bug fixes
  • The text of progress dialog is correctly translated, FINALY! \o/

version 1.4.0 - 2021/09/11
Changed
  • Better support of small screens for the config dialog
  • Improve
    in <strong>/<em>
  • Improve clean for text fully bold and <sub>/<sup> paragraphe
  • Improved uniformity with the Calibre comment format

version 1.3.4 - 2021/08/30
Changed
  • Clean text fully bold

version 1.3.3 - 2021/08/17
Changed
  • Clean a very rare invalid comment fomat (all in <sub>/<sup>)

version 1.3.2 - 2021/01/07
Bug fixes
  • Fix convert to list a plain text beginning with a year

version 1.3.1 - 2020/11/26
Changed
  • Reduce the height of the configuration window

version 1.3.0 - 2021/01/07
Added
  • Add new options for the cleaning:
    • Round the Weights value instead of truncated
    • Remove Strikethrough, Underline and Italic
    • Try a conversion from Markdown format (the key word is TRY)
    • Management of empty paragraphs
    • Convert 'Line Return' into paragraph
    • Specific alignment for lists
    • Remove all formatting (NO MERCY!!)
Changed
  • Improvements of mass edit:
    • Add a progres bar window and possibility to cancel the current operation
    • Don't update the unchanged comments in the Database
  • and a lot of improvements for the cleaning.

version 1.2.2 - 2020/11/26
Bug fixes
  • Fix rare issue with LibraryDatabase()

version 1.2.1 - 2020/11/16
Bug fixes
  • Fix error when loading the Spanish translation

version 1.2.0 - 2020/10/12
Added
  • Support translation
  • Spanish translation by dunhill

version 1.1.0 - 2020/10/12
Added
  • 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 - 2020/10/11
Added/Changed
  • Strategy change: All CSS rules are removed. Only a handful basic rules as keep.
    • Add a option to specify additional CSS rules to keep.
    • Saving parameters in a JSON (common to all libraries). Your settings will be reset!!
    • Add an option to remove 'Multiple Line Return' and create a new paragraph instead.

version 0.3.1 - 2020/10/09
Added
  • Transforms non-html (full text) comments to HTML

version 0.3.0 - 2020/10/09
Added
  • Add option for the Weight

version 0.2.1 - 2020/10/08
Added
  • Add "Delete all align" in the justification option

version 0.2.0 - 2020/10/08
First release
Attached Thumbnails
Click image for larger version

Name:	Comments_Cleaner.png
Views:	139
Size:	39.7 KB
ID:	203635   Click image for larger version

Name:	Comments_Cleaner-exemple.gif
Views:	145
Size:	16.7 KB
ID:	203636   Click image for larger version

Name:	Comments_Cleaner-menu.png
Views:	114
Size:	7.1 KB
ID:	203637   Click image for larger version

Name:	Comments_Cleaner-notes.png
Views:	74
Size:	15.1 KB
ID:	204760  
Attached Files
File Type: zip Comments Cleaner-1.13.0.zip (453.3 KB, 3272 views)

Last edited by un_pogaz; 02-19-2024 at 10:29 AM.
un_pogaz is offline   Reply With Quote
Old 10-08-2020, 06:23 PM   #2
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
Join Date: Dec 2017
Device: Kobo
reserverd for futur usage
un_pogaz is offline   Reply With Quote
Advert
Old 10-09-2020, 11:20 AM   #3
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
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 05:54 PM.
un_pogaz is offline   Reply With Quote
Old 10-09-2020, 05:54 PM   #4
BetterRed
null operator (he/him)
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: 20,575
Karma: 26954694
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 online now   Reply With Quote
Old 10-11-2020, 02:16 PM   #5
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
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
Advert
Old 10-12-2020, 11:57 AM   #6
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
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, 05: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:	415
Size:	24.5 KB
ID:	182701  
Cimaco is offline   Reply With Quote
Old 10-13-2020, 07:41 PM   #8
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 723
Karma: 228142
Join Date: Sep 2017
Location: Argentina
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:	397
Size:	73.5 KB
ID:	182703  
Attached Files
File Type: zip Comments Cleaner 1.2.0 (con nueva traducción).zip (83.7 KB, 408 views)

Last edited by dunhill; 10-13-2020 at 07:52 PM.
dunhill is offline   Reply With Quote
Old 10-14-2020, 08:06 AM   #9
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
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 11:32 AM.
un_pogaz is offline   Reply With Quote
Old 10-14-2020, 07: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, 02:56 AM   #11
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
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, 06:41 PM   #12
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 723
Karma: 228142
Join Date: Sep 2017
Location: Argentina
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:	420
Size:	183.8 KB
ID:	183456  
dunhill is offline   Reply With Quote
Old 11-18-2020, 11:12 AM   #13
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
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.

Last edited by un_pogaz; 10-25-2022 at 03:40 PM.
un_pogaz is offline   Reply With Quote
Old 11-24-2020, 04:14 PM   #14
ownedbycats
Custom User Title
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.
 
ownedbycats's Avatar
 
Posts: 8,639
Karma: 61234567
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly 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 04:20 PM.
ownedbycats is offline   Reply With Quote
Old 11-25-2020, 06:02 AM   #15
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
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


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin]Clean Comments Terisa de morgan Plugins 10 07-21-2023 07:50 AM
[Conversion Plugin] Language Cleaner (profanity filter) jdanders Plugins 12 07-08-2023 09:21 PM
[GUI Plugin] Manga plugin mastertea Plugins 6 01-06-2022 02:43 AM
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 14 04-04-2021 05:25 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 02:48 AM.


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