Basic memory function implemented
This commit is contained in:
@@ -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))
|
||||
|
Reference in New Issue
Block a user