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 12-08-2018, 02:41 PM   #1
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 4,728
Karma: 15356729
Join Date: Dec 2010
Device: Kindle PW2
[Editor Plugin] LanguageTool

This plugin allows you to run a grammar check on the currently open HTML file with LanguageTool.

Credits:

Kovid Goyal who helped me with the Calibre API.

Disclaimer:

Since I'm not a programmer you might want to save your books before having them checked by this plugin. (The plugin will also automatically create a checkpoint.)

Installation:

This plugin requires Java. To test whether Java is installed on your machine open a command prompt/terminal window and enter the following command:

Code:
java -version
If you don't get a version number, Java is either not installed or the Java binary can't be found. If Java is not installed, go to the Oracle website and download the latest Java version. (Note that you might need to re-boot your machine after the installation.)

You'll also need to download and unzip the desktop version of LanguageTool. (When you run the plugin for the first time you'll be prompted to select languagetool-commandline.jar, which is located in the LanguageTool root folder.)

Usage:

Simply open an HTML file and click the LanguageTool icon. If LanguageTool finds any errors, the plugin will display them in a new window.

For example, if you check: It don't matter to me. the plugin will display the following message.

... It don't matter to me.... GRAMMAR:HE_VERB_AGR The pronoun 'It' is usually used with a third-person or a past tense verb: 'doesn't', 'didn't'

(GRAMMAR is a LanguageTool category and HE_VERB_AGR a LanguageTool rule.)

Note that the plugin will use the value of the <dc:language> metadata entry for all files in the book. I.e., lang/xml:lang attributes will be ignored.

Settings:

The plugin doesn't come with a GUI, however, advanced users can change some of the default settings by editing LanguageTool.json, which will be created in the Calibre plugins folder (Preferences > Miscellaneous > Open Calibre configuration directory > plugins).

Code:
{
  "update_check": false, 
  "close_cb": false, 
  "allFiles": false, 
  "clipboard_copy": false, 
  "ltPath": "C:/Program Files/LanguageTool-4.7/languagetool-commandline.jar", 
  "disabledRules": "MORFOLOGIK_RULE_EN_US,ENGLISH_WORD_REPEAT_BEGINNING_RULE,
  "disabledCategories": "REDUNDANCY" 
}
  • update_check: If enabled, the plugin will check the LanguageTool GitHub website for LanguageTool updates.
  • close_cb: If enabled, the plugin will automatically close the Check Book window.
  • allFiles: If enabled, the plugin will check all HTML files.
  • clipboard_copy: If enabled, the plugin will copy all error messages as a tab-delimited file to the system clipboard.

Troubleshooting:

If you get a WindowsError: [Error 2] unhandled exception message, the Java binary couldn't be found. Installing/updating Java and re-booting your machine should take care of this problem.

If you check a very large file, Windows might display (Not responding) in the title bar. This is normal. You'll have to wait until the check is completed.

Version History
Spoiler:

Version 0.1.0 - 08 Dec 2018
Initial release.
Attached Files
File Type: zip LanguageTool.zip (9.0 KB, 17475 views)

Last edited by Doitsu; 11-28-2019 at 06:01 PM.
Doitsu is offline   Reply With Quote
Old 12-09-2018, 04:48 AM   #2
jbacelar
Interested in the matter
jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.
 
jbacelar's Avatar
 
Posts: 302
Karma: 426060
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook Touch HD
Wow!
Thank you very much Doitsu.
I will try it today.

Last edited by jbacelar; 12-09-2018 at 04:51 AM.
jbacelar is offline   Reply With Quote
Advert
Old 12-09-2018, 06:52 AM   #3
jbacelar
Interested in the matter
jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.
 
jbacelar's Avatar
 
Posts: 302
Karma: 426060
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook Touch HD
Works very well.
Thanks again.
jbacelar is offline   Reply With Quote
Old 12-09-2018, 09:12 AM   #4
thiago.eec
Addict
thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.
 
Posts: 217
Karma: 71602
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Thanks, Doitsu!
Works perfectly, with support for pt-BR.
thiago.eec is offline   Reply With Quote
Old 11-28-2019, 01:29 PM   #5
icallaci
Fanatic
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 540
Karma: 6483398
Join Date: Sep 2012
Device: Kobo Forma and Aura One, Samsung Galaxy Note 8 and Galaxy Tab S2 8.0
This tool saved me a ton of work on a very poorly edited book. Thank you.
icallaci is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Editor Plugin] EpubCheck Doitsu Plugins 67 09-10-2019 02:03 PM
[LanguageTool]: Grammar check Doitsu Plugins 70 09-10-2019 01:56 PM
Open Metadata Editor from plugin notbuu Development 5 10-05-2016 01:10 AM
Sample Plugin for the Editor DiapDealer Editor 77 12-10-2014 08:16 AM
Editor plugin question DiapDealer Development 2 07-28-2014 11:23 PM


All times are GMT -4. The time now is 03:46 PM.


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