diff --git a/src/twtxt.nim b/src/twtxt.nim index 2cf5850..f373235 100644 --- a/src/twtxt.nim +++ b/src/twtxt.nim @@ -10,7 +10,7 @@ type username*: string proc `$`*(t: Tweet): string = - return join([t.date.format(ISOTime), t.message], "\t") + return t.date.format(ISOTime) & "\t" & t.message proc `%`*(t: Tweet): JsonNode = %* diff --git a/src/worker.nim b/src/worker.nim index d7c6488..5e9a8d3 100644 --- a/src/worker.nim +++ b/src/worker.nim @@ -20,7 +20,9 @@ proc updateSystemUser() = let tweets = db.getAllRows(sql"select * from tweets where username='system'") for tweet in tweets.items: - fout.writeLine $(tweet.fromDBRow()) + let tweetObj = tweet.fromDBRow() + echo tweetObj + fout.writeLine $tweetObj fout.close