This commit is contained in:
2024-11-26 00:20:03 +10:00
parent 0314472620
commit 20c2a7e335
10 changed files with 166 additions and 42 deletions
+5 -6
View File
@@ -6,6 +6,7 @@ tril = tn.TrilumNotes()
tril.get_new_notes()
tril_notes = tril.get_notes_content()
def convert_to_lowercase_with_underscores(string):
return string.lower().replace(" ", "_")
@@ -14,10 +15,8 @@ for note in tril_notes:
print(tril_notes[note]['title'])
print(tril_notes[note]['content'])
print("Generating Document")
ai_gen = omg.OllamaGenerator(tril_notes[note]['title'],
tril_notes[note]['content'])
ai_gen = omg.OllamaGenerator(tril_notes[note]['title'],
tril_notes[note]['content'],
"zephyr")
os_friendly_title = convert_to_lowercase_with_underscores(tril_notes[note]['title'])
omg.save_to_file(f"{os_friendly_title}.md")
ai_gen.save_to_file(f"/blog_creator/generated_files/{os_friendly_title}.md")