Commit 401d9d61 authored by Jogi Hofmüller's avatar Jogi Hofmüller

Add functions to add new geruecht to gdb

parent 233dc06b
......@@ -96,15 +96,21 @@ class GeruechtList(list):
if data['key'] > self.key:
self.key = data['key']
def addNewGeruecht(self, sentence):
# add meta data
def addNewGeruecht(self, sentence, user):
now = time.time()
'key': self.key + 1,
'sentence': sentence,
'state': itemstate.private,
'properties': [],
'meta': {},
'meta': {
'added': now,
'created': now,
'lastmod': now,
'added_by': user,
'created_by': user,
'lastmod_by': user,
def importName(self, data):
......@@ -286,8 +292,8 @@ class Gdb:
next = self.buffer.pop(0)
return next
def addNewGeruecht(self, sentence):
def addNewGeruecht(self, sentence, user):
self.glist.addNewGeruecht(sentence, user)
self.modified = True
class ItemState:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment