Skip to content

Commit

Permalink
Update and clean up README
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Anderson committed Sep 7, 2020
1 parent 59accbc commit fa6d7bc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# calibre-plugin-language-cleaner
Lengthy list of regexes to "clean up" language in books. Works as a profanity filter for Kindle and other ebooks.
This is a lengthy list of regexes to "clean up" language in books. Works as a profanity filter for Kindle and other ebooks.

I wrote this plugin because I don't like reading vulgar language, but I like reading books with vulgar language in it :). Personally I find books much more enjoyable after being processed with this script. Obviously it is a personal set of filters, but I've done my best to make the changes sound as natural as possible, and after using it for years, I think it's pretty good.

Expand All @@ -8,16 +8,16 @@ If you'd like to customize it to meet your preferences, you just need to go thro
## Installation

To install:
* Download zip file from the [releases](https://github.com/jdanders/calibre-plugin-language-cleaner/releases) page, or create zip from source as described below
* Download zip file from the [releases](https://github.com/jdanders/calibre-plugin-language-cleaner/releases) page, or create a zip file from source as described below
* In calibre choose Preference -> Plugins -> Load plugin from file
* Choose the zip file, and the plugin should show up under "File type plugins"

To use:
* Choose the book you'd like and make sure you have an epub format (so convert to epub if you don't already have that format)
* Now do "Convert book" and choose to convert from Epub to Epub (or whatever destination format you want)
* Wait until longer than usual job completes, due the very inefficient way this plugin works
* Wait until longer than usual job completes, due the very inefficient way this plugin works (can be a minute per book or more)

To create install zip from source:
To create install zip file from source:
* create a zip file with the three files: `cleaner.py`, `__init__.py`, and `plugin-import-name-language_clean_plugin.txt` called `Language_Cleaner.zip`. This command may help in Linux.

`zip Language_Cleaner cleaner.py __init__.py plugin-import-name-language_clean_plugin.txt`
Expand All @@ -40,6 +40,10 @@ This will convert and then load the books back on to the Kindle. It might take a

## LIMITATIONS

Language filtering is inherently problematic -- people interpret words in different ways, and words are used in boundless combinations. This is not a perfect solution, but as I said it is good enough for me.

If you find glaring holes in language that should be filtered, it may be that the source material has formatting tags in the middle of a word. If it is really important to you that the filtering works, you may need to use the "Edit" feature of calibre first.

I am no expert at calibre, and I could not drum up much help on the support forums, so the integration is pretty weak. It only works on books that are being converted from epub, and only works during the conversion process.

Secret debug tip:
Expand Down

0 comments on commit fa6d7bc

Please sign in to comment.