Add Joplin document loader (#5153)

# Add Joplin document loader

[Joplin](https://joplinapp.org/) is an open source note-taking app.

Joplin has a [REST API](https://joplinapp.org/api/references/rest_api/)
for accessing its local database. The proposed `JoplinLoader` uses the
API to retrieve all notes in the database and their metadata. Joplin
needs to be installed and running locally, and an access token is
required.

- The PR includes an integration test.
- The PR includes an example notebook.

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
This commit is contained in:
Alon Diament
2023-05-24 22:31:55 +03:00
committed by GitHub
parent f10be072ff
commit 44abe925df
5 changed files with 191 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
from langchain.document_loaders.joplin import JoplinLoader
def test_joplin_loader() -> None:
loader = JoplinLoader()
docs = loader.load()
assert type(docs) is list
assert type(docs[0].page_content) is str
assert type(docs[0].metadata["source"]) is str
assert type(docs[0].metadata["title"]) is str