Document loader for EverNote ENEX export files.
Loads EverNote notebook export files (.enex format) into LangChain Documents.
Extracts plain text content from HTML and preserves note metadata including
titles, timestamps, and attachments. Uses secure XML parsing to prevent
vulnerabilities.
The loader supports two modes:
- Single document: Concatenates all notes into one Document (default)
- Multiple documents: Creates separate Documents for each note
Instructions for creating ENEX files <https://help.evernote.com/hc/en-us/articles/209005557-Export-notes-and-notebooks-as-ENEX-or-HTML>__
Example:
.. code-block:: python
from langchain_community.document_loaders import EverNoteLoader
# Load all notes as a single document
loader = EverNoteLoader("my_notebook.enex")
documents = loader.load()
# Load each note as a separate document:
# documents = [ document1, document2, ... ]
loader = EverNoteLoader("my_notebook.enex", load_single_document=False)
documents = loader.load()
# Lazy loading for large files
for doc in loader.lazy_load():
print(f"Title: {doc.metadata.get('title', 'Untitled')}")
print(f"Content: {doc.page_content[:100]}...")