quotequail
raw JSON → 0.4.0 verified Fri May 01 auth: no python maintenance
A library that identifies quoted text in plain text and HTML email messages. Current version: 0.4.0. Release cadence: low, last release in 2021.
pip install quotequail Common errors
error ImportError: No module named 'quotequail' ↓
cause The package is not installed.
fix
Run 'pip install quotequail'.
error AttributeError: module 'quotequail' has no attribute 'quote_text' ↓
cause Import path is wrong or version is too old.
fix
Use 'from quotequail import quote_text' (version 0.2.0+). For older versions, use 'import quotequail; quotequail.quote_text'.
Warnings
gotcha quote_text returns a dict with keys 'text' and 'html' (even for plain text). For HTML input, 'text' is None. ↓
fix Always access result['text'] or result['html'] depending on input type.
gotcha unquote may not perfectly handle all edge cases, like nested quotes or custom email formats. ↓
fix Test with your specific email format and consider fallback parsing.
deprecated Python 3.6 and earlier are not supported; requires Python 3.7+. ↓
fix Upgrade Python to 3.7 or later.
Imports
- quote_text
from quotequail import quote_text - unquote
from quotequail import unquote
Quickstart
from quotequail import quote_text, unquote
text = """On Mon, Jan 1, 2020 at 12:00 PM, John <john@example.com> wrote:
> This is a quoted line.
> Another quoted line.
This is the reply."""
result = quote_text(text)
print("Quoted text:", result)
plain = unquote(text)
print("Unquoted text:", plain)"""