FrostCo / AdvancedProfanityFilter

A browser extension to filter profanity from webpages
GNU General Public License v3.0
164 stars 26 forks source link

Censoring for epub files #244

Closed Imveryweird closed 4 years ago

Imveryweird commented 4 years ago

I like my books swear word free. And I think this would help a lot. Thanks in advance.

richardfrost commented 4 years ago

Thanks for the suggestion! I agree that this would be a useful application as well, but unfortunately I think its a bit out of the realm for the browser extension due to the dependencies it would require.

I have another project (Advanced Profanity Filter Web) that uses the same APF library, so it is compatible with the same configuration. Its more of a back-burner project, and is probably barely alpha quality right now, but I have had success with filtering .epub and .docx files using it.

See the project's README for instructions to host it locally for yourself, or if you'd rather, you can test it on heroku. (Note: Its just a free instance on Heroku, so it may be slow, and subject to being shutdown if it sees too much use).

Imveryweird commented 4 years ago

The instance on heroku didn't work at all.

richardfrost commented 4 years ago

Did the page load at all? Was there an error message? How large is the epub that you are looking to filter?

Imveryweird commented 4 years ago

The page loaded, the epub is about 2mb and the only thing that wouldnt work was the filter page. Edit: i tried multiple(2-3) epubs, all about 2-5 mb but none of them worked.

richardfrost commented 4 years ago

Would you mind sharing the file with me richard @ richardfrost.info?

What browser are you using? I've only tested with Chrome and Brave. I'll test with Firefox later today. Are you using your own config file? If so, does it work without providing one?

richardfrost commented 4 years ago

I've just tested it with a handful of other epubs that I have, and from what I can tell its working.

Do you see an error message when you try to filter it, or does it just appear to do nothing?

Imveryweird commented 4 years ago

It just appears to do absolutely nothing, but I am not using my own config.

richardfrost commented 4 years ago

Okay, I added some more logging (so hopefully I'll be able to track down errors better), and made an adjustment in how .epub files are handled. It was working on all the ebooks that I personally wanted to filter, but it seems that I was missing support for another valid epub format. I'm not sure it will fix it for the ones you've been trying, but give it a try.

For reference, here is a public domain ebook that was failing before, but should work with the new update:

Chandler, Raymond - The Long Goodbye

richardfrost commented 4 years ago

@Imveryweird Just wanted to check in and see if you were able to try it after the changes I noted in the last comment?

Imveryweird commented 4 years ago

Yeah. The heroku instance has been working, read about 2 books on that. I forgot to tell you.

richardfrost commented 4 years ago

Awesome! 😄 Thanks for the update! I'll go ahead and close this for now. Feel free to open it again, or a new issue if you need.