diff --git a/fabfile.py b/fabfile.py index c55b5ab..b93b5a5 100644 --- a/fabfile.py +++ b/fabfile.py @@ -72,9 +72,10 @@ def update(): @task def locbuild(): + local("rm -rf ./build") local("mkdir -p build/{scripts,styles}") local("cp requirements.txt ./build/requirements.txt") - #buildLocalVenv() + buildLocalVenv() buildScss() buildJS() copyFiles() diff --git a/src/comment.py b/src/comment.py index f4b1b18..e09ba09 100644 --- a/src/comment.py +++ b/src/comment.py @@ -1,7 +1,13 @@ from json import dumps -def comment(author, title, text): +from random import randint + +from time import time + +def comment(author, title, text, t): return { + "time" : t, + "id" : randint(1,2**32-1), "title" : title, "author" : author, "text" : text @@ -11,14 +17,14 @@ def comment(author, title, text): testcomments = { 1 : dumps( [ - comment("Anonymous Coward 0", "Some comment?", "super duper awesome comment here"), - comment("Anonymous Coward 1", "Something? IDEK", "super duper worse comment here"), - comment("Anonymous Coward 2", "Some other comment?", "super duper dang terrible comment here") + comment("Person 1", "Two", "A Comment here", 1), + comment("Person 2", "One", "Some other comment", 2), + comment("Person 3", "Three", "My opinion is correct", 3) ]), 2 : dumps( [ - comment("Anonymous Coward 3", "Some comment?", "super duper awesome comment here"), - comment("Anonymous Coward 4", "Something? IDEK", "super duper worse comment here"), - comment("Anonymous Coward 5", "Some other comment?", "super duper dang terrible comment here") - ]) + comment("Person 1", "Two", "A cool terrible Comment here", 1), + comment("Person 2", "One", "Some other awful comment", 2), + comment("Person 3", "Three", "My opinion is not correct", 3) + ]) } diff --git a/src/scripts/comment.tag b/src/scripts/comment.tag index 62aa2ac..72507f9 100644 --- a/src/scripts/comment.tag +++ b/src/scripts/comment.tag @@ -2,15 +2,16 @@
-

{title} by {author}

+

Comment posted by {author}

- {R.join(" ")(R.repeat(text, 20))} + { text }
+
diff --git a/src/scripts/comments.tag b/src/scripts/comments.tag index 920853a..7381283 100644 --- a/src/scripts/comments.tag +++ b/src/scripts/comments.tag @@ -1,6 +1,6 @@
- + +