Basic memory function implemented

This commit is contained in:
Lia Schöneweiß
2023-05-14 22:05:24 +02:00
parent 793dda3ce6
commit 9a82d66897
4 changed files with 114 additions and 13 deletions

View File

@@ -1,6 +1,7 @@
from peewee import *
from pathlib import Path
import os
import datetime
ID_MAPPINGS = {
"Lia": 5603036217,
@@ -52,6 +53,13 @@ class JournalEntry(BaseModel):
self.save()
@property
def date_pretty(self) -> str:
try:
return self.date.strftime('%A, %-d. %B %Y')
except ValueError: #fck windows
return self.date.strftime('%a, %d. %b %Y')
def set_db(db_path):
db.initialize(SqliteDatabase(db_path))