first commit

This commit is contained in:
2019-11-05 22:18:20 +01:00
commit 1699990c02
22 changed files with 633 additions and 0 deletions

25
src/model/model.py Normal file
View File

@@ -0,0 +1,25 @@
from model.entry import Entry
class Model:
def __init__(self, names):
self.entry = None
self.log = []
self.names = ["Ozbolt", "Katarina"]
def import_xml(self, xml_text):
parser = __new__(DOMParser())
xmlDoc = parser.parseFromString(xml_text, "text/xml")
self.entry = Entry(xmlDoc.querySelector("entry"))
# type alias Model =
# { shown: Bool
# , editable: Bool
# , entry: Maybe Entry
# , newXml: Bool
# , xml: Maybe String
# , xmlObject: Maybe Xml2.Value
# , log: List LogEntry
# }