Skip to content

sha256/Epub-Translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Epub Translator

See runner.py for example usage.

Convert an epub book to another language or just replace some words with another.

Subclass ConversionEngine class and define your rules for translation.

An example ConversionEngine that transforms all worlds in the book to lower case would be:

class SimpleConversionEngine(ConversionEngine):

    def convert(self, text):
     
        return text.lower()

All texts inside <p>, <div> etc tags are passed to convert() method, Text of one tag at a time.

Requirements

BeautifulSoup 3

Licence

BSD Licence

About

Translate/relplace texts of epub book

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages