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:
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]}...")
Note:
Requires the lxml and html2text packages to be installed.
Install with: pip install lxml html2text
Path to the EverNote export file (.enex extension).
Whether to concatenate all notes into a single
Document. If True, only the source metadata is preserved.
If False, each note becomes a separate Document with its own
metadata.
Load documents from EverNote export file.
Depending on the load_single_document setting, either yields individual
Documents for each note or a single Document containing all notes.