2 # -*- coding: utf-8 -*-
3 """Test suite for spyder.py."""
11 fh = open(target, "r")
15 dir = os.path.dirname(target)
16 output = os.path.join(dir, "wiki.txt")
18 rex = re.compile(r"<\s*script[^>]*?>.*?</script>", re.S)
19 rex2 = re.compile(r"<\s*noscript[^>]*?>.*?</noscript>", re.S)
20 tmp = rex.sub("", html)
21 html_r = rex2.sub("", tmp)
23 c = html2sfjpwiki.Html2SfjpWiki()
24 r = c.parse(html_r, "article-body")
26 fh = open(output, "w")
27 fh.write(c.title + "\n\n")