# cybertools.text.html
"""Searchable text support for HTML files.
"""
import os, sys
from cybertools.text import base
from bs4 import BeautifulSoup, Declaration, Doctype, NavigableString
class HtmlTransform(base.BaseTransform):
def __call__(self, fr):
input = fr.read().decode('UTF-8')
return htmlToText(input)
def htmlToText(input):
data = []
input = input.replace(u'