Skip to content

Instantly share code, notes, and snippets.

@ansonl
ansonl / extract_rtf.py
Last active August 20, 2016 22:30
Function to extract text in RTF files. Modified to show the text of hyperlinks by removing 'field' and 'fldrslt' from ignored destination words.
# -*- coding: utf-8 -*-
"""
Extract text in RTF Files. Refactored to use with Python 3.x
Source:
http://stackoverflow.com/a/188877
Code created by Markus Jarderot: http://mizardx.blogspot.com
"""