aboutsummaryrefslogtreecommitdiffstats
path: root/src/schema.py
diff options
context:
space:
mode:
authorBlake DeMarcy <ofunknowndescent@gmail.com>2017-03-01 15:54:56 -0600
committerBlake DeMarcy <ofunknowndescent@gmail.com>2017-03-01 15:54:56 -0600
commit1ddf49224942253bf383ebffeeba2b1880f4a9a8 (patch)
tree1a32a16c6eba7cea7cf9e2af52ec5d5be9328529 /src/schema.py
parent4bb3340d43c2c836df196f490ba97c0302e4ce62 (diff)
downloadbbj-1ddf49224942253bf383ebffeeba2b1880f4a9a8.tar.gz
too many things and I suck at git
Diffstat (limited to 'src/schema.py')
-rw-r--r--src/schema.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/schema.py b/src/schema.py
index ddfcb41..1d5c87e 100644
--- a/src/schema.py
+++ b/src/schema.py
@@ -1,3 +1,4 @@
+from src import formatting
from time import time
def base():
@@ -48,12 +49,13 @@ def user_external(ID, name, quip, bio, admin):
def thread(ID, author, body, title, tags):
+ text, entities = formatting.parse(body, doquotes=False)
now = time()
return {
"thread_id": ID,
"author": author,
- "body": body,
- "entities": list(),
+ "body": text,
+ "entities": entities, # of type list()
"title": title,
"tags": tags,
"replies": list(),
@@ -65,12 +67,13 @@ def thread(ID, author, body, title, tags):
def reply(ID, author, body):
+ text, entities = formatting.parse(body)
now = time()
return {
"post_id": ID,
"author": author,
- "body": body,
- "entities": list(),
+ "body": text,
+ "entities": entities, # of type list()
"lastmod": now,
"edited": False,
"created": now
Un proyecto texto-plano.xyz