04_main
One callable function
To tie it all together:
hyphenate_html_file
hyphenate_html_file (html_filename:str, output_filename:str, patterns_filename:str, hyphen:str='\xad', lefthyphenmin:int=2, righthyphenmin:int=3, exclude_c lasses:tuple[typing.Type[bs4.element.PageElement],.. .]=())
Read html_filename and output output_filename, inserting hyphens in words.
| Type | Default | Details | |
|---|---|---|---|
| html_filename | str | to be read | |
| output_filename | str | to be written | |
| patterns_filename | str | e.g. hyphen.tex or hyph-fi.tex | |
| hyphen | str | | what hyphen character to use |
| lefthyphenmin | int | 2 | at least this many characters before the first hyphen |
| righthyphenmin | int | 3 | at least this many characters after the last hyphen |
| exclude_classes | tuple | () | exclude these bs4 elements (empty to use default) |
| Returns | None |