#!/usr/bin/env python3 #coding: utf-8 #!---------- squiNotes.py ---------- # My tasks-taking app #-----------------------------! #CLASS class task: def __init__(self, createtime: int, modtime: int, title: str, text: str, done: bool, priority: int): """ createtime, modtime : epoch time of task writing / modfying title and text are str """ self.modtime = modtime self.createtime = createtime self.title = title self.text = text self.priority = priority if done: self.donemark = "✅" else: self.donemark = "😓" def rendertime(self, pretimestamp: int): """ Render the given timestamp as dd/mm/yyyy-hh:mm """ import datetime timestamp = datetime.datetime.fromtimestamp(pretimestamp) timestamp = timestamp.strftime("%d/%m/%Y-%H:%M:%S") return timestamp def flaskrender(self): """ Render the task whole content as html for flask, using flask.Markup """ import markdown from flask import Markup, url_for rendered = f"""