tril now gives me back a title and content of blogs
This commit is contained in:
+14
-1
@@ -4,7 +4,7 @@ import os
|
||||
|
||||
class TrilumNotes:
|
||||
def __init__(self):
|
||||
self.protocol = os.environ.get('TRILUM_PROTOCOL')
|
||||
self.protocol = os.environ.get('TRILIUM_PROTOCOL')
|
||||
self.host = os.environ.get('TRILIUM_HOST')
|
||||
self.port = os.environ.get('TRILIUM_PORT')
|
||||
self.tril_pass = os.environ.get('TRILIUM_PASS')
|
||||
@@ -34,3 +34,16 @@ class TrilumNotes:
|
||||
)
|
||||
self.new_notes = notes
|
||||
return notes
|
||||
|
||||
def _get_content(self, note_id):
|
||||
return self.ea.get_note_content(note_id)
|
||||
|
||||
def get_notes_content(self):
|
||||
content_dict = {}
|
||||
for note in self.new_notes['results']:
|
||||
content_dict[note['noteId']] = {"title" : f"{note['title']}",
|
||||
"content" : f"{self._get_content(note['noteId'])}"
|
||||
}
|
||||
self.note_content = content_dict
|
||||
return content_dict
|
||||
|
||||
|
||||
Reference in New Issue
Block a user