From dbb3dd305eb9c18dd1e384f05f801ef291f68c9c Mon Sep 17 00:00:00 2001 From: Isaac Riley Date: Fri, 24 Jan 2020 17:55:31 +0100 Subject: [PATCH] simple tool to strip tags --- utils/fb2_utils.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 utils/fb2_utils.py diff --git a/utils/fb2_utils.py b/utils/fb2_utils.py new file mode 100644 index 0000000..dbd7459 --- /dev/null +++ b/utils/fb2_utils.py @@ -0,0 +1,6 @@ +import re + +def strip_tags(rawtext): + text = re.sub("

", "\n\t", rawtext) + text = re.sub("<.+?>", "", rawtext) + return text \ No newline at end of file