[docs]classJoplinLoader(BaseLoader):"""Load notes from `Joplin`. In order to use this loader, you need to have Joplin running with the Web Clipper enabled (look for "Web Clipper" in the app settings). To get the access token, you need to go to the Web Clipper options and under "Advanced Options" you will find the access token. You can find more information about the Web Clipper service here: https://joplinapp.org/clipper/ """
[docs]def__init__(self,access_token:Optional[str]=None,port:int=41184,host:str="localhost",)->None:""" Args: access_token: The access token to use. port: The port where the Web Clipper service is running. Default is 41184. host: The host where the Web Clipper service is running. Default is localhost. """access_token=access_tokenorget_from_env("access_token","JOPLIN_ACCESS_TOKEN")base_url=f"http://{host}:{port}"self._get_note_url=(f"{base_url}/notes?token={access_token}"f"&fields=id,parent_id,title,body,created_time,updated_time&page={{page}}")self._get_folder_url=(f"{base_url}/folders/{{id}}?token={access_token}&fields=title")self._get_tag_url=(f"{base_url}/notes/{{id}}/tags?token={access_token}&fields=title")